Forum Discussion
Altera_Forum
Honored Contributor
21 years ago"__attribute__((section(".SDRAM")))" problem
Hi all, I'm trying to allocate a buffer in SDRAM using the declaration: volatile int buff1_app[1280] __attribute__((section(".SDRAM"))); in SOPC i've defined a SDRAM controller n...
Altera_Forum
Honored Contributor
21 years agoIf you check your linker script (generated.x) you should find the section:
.sdram :
{
PROVIDE (_alt_partition_sdram_start = ABSOLUTE(.));
*(.sdram .sdram.*)
. = ALIGN(32 / 8);
PROVIDE (_alt_partition_sdram_end = ABSOLUTE(.));
_end = ABSOLUTE(.);
end = ABSOLUTE(.);
} > sdram The symbol end is used for the start of the heap, and the above linker fragment will ensure that it is immediately after anything placed into the .sdram section. You can easily check that this really works by calling malloc() and checking that the returned address isn't within your array.