Some fixes for STM32F2xx
This commit is contained in:
@@ -27,6 +27,12 @@ extern "C" {
|
||||
#include "STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_tim.h"
|
||||
#include "STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h"
|
||||
#elif defined(STM32F2)
|
||||
|
||||
// Workaround to prevent the other CMSIS header to be included
|
||||
// and fix some missing items in the old one
|
||||
#include "thirdparty/CMSIS/Include/cmsis_compiler.h"
|
||||
#define __CORE_CM3_H_GENERIC
|
||||
|
||||
#include "CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
||||
#include "STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_gpio.h"
|
||||
#include "STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_tim.h"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
set(CPU_FAMILY STM32)
|
||||
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)
|
||||
@@ -21,9 +20,10 @@ target_include_directories(stm32cube_ll PRIVATE
|
||||
set(FIRMWARE_SRC ${FIRMWARE_SRC} $<TARGET_OBJECTS:stm32cube_ll>)
|
||||
|
||||
# StdPeriph library
|
||||
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)
|
||||
include_directories(${STM32LIB_DIR}/CMSIS/Include)
|
||||
|
||||
add_definitions(-DSTM32F2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user