arch: arm: Add symbol for flash used
Add symbol which contains the number of bytes contained in the image. Using '_image_rom_end' will not work, as there are symbols loaded after its value. Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
This commit is contained in:
parent
35a95a9b2f
commit
d85efe0b10
2 changed files with 12 additions and 0 deletions
|
@ -518,4 +518,13 @@ SECTIONS
|
||||||
KEEP(*(.gnu.attributes))
|
KEEP(*(.gnu.attributes))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Must be last in romable region */
|
||||||
|
SECTION_PROLOGUE(.last_section,(NOLOAD),)
|
||||||
|
{
|
||||||
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||||
|
|
||||||
|
/* To provide the image size as a const expression,
|
||||||
|
* calculate this value here. */
|
||||||
|
_flash_used = LOADADDR(.last_section) - _image_rom_start;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,6 +233,9 @@ extern char _image_rom_start[];
|
||||||
extern char _image_rom_end[];
|
extern char _image_rom_end[];
|
||||||
extern char _image_rom_size[];
|
extern char _image_rom_size[];
|
||||||
|
|
||||||
|
/* Includes all ROMable data, i.e. the size of the output image file. */
|
||||||
|
extern char _flash_used[];
|
||||||
|
|
||||||
/* datas, bss, noinit */
|
/* datas, bss, noinit */
|
||||||
extern char _image_ram_start[];
|
extern char _image_ram_start[];
|
||||||
extern char _image_ram_end[];
|
extern char _image_ram_end[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue