Hi,
I want, at link time, to allocate automatically all the free remaining RAM memory to a special section to be used as a custom memory pool that adapts its size to the size of unused memory. I tried some SPC arithmetic but I'm not able to work it out.
Something like:
#define RAM_SIZE (512*1024*1024) //512M (EVM)
MEMORY { .... RAM: o=0x80000000, l=RAM_SIZE }
SECTIONS
{
...
GROUP
{
.data
...
.sysmem
.my_memory_pool: align(0x100), type=NOINIT
{
my_memory_pool_begin = . ;
. += END(RAM) - my_memory_pool_begin ; // error: my_memory_pool_begin undefined!!
}
} > RAM
}
I tried also with SIZE(RAM) and literal values but I get always some errors.