In my cube project, I need to generate a bin file as the output. The output bin file is over 2GB because it includes a RAM section (0x30000000) in the output as well as the required flash section (0x90000000)
The linker script has the following section, which I believe to be the culprit:
.dma_buffer :
{
*(.dma_buffer)
. = ALIGN(4);
} >RAM_D2
and this is the memory definition:
MEMORY
{
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
SDRAM (xrw) : ORIGIN = 0xD0000000, LENGTH = 8M
FLASH (xrw) : ORIGIN = 0x90000000, LENGTH = 2048K
ASSETS_FLASH (r) : ORIGIN = 0x90200000, LENGTH = 62M
}
How can I modify this linker script to exclude the 0x30000000 region from the output file?
I seem to have fixed this by adding (NOLOAD) to this section:
.dma_buffer (NOLOAD) :
{
. = ALIGN(4);
*(.dma_buffer)
. = ALIGN(4);
} >RAM_D2
Let me know if anybody has more insight into this.