Fix CMakes for ST Cube packages
Improvements in CMake syntax.
Include path to CMSIS.
#
# set include directories
-list(APPEND STM32H7_CubePackage_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Inc")
+list(APPEND STM32H7_CubePackage_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/CMSIS/Device/ST/STM32H7xx/Include)
+list(APPEND STM32H7_CubePackage_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Inc)
# source files
set(STM32H7_CubePackage_SRCS
@@ -12,6 +13,7 @@ set(STM32H7_CubePackage_SRCS
# add HAL files here as required
# SPIFFS
+ stm32h7xx_hal_dma.c
stm32h7xx_hal_qspi.c
)
@@ -20,7 +22,7 @@ foreach(SRC_FILE ${STM32H7_CubePackage_SRCS})
find_file(STM32H7_CubePackage_SRC_FILE ${SRC_FILE}
PATHS
- "${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Src"
+ ${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Src
CMAKE_FIND_ROOT_PATH_BOTH
)
