fix(f2): F2 bootloader now requires HAL/LL as well.
This commit is contained in:
committed by
Raphael Coeffic
parent
84d8075794
commit
5219dd606d
@@ -2,29 +2,32 @@ set(CPU_FAMILY STM32)
|
||||
set(MCU cortex-m3)
|
||||
set(FPU_FLAGS "")
|
||||
|
||||
# STM32 HAL/LL library
|
||||
set(STM32CUBE_DIR ${THIRDPARTY_DIR}/STM32F2xx_HAL_Driver)
|
||||
include_directories(${STM32CUBE_DIR}/Inc)
|
||||
if(NOT NATIVE_BUILD)
|
||||
# STM32 HAL/LL library
|
||||
set(STM32CUBE_DIR ${THIRDPARTY_DIR}/STM32F2xx_HAL_Driver)
|
||||
include_directories(${STM32CUBE_DIR}/Inc)
|
||||
|
||||
add_library(stm32cube_ll OBJECT EXCLUDE_FROM_ALL
|
||||
# LL drivers
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_gpio.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_tim.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_dma.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_usart.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_rcc.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_exti.c
|
||||
# HAL drivers
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_hal_rcc.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_hal_i2c.c
|
||||
)
|
||||
add_library(stm32cube_ll OBJECT EXCLUDE_FROM_ALL
|
||||
# LL drivers
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_gpio.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_tim.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_dma.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_usart.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_rcc.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_ll_exti.c
|
||||
# HAL drivers
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_hal_rcc.c
|
||||
${STM32CUBE_DIR}/Src/stm32f2xx_hal_i2c.c
|
||||
)
|
||||
|
||||
target_compile_options(stm32cube_ll PRIVATE -DUSE_FULL_LL_DRIVER)
|
||||
target_include_directories(stm32cube_ll PRIVATE
|
||||
${THIRDPARTY_DIR}/CMSIS/Device/ST/STM32F2xx/Include
|
||||
${THIRDPARTY_DIR}/CMSIS/Include)
|
||||
target_compile_options(stm32cube_ll PRIVATE -DUSE_FULL_LL_DRIVER)
|
||||
target_include_directories(stm32cube_ll PRIVATE
|
||||
${THIRDPARTY_DIR}/CMSIS/Device/ST/STM32F2xx/Include
|
||||
${THIRDPARTY_DIR}/CMSIS/Include)
|
||||
|
||||
set(FIRMWARE_SRC ${FIRMWARE_SRC} $<TARGET_OBJECTS:stm32cube_ll>)
|
||||
set(FIRMWARE_SRC ${FIRMWARE_SRC} $<TARGET_OBJECTS:stm32cube_ll>)
|
||||
set(BOOTLOADER_SRC ${BOOTLOADER_SRC} $<TARGET_OBJECTS:stm32cube_ll>)
|
||||
endif()
|
||||
|
||||
# StdPeriph library
|
||||
set(STM32LIB_DIR ${THIRDPARTY_DIR}/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries)
|
||||
|
||||
Reference in New Issue
Block a user