forked from ROMEO/obsw
making the linker happy
This commit is contained in:
parent
944e45cad2
commit
791428e6c0
@ -101,7 +101,7 @@ if(${CMAKE_CROSSCOMPILING})
|
||||
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC bsp freertos_kernel lwip mission_rust)
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC bsp mission_rust lwip )
|
||||
|
||||
# target_include_directories(
|
||||
# ${TARGET_NAME} PUBLIC ${BSP_PATH})
|
||||
|
@ -1 +1,6 @@
|
||||
target_sources(bsp PUBLIC FreeRTOS_asm_vectors.S FreeRTOS_tick_config.c)
|
||||
target_sources(bsp PRIVATE FreeRTOS_asm_vectors.S)
|
||||
|
||||
# Needs to be INTERFACE'd so it is build as part of the main application and can be found by the linker
|
||||
# Otherwise, we have a circular dependency between FreeRTOS and bsp which needs single file libraries to
|
||||
# resolve
|
||||
target_sources(bsp INTERFACE FreeRTOS_tick_config.c)
|
@ -16,7 +16,7 @@ set(lwip_SRCS_XIL
|
||||
)
|
||||
|
||||
|
||||
add_library(lwip_xil ${lwip_SRCS_XIL})
|
||||
add_library(lwip_xil EXCLUDE_FROM_ALL ${lwip_SRCS_XIL})
|
||||
|
||||
target_include_directories(lwip_xil PUBLIC ${LWIP_INCLUDE_DIRS_XIL})
|
||||
|
||||
|
@ -1 +1,3 @@
|
||||
target_sources(bsp PUBLIC close.c read.c write.c)
|
||||
# Needs to be INTERFACE'd so it is build as part of the main application and can be found by the linker
|
||||
# Otherwise, the linker seems to be unable to link it into newlib
|
||||
target_sources(bsp INTERFACE close.c exit.c read.c write.c)
|
7
bsp_z7/newlib/exit.c
Normal file
7
bsp_z7/newlib/exit.c
Normal file
@ -0,0 +1,7 @@
|
||||
void _exit (int _status)
|
||||
{
|
||||
(void)_status;
|
||||
while (1) {
|
||||
;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
target_sources(bsp PUBLIC
|
||||
target_sources(bsp PRIVATE
|
||||
src/xemacps_bdring.c
|
||||
src/xemacps.c
|
||||
src/xemacps_control.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(bsp PUBLIC
|
||||
target_sources(bsp PRIVATE
|
||||
src/xgpiops_g.c
|
||||
src/xgpiops_hw.c
|
||||
src/xgpiops_intr.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(bsp PUBLIC
|
||||
target_sources(bsp PRIVATE
|
||||
src/xscugic_g.c
|
||||
src/xscugic.c
|
||||
src/xscugic_intr.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(bsp PUBLIC
|
||||
target_sources(bsp PRIVATE
|
||||
src/xscutimer.c
|
||||
src/xscutimer_sinit.c
|
||||
src/xscutimer_g.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(bsp PUBLIC
|
||||
target_sources(bsp PRIVATE
|
||||
src/xscuwdt_sinit.c
|
||||
src/xscuwdt_selftest.c
|
||||
src/xscuwdt_g.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(bsp PUBLIC
|
||||
target_sources(bsp PRIVATE
|
||||
src/translation_table.S
|
||||
src/cpu_init.S
|
||||
src/boot.S
|
||||
@ -14,10 +14,10 @@ target_sources(bsp PUBLIC
|
||||
src/fstat.c
|
||||
src/fcntl.c
|
||||
src/putnum.c
|
||||
src/_open.c
|
||||
#src/_open.c
|
||||
src/xil_testcache.c
|
||||
src/xil_assert.c
|
||||
src/_exit.c
|
||||
#src/_exit.c
|
||||
src/time.c
|
||||
src/xil_testio.c
|
||||
src/xplatform_info.c
|
||||
@ -33,7 +33,7 @@ target_sources(bsp PUBLIC
|
||||
src/isatty.c
|
||||
#src/read.c
|
||||
#src/inbyte.c
|
||||
src/close.c
|
||||
#src/close.c
|
||||
src/xil_sleeptimer.c
|
||||
src/print.c
|
||||
src/xil_printf.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(bsp PUBLIC
|
||||
target_sources(bsp PRIVATE
|
||||
src/xuartps.c
|
||||
src/xuartps_hw.c
|
||||
src/xuartps_intr.c
|
||||
|
@ -1,7 +1,7 @@
|
||||
add_executable(sim_interface mission.c testEth.c)
|
||||
add_executable(sim_interface EXCLUDE_FROM_ALL mission.c testEth.c)
|
||||
|
||||
target_link_options(sim_interface PRIVATE -Wl,--cref -Wl,-Map=${TARGET_NAME}.map -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -Wl,-build-id=none -T${CMAKE_SOURCE_DIR}/bsp_z7/freeRTOS/lscript.ld -specs=${CMAKE_SOURCE_DIR}/bsp_z7/freeRTOS/Xilinx.spec )
|
||||
|
||||
target_link_libraries(sim_interface PRIVATE bsp lwip_xil freertos_kernel)
|
||||
target_link_libraries(sim_interface PRIVATE lwip_xil bsp freertos_kernel)
|
||||
|
||||
target_link_options(sim_interface PRIVATE "-Wl,--gc-sections")
|
Loading…
x
Reference in New Issue
Block a user