STM32H7~How to allocate arrays to a certain location
I tried adding this to the linker file
/* used by the startup to initialize data */
_sidata_RAM_D3 = LOADADDR(.data_RAM_D3);
/* Initialized data sections goes into RAM_D3, load LMA copy after code */
.data_RAM_D3 :
{
. = ALIGN(4);
_sdata_RAM_D3 = .; /* create a global symbol at data start */
*(.data_RAM_D3) /* .data sections */
*(.data_RAM_D3*) /* .data* sections */
. = ALIGN(4);
_edata_RAM_D3 = .; /* define a global symbol at data end */
} >RAM_D3 AT> FLASH
/* Uninitialized data section */
. = ALIGN(4);
.bss_RAM_D3 :
{
/* This is used by the startup in order to initialize the .bss secion */
_sbss_RAM_D3 = .; /* define a global symbol at bss start */
__bss_start__ = _sbss_RAM_D3;
*(.bss_RAM_D3)
*(.bss_RAM_D3*)
*(COMMON)
. = ALIGN(4);
_ebss_RAM_D3 = .; /* define a global symbol at bss end */
__bss_end__ = _ebss_RAM_D3;
} >RAM_D3
.RAM_D3 : { *(.RAM_D3) } >RAM_D3 AT> FLASH
Then tried array[16] __attribute__((section(".RAM_D3"))), this is from an example. Every time I run the code, the location never changes from 0x2xxxxxxx, I know about data coherence. but shouldn't it be displaying an address in the range of RAM3?