RTTHREAD_SEGGER_TOOL icon indicating copy to clipboard operation
RTTHREAD_SEGGER_TOOL copied to clipboard

GCC how to set segger_rtt to const address

Open supperthomas opened this issue 3 years ago • 1 comments

https://stackoverflow.com/questions/4067811/how-to-place-a-variable-at-a-given-absolute-address-in-memory-with-gcc

supperthomas avatar Oct 20 '22 08:10 supperthomas

#define YOUR_ADDR 0x0800C800
#define __INT_TO_STR(x) #x
#define INT_TO_STR(x) __INT_TO_STR(x)
const uint8_t R_CodeVerify[24] __attribute__((section(".bss.ARM.__at_" INT_TO_STR(YOUR_ADDR))));

supperthomas avatar May 14 '25 07:05 supperthomas