From ac549216dea781313c6a997bf445f83c8faaa0c6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 9 Jun 2021 23:21:22 +0200 Subject: [PATCH] annoying but necessary changes --- CMakeLists.txt | 11 ++++++++++ cmake/HardwareOsPreConfig.cmake | 39 ++++++++++++++++++++++----------- fsfw_hal | 2 +- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff37913..34d7851 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,17 @@ set(FSFW_ADDITIONAL_INC_PATHS "FSFW configuration paths" ) +if(TGT_BSP MATCHES "arm/stm32h743zi-nucleo") + # TODO: This works but is a horrible mess. In the future, stm32-cmake support will be used and + # linked against, so we have a clean interface which can be used by FSFW HAL. + set(FSFW_HAL_ADDITIONAL_INC_PATHS + ${BOARD_CONFIG_PATH} + "${BSP_PATH}/STM32CubeH7/Drivers/BSP/STM32H7xx_Nucleo" + CACHE STRING + "FSFW HAL configuration paths" + ) +endif() + configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h) configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h) configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h) diff --git a/cmake/HardwareOsPreConfig.cmake b/cmake/HardwareOsPreConfig.cmake index 88eaa99..f779087 100644 --- a/cmake/HardwareOsPreConfig.cmake +++ b/cmake/HardwareOsPreConfig.cmake @@ -84,8 +84,8 @@ if(${TGT_BSP} MATCHES "arm/stm32h743zi-nucleo") CACHE STRING "FreeRTOS configuration and port paths." ) - - set(FREERTOS_PORT_SOURCES + + set(FREERTOS_PORT_SOURCES ${FREERTOS_PORT_PATH}/port.c CACHE INTERNAL "FreeRTOS port sources" @@ -93,19 +93,32 @@ if(${TGT_BSP} MATCHES "arm/stm32h743zi-nucleo") set(LIB_STM_HAL_NAME "stm_hal" CACHE STRING "STM32 HAL library name") set(LIB_HAL_NAME ${LIB_STM_HAL_NAME} PARENT_SCOPE) set(LINK_HAL TRUE PARENT_SCOPE) + + set(STM_HAL_CONFIG_PATH + "${BOARD_CONFIG_PATH}" + CACHE INTERNAL + "STM HAL config path." + ) - set(STM_HAL_CONFIG_PATH - "${BOARD_CONFIG_PATH}" - CACHE INTERNAL - "STM HAL config path." - ) + set(STM_HAL_DEFINES + "USE_HAL_DRIVER" + "STM32H743xx" + CACHE INTERNAL + "HAL defines for target machine" + ) - set(STM_HAL_DEFINES - "USE_HAL_DRIVER" - "STM32H743xx" - CACHE INTERNAL - "HAL defines for target machine" - ) + set(FSFW_HAL_DEFINES + ${STM_HAL_DEFINES} + CACHE INTERNAL + "Defines for FSFW HAL" + ) + + set(FSFW_HAL_LINK_LIBS + ${LIB_OS_NAME} + ${LIB_STM_HAL_NAME} + CACHE INTERNAL + "Link FSFW HAL against OS" + ) set(LINKER_SCRIPT_PATH "${BSP_PATH}/STM32CubeH7/Boards/NUCLEO-H743ZI") set(LINKER_SCRIPT_NAME "STM32H743ZITx_FLASH.ld") diff --git a/fsfw_hal b/fsfw_hal index d194b75..04166f8 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit d194b759c4781f6384786010c460382de97830c2 +Subproject commit 04166f87d82f3729b4462437677bae9105c1c88e