fix(memmap): fix footprint free space calculation
Calculate the free space as the range between the
limit and the end of the memory region *_REGION_END.
Change-Id: I9cacadea2543c9f5ddaebca82344a83678cd7d55
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/tools/memory/memory/mapparser.py b/tools/memory/memory/mapparser.py
index b1a4b4c..ce4cc31 100644
--- a/tools/memory/memory/mapparser.py
+++ b/tools/memory/memory/mapparser.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Arm Limited. All rights reserved.
+# Copyright (c) 2023-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -57,7 +57,7 @@
if "start" and "length" and "end" in memory_layout[region]:
memory_layout[region]["limit"] = (
- memory_layout[region]["end"]
+ memory_layout[region]["start"]
+ memory_layout[region]["length"]
)
memory_layout[region]["free"] = (