Move extmodule_driver to stm32 common part

And add support for F2
This commit is contained in:
Raphael Coeffic
2022-03-20 16:22:13 +01:00
parent 9568ba5096
commit 346de7ece4
191 changed files with 231428 additions and 386 deletions
@@ -3,6 +3,24 @@ set(MCU cortex-m3)
set(FPU_FLAGS "")
set(STM32LIB_DIR ${THIRDPARTY_DIR}/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries)
# STM32 HAL/LL library
set(STM32CUBE_DIR ${THIRDPARTY_DIR}/STM32F2xx_HAL_Driver)
add_library(stm32cube_ll OBJECT
${STM32CUBE_DIR}/Src/stm32f2xx_ll_gpio.c
${STM32CUBE_DIR}/Src/stm32f2xx_ll_tim.c
${STM32CUBE_DIR}/Src/stm32f2xx_ll_dma.c
)
target_compile_options(stm32cube_ll PRIVATE -DUSE_FULL_LL_DRIVER)
target_include_directories(stm32cube_ll PRIVATE
${STM32CUBE_DIR}/Inc
${THIRDPARTY_DIR}/CMSIS/Device/ST/STM32F2xx/Include
${THIRDPARTY_DIR}/CMSIS/Include)
set(FIRMWARE_SRC ${FIRMWARE_SRC} $<TARGET_OBJECTS:stm32cube_ll>)
# StdPeriph library
include_directories(${STM32LIB_DIR}/STM32F2xx_StdPeriph_Driver/inc)
include_directories(${STM32LIB_DIR}/CMSIS/Device/ST/STM32F2xx/Include)
include_directories(${STM32LIB_DIR}/CMSIS/include)