Skip to main content
heyo
Associate III
January 16, 2023
Question

How to set linker file that frontendheap go to external SDRAM?

  • January 16, 2023
  • 1 reply
  • 1199 views

0693W00000Y8KNWQA3.pngI need an example how to tell linker that frontend store to external sdram..

This topic has been closed for replies.

1 reply

ktrofimo
Senior III
January 16, 2023

LD Script:

MEMORY
{
	FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
	. . .
	SDRAM_BANK1 (xrw) : ORIGIN = 0x60000000, LENGTH = 4M
	SDRAM_BANK2 (xrw) : ORIGIN = 0x60400000, LENGTH = 4M
	. . .
}
. . .
 .sdram_section (NOLOAD) :
 {
 . = ALIGN(8);
 *(.value)
 . = ALIGN(8);
 } >SDRAM_BANK1

C Code:

uint8_t sdram_array[SIZE] __attribute__((section (".sdram_section")));

heyo
heyoAuthor
Associate III
January 16, 2023

maybe you know where to insert this 'uint8_t sdram_array[SIZE] __attribute__((section (".sdram_section"))); that frontendheap go to sdram?

'