Hi,
I recently updated the firmware on my pyboard (clone), and then discovered that the /flash was not reset or cleared. I think it would be a good idea to specify in the documentation for reflashing the firmware, to also include a paragraph describing how to re-initialize the /flash memory.
I am running linux mint 18, 32 bit, and my attempts to empty the trash folder on the /flash failed. The linux mint nemo software does not empty the trash folder. running under sudo does not help. /flash disappears. Is there a linux utility that allows for emptying the trash folder on the /flash drive? Does this mean that /flash is not recognized properly by linux? Or is it a user error?
I tried to reformat the /flash, using disks utility under linux. I was able to do that, however, the parameters required to reproduce the status of the drive are beyond my expertise. I ended up with a read only /flash.
Lastly, I examined the documentation, and discovered a reference to pyb.mount(), which has been deprecated and moved to uos.mount().
Does anyone know what the syntax is to execte uos.mount() to reinitialize the /flash? Perhaps there should be an uos.recreate_flash() function?
Is it best practice to avoid putting any user test code onto /flash? Should use of an sd card constitute best practice?
thanks,
Mark
best practice for erasing /flash after updating firmware
-
- Posts: 28
- Joined: Sat Jan 24, 2015 10:34 pm
- Location: vancouver/kelowna/lethbridge
Re: best practice for erasing /flash after updating firmware
Usually updates preserve the filesystem. However some updates affect the filesystem and you need to do a filesystem reset using the USR switch at reset.
Hold down USR and press RST. After releasing RST the green and yellow LEDs will count in binary. Release USR at 3 - both LEDs on. The red LED will come on for a while during the erase and format. You will see a new boot.py and main.py.
Hold down USR and press RST. After releasing RST the green and yellow LEDs will count in binary. Release USR at 3 - both LEDs on. The red LED will come on for a while during the erase and format. You will see a new boot.py and main.py.
-
- Posts: 28
- Joined: Sat Jan 24, 2015 10:34 pm
- Location: vancouver/kelowna/lethbridge
Re: best practice for erasing /flash after updating firmware
worked great! thanks!