Hello all,
I found the answer in the IAR documentation. Hope it would be helpful to someone in future
RESERVING SPACE IN RAM
Often, an application must have an empty uninitialized memory area to be used for
temporary storage, for example a heap or a stack. It is easiest to achieve this at link time.
You must create a block with a specified size and then place it in a memory.
In the linker configuration file, it can look like this:
define block TempStorage with size = 0x1000, alignment = 4 { };
place in RAM { block TempStorage };
To retrieve the start of the allocated memory from the application, the source code could
look like this:
/* Define a section for temporary storage. */
#pragma section = "TEMPSTORAGE"
char *GetTempStorageStartAddress()
{
/* Return start address of section TEMPSTORAGE. */
return __section_begin("TEMPSTORAGE");
}