linker: add _image_ram_size symbol to linker symbol definitions

Add _image_ram_size symbol to linker definitions. This symbol
corresponds to the total RAM used by the image.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2023-08-21 15:37:48 -05:00 committed by Fabio Baltieri
parent e977fde7ee
commit 6be48b73bf
2 changed files with 2 additions and 0 deletions

View file

@ -133,6 +133,7 @@ extern char _flash_used[];
/* datas, bss, noinit */
extern char _image_ram_start[];
extern char _image_ram_end[];
extern char _image_ram_size[];
extern char __text_region_start[];
extern char __text_region_end[];

View file

@ -9,6 +9,7 @@
LAST_RAM_ALIGN
#endif
_image_ram_end = .;
_image_ram_size = _image_ram_end - _image_ram_start;
_end = .; /* end of image */
z_mapped_end = .;
} GROUP_NOLOAD_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)