Espressif: fix handling of single-partition CIRCUITPY (non-CIRCUITPY_STORAGE_EXTEND) - fixes MEMENTO bug #8952
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
supervisor_flash_write_blocks()
to write instead of read when handling a single firmware partition (thanks @jepler).adafruit_esp32s3_camera/mpconfigboard.mk
(MEMENTO)to use proper setting name for partition file.CIRCUITPY_DUALBANK = 1
andCIRCUITPY_STORAGE_EXTEND = 1
if there is only one firmware partition. Thanks @jepler for initial version of validation script.Also, some cleanups of harmless obsolete things, encountered while debugging, which are unrelated to this bug.
*SUPERVISOR_ALLOCATION
makefile settings.circuitpy_mpconfig.h
.After loading this firmware, and doing
storage.erase_filesystem()
, the MEMENTO will have a proper CIRCUITPY filesystem (tested). Formerly it was too big.While debugging this, @jepler came across this code:
circuitpython/ports/espressif/supervisor/internal_flash.c
Lines 154 to 157 in 499cc01
We are unsure whether this code is setting
_cache_lba
to the right value.@tannewt if you remember this code, could you take a look? But this code was present before CIRCUITPY_DUALBANK and CIRCUITPY_STORAGE_EXTEND were present.