Checking firmware integrity on device

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Checking firmware integrity on device

Post by pfalcon » Fri Aug 05, 2016 12:50 pm

There was a number of reports regarding flashing problems (and other problems ensuing after it, like filesystem access problems). To approach this issue in systematic manner, we have added ability to check integrity of the firmware on a running device. All builds since yesterday should include it. To use it (from REPL):

Code: Select all

>>> import esp
>>> esp.check_fw()
size: 531788
md5: 15d5b54d75f877f29365d369073bb066
True
If the last output is "True", the MicroPython firmware is OK. If it's False, the firmware is corrupted and thus cannot function properly.

Before reporting any issue, please check the firmware integrity using the procedure above. If it's corrupted, please flash it using the official procedure described in the docs. If you get repetitive issues with firmware corruption, or initially test passes ok, but then it becomes corrupted, you likely have hardware-related FlashROM problems with your board. There're 2 known causes of FlashROM problems: 1) bad power supply (see FAQ); 2) defective Flash (e.g. production rejects), or 2nd-hand end-of-life Flash chips used on cheap boards.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

Post Reply