Dirk Helbig ac399f3b9c stm32-f4discovery-cc256x: updated port to STM32CubeF4 v1.28.0
# Conflicts:
#	port/stm32-f4discovery-cc256x/port/port.c
2025-01-14 17:40:41 +01:00

26 lines
814 B
CMake

if(DEFINED BSP)
set( BSP_SOURCE_DIR ${PROJECT_SOURCE_DIR}/Drivers/BSP )
include_directories(${BSP_SOURCE_DIR}/${BSP})
# Locate sources
file(GLOB BSP_SOURCES ${BSP_SOURCE_DIR}/${BSP}/*.c)
# Add components
# BSP_COMPONENTS should be a list of components to be included
foreach(COMPONENT ${BSP_COMPONENTS})
include_directories(${BSP_SOURCE_DIR}/Components/${COMPONENT}/)
file(GLOB_RECURSE COMPONENT_SOURCES ${BSP_SOURCE_DIR}/Components/${COMPONENT}/*.c)
set(BSP_COMPONENT_SOURCES ${BSP_COMPONENT_SOURCES} ${COMPONENT_SOURCES})
endforeach(COMPONENT)
# Create bsp library
add_library(bsp ${BSP_SOURCES} ${BSP_COMPONENT_SOURCES})
target_link_libraries(bsp stm32cubemx)
# Add library to the build
set(LIBS ${LIBS} bsp)
endif(DEFINED BSP)