summaryrefslogtreecommitdiff
path: root/ports/zephyr/modules/_boot.py
diff options
context:
space:
mode:
authorNed Konz <ned@metamagix.tech>2025-10-17 10:51:56 -0700
committerDamien George <damien@micropython.org>2025-10-22 10:24:32 +1100
commit4c11f64faa3841e2939ccf11aad618d213a236a4 (patch)
treee05fd4fa8165b565f5207594ba9a0f86076633fe /ports/zephyr/modules/_boot.py
parent7090fc5dd63bc1dcbe5470e2000ed333cb867d64 (diff)
zephyr: Add erase block size to FlashArea.areas entries.
This commit changes the values in the `FlashArea.areas` dictionary from simple integer IDs to (ID, erase-block-size) tuples. `_boot.py` was changed to use the newly available erase block size. Signed-off-by: Ned Konz <ned@metamagix.tech>
Diffstat (limited to 'ports/zephyr/modules/_boot.py')
-rw-r--r--ports/zephyr/modules/_boot.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/ports/zephyr/modules/_boot.py b/ports/zephyr/modules/_boot.py
index 5af302fad..d0ba21d3f 100644
--- a/ports/zephyr/modules/_boot.py
+++ b/ports/zephyr/modules/_boot.py
@@ -23,8 +23,7 @@ def create_flash_partition():
Return True if successful, False otherwise.
"""
if _STORAGE_KEY in FlashArea.areas:
- # TODO: get the erase block size from DTS instead of 4K.
- bdev = FlashArea(FlashArea.areas[_STORAGE_KEY], 4096)
+ bdev = FlashArea(*FlashArea.areas[_STORAGE_KEY])
retval = True
try:
vfs.mount(bdev, _FLASH)