diff --git a/radio/src/targets/common/arm/CMakeLists.txt b/radio/src/targets/common/arm/CMakeLists.txt index da9bf5447..df77ab664 100644 --- a/radio/src/targets/common/arm/CMakeLists.txt +++ b/radio/src/targets/common/arm/CMakeLists.txt @@ -247,11 +247,7 @@ set(FIRMWARE_SRC ${RTOS_DIR}/tasks.c ${RTOS_DIR}/event_groups.c ${RTOS_DIR}/timers.c - # needs to be move to the F4 specific directory - ${RTOS_DIR}/portable/GCC/ARM_CM4F/port.c - rtos.c - ) -include_directories(${RTOS_DIR}/portable/GCC/ARM_CM4F) + rtos.c) set(PULSES_SRC ${PULSES_SRC} diff --git a/radio/src/targets/common/arm/stm32/f2/CMakeLists.txt b/radio/src/targets/common/arm/stm32/f2/CMakeLists.txt index c0ffd4af0..8d0136c92 100644 --- a/radio/src/targets/common/arm/stm32/f2/CMakeLists.txt +++ b/radio/src/targets/common/arm/stm32/f2/CMakeLists.txt @@ -2,10 +2,13 @@ set(CPU_FAMILY STM32) set(MCU cortex-m3) set(FPU_FLAGS "") set(STM32LIB_DIR ${THIRDPARTY_DIR}/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries) + include_directories(${STM32LIB_DIR}/STM32F2xx_StdPeriph_Driver/inc) include_directories(${STM32LIB_DIR}/CMSIS/Device/ST/STM32F2xx/Include) include_directories(${STM32LIB_DIR}/CMSIS/include) + add_definitions(-DSTM32F2) + set(STM32LIB_SRC ${STM32LIB_SRC} CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s @@ -22,5 +25,17 @@ set(STM32LIB_SRC STM32F2xx_StdPeriph_Driver/src/stm32f2xx_pwr.c STM32F2xx_StdPeriph_Driver/src/stm32f2xx_usart.c ) -set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} ../common/arm/stm32/f2/system_stm32f2xx.c) + +# +# FreeRTOS port specific include +# +include_directories(${RTOS_DIR}/portable/GCC/ARM_CM3) + +# +# System and FreeRTOS port files +# +set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} + ../../common/arm/stm32/f2/system_stm32f2xx.c + ../../${THIRDPARTY_DIR}/${RTOS_DIR}/portable/GCC/ARM_CM3/port.c + ) diff --git a/radio/src/targets/common/arm/stm32/f4/CMakeLists.txt b/radio/src/targets/common/arm/stm32/f4/CMakeLists.txt index c062596d1..0bd50e34a 100644 --- a/radio/src/targets/common/arm/stm32/f4/CMakeLists.txt +++ b/radio/src/targets/common/arm/stm32/f4/CMakeLists.txt @@ -2,10 +2,13 @@ set(CPU_FAMILY STM32) set(MCU cortex-m4) set(FPU_FLAGS "-mfloat-abi=hard -mfpu=fpv4-sp-d16") set(STM32LIB_DIR ${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries) + include_directories(${STM32LIB_DIR}/STM32F4xx_StdPeriph_Driver/inc) include_directories(${STM32LIB_DIR}/CMSIS/Device/ST/STM32F4xx/Include) include_directories(${STM32LIB_DIR}/CMSIS/Include) + add_definitions(-DSTM32F4) + set(STM32LIB_SRC ${STM32LIB_SRC} STM32F4xx_StdPeriph_Driver/src/misc.c @@ -21,5 +24,17 @@ set(STM32LIB_SRC STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c ) -set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} ../common/arm/stm32/f4/system_stm32f4xx.c) + +# +# FreeRTOS port specific include +# +include_directories(${RTOS_DIR}/portable/GCC/ARM_CM4F) + +# +# System and FreeRTOS port files +# +set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} + ../common/arm/stm32/f4/system_stm32f4xx.c + ../../${RTOS_DIR}/portable/GCC/ARM_CM4F/port.c + )