Skip to content

Commit 85a4dd9

Browse files
committed
build_memory_info: Drop support for old FLASH region name
This led to incorrect results about free memory in the stm and i.mx ports
1 parent 6f6dc83 commit 85a4dd9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tools/build_memory_info.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
with open(sys.argv[1], "r") as f:
5353
for line in f:
5454
line = line.strip()
55-
if line.startswith(("FLASH_FIRMWARE", "FLASH", "RAM")):
55+
if line.startswith(("FLASH_FIRMWARE", "RAM")):
5656
regions[line.split()[0]] = line.split("=")[-1]
5757

5858
for region in regions:
@@ -63,11 +63,7 @@
6363
space = M_PATTERN.sub(M_REPLACE, space)
6464
regions[region] = int(eval(space))
6565

66-
# TODO Remove check for both FLASH_FIRMWARE and FLASH after all ports are converted to use FLASH_FIRMWARE.
67-
try:
68-
firmware_region = regions["FLASH_FIRMWARE"]
69-
except KeyError:
70-
firmware_region = regions["FLASH"]
66+
firmware_region = regions["FLASH_FIRMWARE"]
7167
ram_region = regions["RAM"]
7268

7369
free_flash = firmware_region - text - data

0 commit comments

Comments
 (0)