I used S32DS to debug MAC57D54H and found that the variable was defined in the GRAM region. I checked the link file and found that it was written like this:
MEMORY {
FLASH_CONFIG : ORIGIN = 0x18f9c000, LENGTH = 16K
FLASH_CODE : ORIGIN = 0x19000000, LENGTH = 0x280000
CODE_A5 : ORIGIN = 0x19280000, LENGTH = 0x80000
GRAM : ORIGIN = 0x3F000000 + 0x100, LENGTH = 1M - 0x100 - 256K
IOP_RAM : ORIGIN = 0x3E400000, LENGTH = 32K
}
__DATA_ROM = .; /* Symbol is used by startup for data initialization */
.data : AT(__DATA_ROM)
{
. = ALIGN(4);
__DATA_RAM = .;
__data_start__ = .; /* create a global symbol at data start */
*(.data*)
__DATA_END = .;
__data_end__ = .; /* define a global symbol at data end */
} > GRAM
__DATA_END = __DATA_ROM + (__data_end__ - __data_start__);
.bss ALIGN(16) :
{
_BSS_BEGIN = .;
__bss_start__ = .;
*(.bss*) /* Zero-filled run time allocate data memory */
*(COMMON)
__bss_end__ = .;
_BSS_END = .;
} > GRAM
/* stack and heap shall be located in the same memory region */
.heap ALIGN(8):
{
__end__ = .;
PROVIDE(_end = .);
PROVIDE(end = .);
. += HEAP_SIZE;
} > GRAM
.stack ALIGN(8):
{
_stack_s = .;
. += STACK_SIZE;
_stack_e = .;
} > GRAM
In my understanding, the GRAM area is the area of 2D-ACE to display the image information, So I want to know what I should do?
Thank you!
Hi,
it looks like that this linker file is standard one for M4 core and there is no mapped SRAM for that core. All SRAM is used by A5 and M0 core. Am I right? You can check linker files for other cores in your project.
You can normally use it as it is - if you are not facing any issues. Otherwise - you need to shring SRAM from M0 or A5 core and use available memory for M4 and put there stack/heap and other stuff.
Jiri