AnsweredAssumed Answered

the variable was defined in the GRAM region

Question asked by 健鹏 王 on Mar 7, 2018
Latest reply on Mar 8, 2018 by Jiri Kral

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!

Outcomes