summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glennbakke@gmail.com>2020-12-13 22:03:18 +0100
committerDamien George <damien@micropython.org>2021-08-08 23:09:26 +1000
commit3b594f7b27881818645a52d7aa9469c97ef10ecf (patch)
tree7c40734aad9814b8b26bbff39c2cec04f5b5161e
parentf834fef6bbd28e31d8e5c04dc2092886b162fe89 (diff)
nrf/boards/common.ld: Calculate unused flash region.
Calculate the unused flash area on the target device. The values will be exposed by _unused_flash_start and _unused_flash_length. The start address and the length are not aligned to either word or pages.
-rw-r--r--ports/nrf/boards/common.ld2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/nrf/boards/common.ld b/ports/nrf/boards/common.ld
index d2e5eef76..866336fa0 100644
--- a/ports/nrf/boards/common.ld
+++ b/ports/nrf/boards/common.ld
@@ -81,3 +81,5 @@ SECTIONS
/* Define heap and stack areas */
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_estack = ORIGIN(RAM) + LENGTH(RAM);
+_unused_flash_start = (_sidata + (_edata - _sdata));
+_unused_flash_len = (ORIGIN(FLASH_TEXT) + LENGTH(FLASH_TEXT)) - _unused_flash_start;