Linker not doing what I tell it to do. I must be speaking Klingon.
In an effort to get DMA transfers to work between the M7 core of an STM32H745 and its SPI6 interface, I want to force my buffers to go into SRAM4, which is in the same domain as SPI6. Apparently, an IDE designed specifically to program STM32's produces a barebones linker file that doesn't list anything but AXI SRAM. So I modify that file to add SRAM4 to the memory areas, like so :
SRAM4 (rw) : ORIGIN = 0x38000000, LENGTH = 64K
Since the values come from the TRM, I'm hoping they are correct. Next, I add a section which points to that new area :
.sram4 :
{
*(.sram4)
} >SRAM4
And finally, I tell everywhere where I want my buffers, for example :
__attribute__ ((section (".sram4"))) uint8_t buffer[1024];
The project compiles just fine... except it doesn't work, and when I look at the LIST file I see this :
Idx Name Size VMA LMA File off Algn
9 .sram4 00000400 20000138 0800be9c 00020138 2**2
The size is correct, but the address corresponds to DTCM.
Can somebody please explain what's going on ? What am I missing ?
SOLVED : what I was missing is I was modifying the wrong script : STM32H745ZITX_RAM.ld instead of STM32H745ZITX_FLASH.ld. A little counter-intuitive.