Espressif: fix handling of single-partition CIRCUITPY (non-CIRCUITPY_STORAGE_EXTEND) - fixes MEMENTO bug#8952
Conversation
betweek sdkconfig and circuitpython. For now there's a single check, for CIRCUITPY_STORAGE_EXTEND & CIRCUITPY_DUALBANK that require there to be an ota_1 partition.
…'s a non-STORAGE_EXTEND single partition
jepler
left a comment
There was a problem hiding this comment.
Thank you -- excellent cleanups done along the way. However, can you double check this comment you added? It's the opposite of what I understood from the discussions.
|
I tested a build from this branch successfully on the device. With this version the drive size reported to OS makes it so it will warn me that the file is too large to fit when I try pasting it if there is already other things on the drive. I also have been able to successfully use this build with a modified version of the basic camera example from learn and been able to take a few photos successfully with it. |
It doesn't look right to me and it looks like RP2040 has the same bug. I've always meant to factor out this cache code but never have... |
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 = 1andCIRCUITPY_STORAGE_EXTEND = 1if 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_ALLOCATIONmakefile 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_lbato 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.