-
Notifications
You must be signed in to change notification settings - Fork 220
Conversation
Thanks for the contribution. A few things:
|
I've tested the changes for couple of days with simple write/append/read/verify procedures, with file sizes from 1 byte to 1 MB. I'm also using the wear leveling driver with an application written in C/esp-idf for more than two months, without any problem. flash_sec_size() should be used in flashbdev.py (SEC_SIZE = esp.flash_sec_size()), I'll change it. I've also tested SPIFFS on ESP32 and I think it is far better choice for file system on Flash. I have it (almost) working with MicroPython (I have some problems integrating it into VFS). More details on wear leveling driver is available here. |
Thanks for the info. I tested the patch and it indeed works well. The two main things to consider are:
|
…ort.h Added RTC Class to machine module: Added new methods to machine module: Changed 'fatfsport.c' so that the correct timestamps are set on file change/create Added sdcard driver which uses esp-idf sdmmc driver. Added Makefile option to start esp-idf monitor (terminal emulator) Added options to stay in bootloader after 'erase' and 'deploy' Added simple bash script to make MicroPython build proces easier
Configuration options for wear leveling driver are added to mpconfigport.h. Some additional changes more or less related to FAT file system: Changed fatfsport.c so that the correct timestamps are set on file change/create Added RTC Class to machine module: Methods: Added new methods to machine module:
Added sdcard driver which uses esp-idf sdmmc driver. If this driver is enabled is controled with mpconfig.h option MICROPY_SDMMC_USE_DRIVER Usage:
If optional 'automount' parameter is used the card will be automaticaly mounted on /sd
Some Makefile changes Added simple bash script to make MicroPython build proces easier |
should work now as expected
Sorry but I can't accept the additional commits made to this PR. First, the usual way we do things is that a single PR should be for a single bit of added functionality, so this PR should have just the wear-levelling mods. Second, there's no way that GPL licensed code can be added because it clashes with the MIT license. If you want to make progress here then 1) remove the changes unrelated to wear levelling; 2) open other PRs for the additional changes (as long as they don't involve GPL code, or code that is in any way connected to GPL code). |
OK, thank you, I'll try do do it the right way, |
This is a rework of loboris' wear leveling patch micropython/micropython-esp32#126 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
This is a rework of loboris' wear leveling patch micropython/micropython-esp32#126 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
esp-idf offers wear leveling driver which can greatly decrease the danger of wearing the flash with frequent writes.
Here are the changes needed to enable it in MicroPython.