File system problems & solutions
kjm last edited by kjm
From my own experience with 6 different GPYs & from reading the various pycom forums & GitHubs it's obvious there are issues with the file system stability. Opinion seems to be divided as to if a switch from FAT to LittleFS is worthwhile or not. What interests me most is that the GPY firmware seems very stable. It's always there, flashing it's little blue light every 4s, after it has erased my boot.py & main.py or declared them to have a syntax error after a random number of deepsleep cycles. Also all the pycom.nvs_set writes I do are always intact so the flash memory is obviously OK hardware wise.
I've seen a few posts (https://forum.pycom.io/topic/3902/frozen-modules-for-my-sipy-solved) where folks have converted libraries & other files into the same stable frozen bytecode as the firmware. Is there a way to bake my user land code (the boot.py or main.py) into this firmware too?
the windows version of this CLI
The CLI program should probably just be the same .exe file which is also the graphical thing.
According to , its default location might be
c:\Program Files (x86)\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe.
Does anybody have a link where I can download the windows version of this CLI?
andreas last edited by
What's the new command to erase flash
We have been using
pycom-fwtool-cli.exe --port COM16 erase_all
@andreas I'm running the latest updater but I don't get that dialogue box. What's the new command to erase flash with version 1.20.1.r1, I'll erase the whole thing & start again
You will be able to choose the filesystem type within the respective dialog of the Pycom Firmware Updater.
Alternatively, you might also be able to invoke this through the REPL:
import uos import pycom pycom.bootmgr(fs_type=pycom.LittleFS, reset=True) uos.fsformat("/flash")
@andreas I upgraded a GPY to try LittleFS
(sysname='GPy', nodename='GPy', release='1.20.1.r1', version='v1.11-3138a13 on 2019-10-08'
but how do I Know if it changed from FAT, does it happen automatically? All the online guides are suggesting an element of choice?
oligauc last edited by
@kjm Pycom always recommends to use the LittleFs as it is more stable and solves a lot of issues present in the Fats FS.
In the frozen folder you should have a _boot.py and a _main.py.
We have been using the module freezing process to successfully improve resilience and to reduce the startup time , see also .
We found the resources at [3,4] and the README on  helpful enough to run through that process successfully.
As outlined by @oligauc, you will have to freeze your
frozenfolder of the
esp32subdirectory . Usually, the
Customfolder is there to hold additional modules of your firmware and can also be used to carry
_main.py, if you remove them from the
Basefolder altogether, see also .
However, you might also think about restructuring your code not to reside in a single
main.pyfile but spread it out to appropriate modules for separating concerns [8,9].
Pycom always recommends to use LittleFS as it is more stable and solves a lot of issues present in FatFS.
We totally second that.
With kind regards,