From 383cdd4887f6dd14c08ca6fed6f00e1c7bd7f7ae Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Fri, 5 Jun 2026 17:30:20 +0200 Subject: [PATCH] adds linker group to setup_target --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 166522d..b73824a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ endif() target_include_directories(netxduo PRIVATE ${CMAKE_CURRENT_LIST_DIR}/port/moonlight) target_link_libraries(netxduo PUBLIC threadx c) ############################################################################### -project(threadx_demo C ASM) +project(threadx_demo C CXX ASM) set(TARGET_MEM "ram" CACHE STRING "memory map to use") option(NX_DEBUG "compile netxduo debug output in" OFF) option(NX_DEBUG_PACKET "compile netxduo debug output for ethernet packets in" OFF) @@ -66,7 +66,7 @@ function(setup_target TARGET) endif() if(ST_LIBRARIES) - target_link_libraries(${TARGET} PRIVATE ${ST_LIBRARIES}) + target_link_libraries(${TARGET} PRIVATE -Wl,--start-group ${ST_LIBRARIES} -Wl,--end-group) endif() if(ST_TARGET_MEM)