Skip to content

Commit

Permalink
linker: arm: support CONFIG_SEGGER_RTT_SECTION_FIXED_ADDR for Cortex-M
Browse files Browse the repository at this point in the history
When CONFIG_SEGGER_RTT_SECTION_FIXED_ADDR is defined, the
".rtt_buff_data" section contains RTT control block and buffers. The
linker command/script file places this section at beginning of RAM to
allow different programs (typically bootloader and application) to
share this address and have seamless logging.

Signed-off-by: Giancarlo Stasi <[email protected]>
  • Loading branch information
giansta committed Jan 31, 2023
1 parent a777cfc commit 9c52b9e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/zephyr/arch/arm/aarch32/cortex_m/scripts/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@ SECTIONS
. = ALIGN(_region_min_align);
_image_ram_start = .;

#if defined(CONFIG_SEGGER_RTT_SECTION_FIXED_ADDR)
SECTION_DATA_PROLOGUE(_DTCM_SECTION_NAME,(NOLOAD),)
{
__rtt_buff_data_start = .;
*(.rtt_buff_data)
__rtt_buff_data_end = ALIGN(4);
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
__rtt_buff_data_size = __rtt_buff_data_end - __rtt_buff_data_start;
#endif

/* Located in generated directory. This file is populated by the
* zephyr_linker_sources() Cmake function.
*/
Expand Down

0 comments on commit 9c52b9e

Please sign in to comment.