makes bsp standalone library

This commit is contained in:
Eyck-Alexander Jentzsch 2025-01-16 11:09:40 +01:00
parent 0464b3b589
commit fbe6560e79

View File

@ -18,11 +18,12 @@ target_include_directories(startup PUBLIC env include)
add_subdirectory(libwrap)
add_library(bsp INTERFACE)
target_link_libraries(bsp INTERFACE startup wrap)
target_include_directories(bsp INTERFACE env/${BOARD_BASE})
add_library(bsp STATIC env/${BOARD_BASE}/init.c)
target_link_libraries(bsp PUBLIC startup wrap)
target_include_directories(bsp PUBLIC env/${BOARD_BASE})
target_link_options(bsp INTERFACE LINKER:--no-warn-rwx-segments -nostartfiles -T ${CMAKE_CURRENT_SOURCE_DIR}/env/${BOARD_BASE}/link.lds)
if(SEMIHOSTING)
target_include_directories(bsp INTERFACE /include)
target_include_directories(bsp INTERFACE include)
target_sources(bsp INTERFACE env/semihosting.c env/trap.c)
endif()