From f30dec4295659a1888353290ad49e15c616a3276 Mon Sep 17 00:00:00 2001 From: Carl Eriksson Skogh Date: Wed, 19 Feb 2025 16:29:26 +0100 Subject: [PATCH] cmake: segger: linker_script: handle section rtt_buff_data The segger cmake linker script is out of date compared to segger_rtt.ld. This is causing linker failures with IAR when segger is enabled (on nrf hardware for example). Signed-off-by: Carl Eriksson Skogh --- modules/segger/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/segger/CMakeLists.txt b/modules/segger/CMakeLists.txt index ab15d7c17fc..5b3181743e2 100644 --- a/modules/segger/CMakeLists.txt +++ b/modules/segger/CMakeLists.txt @@ -13,6 +13,8 @@ if(CONFIG_USE_SEGGER_RTT) zephyr_library_sources_ifdef(CONFIG_SEGGER_SYSTEMVIEW ${SEGGER_DIR}/SEGGER/SEGGER_SYSVIEW.c) # Using sort key AAA to ensure that we are placed at start of RAM zephyr_linker_sources_ifdef(CONFIG_SEGGER_RTT_SECTION_CUSTOM RAM_SECTIONS SORT_KEY aaa segger_rtt.ld) + zephyr_linker_section_ifdef(CONFIG_SEGGER_RTT_SECTION_CUSTOM NAME "rtt_buff_data" GROUP RAM_REGION ALIGN 4 NOINPUT) + zephyr_linker_section_configure(SECTION "rtt_buff_data" INPUT "${CONFIG_SEGGER_RTT_SECTION_CUSTOM_NAME}" SYMBOLS ) endif() if(CONFIG_SEGGER_DEBUGMON)