Firmware issue
Firmware issue
I am using the Linolin NodeMCU v3 board. When I update the firmware to the current latest version, I get gibberish scrolling across the screen.
I cant upload attachments in order to show you.
However the latest version I tried to upload is:
sudo python esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 esp8266-20160907-v1.8.3-126-gdab0f31.bin --verify
Erasing the flash is the only way I can reconnect to the board after reloading an older firmware.
sudo python esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 esp8266-20160809-v1.8.3.bin --verify
The problem with this is that when I try to use the "Esp8266" getting started web page, it seems that there may be features missing, as I receive errors when trying to get some of the examples working.
I am new to this, so its not impossible that I'm at fault.
Any help/advise with info on learning how to troubleshoot/understand, as well as build firmware and learn mico/python will be greatly appreciated.
Thanking you in advance
I cant upload attachments in order to show you.
However the latest version I tried to upload is:
sudo python esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 esp8266-20160907-v1.8.3-126-gdab0f31.bin --verify
Erasing the flash is the only way I can reconnect to the board after reloading an older firmware.
sudo python esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 esp8266-20160809-v1.8.3.bin --verify
The problem with this is that when I try to use the "Esp8266" getting started web page, it seems that there may be features missing, as I receive errors when trying to get some of the examples working.
I am new to this, so its not impossible that I'm at fault.
Any help/advise with info on learning how to troubleshoot/understand, as well as build firmware and learn mico/python will be greatly appreciated.
Thanking you in advance
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Firmware issue
Try adding --flash_size=8m to your esptool command line. It's recommended for all boards with >= 1MB of Flash. The command specifies 1MB (8Mbits) and the tool will detect your actual size. It works on boards with 4MB like yours.
This is what I use on my various 4MB boards (obviously you'll need to adapt the filename):
esptool.py -p /dev/ttyUSB0 write_flash --verify --flash_size=8m 0 build/firmware-combined.bin
This is what I use on my various 4MB boards (obviously you'll need to adapt the filename):
esptool.py -p /dev/ttyUSB0 write_flash --verify --flash_size=8m 0 build/firmware-combined.bin
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Firmware issue
Thanks. That seemed to work. Ill get back to the "getting started"
Re: Firmware issue
--flash_size=8m
8m = 8 megabits = 1 megabyte
For the 4MB WeMos D1 board, I use --flash_size=32m (32Mbits = 4MBytes) and set flash mode -fm dio (dual io)
@pythoncoder If you specify -fs 8m esptool automagically increases to 32m if your flash chip supports it?
More on flash modes here:
https://nodemcu.readthedocs.io/en/dev/en/flash/
https://github.com/themadinventor/esptool#flash-modes
More about determining flash size here: http://forum.micropython.org/viewtopic.php?f=16&t=1777
If you are not sure how much flash you have, you can use esptool to get the flash id, then match it against known ids.
esptool.py flash_id
For example, on my WeMos D1 Mini:
esptool.py v1.1
Connecting...
Manufacturer: e0
Device: 4016
0xe0 is Winbond (not listed in flashchips.h?)
0x4016 is W25Q32FV https://www.winbond.com/resource-files/ ... 091613.pdf
You can find most matching ids here:
https://code.coreboot.org/p/flashrom/so ... ashchips.h
https://github.com/jhcloos/flashrom/blo ... ashchips.h
8m = 8 megabits = 1 megabyte
For the 4MB WeMos D1 board, I use --flash_size=32m (32Mbits = 4MBytes) and set flash mode -fm dio (dual io)
@pythoncoder If you specify -fs 8m esptool automagically increases to 32m if your flash chip supports it?
More on flash modes here:
https://nodemcu.readthedocs.io/en/dev/en/flash/
https://github.com/themadinventor/esptool#flash-modes
More about determining flash size here: http://forum.micropython.org/viewtopic.php?f=16&t=1777
If you are not sure how much flash you have, you can use esptool to get the flash id, then match it against known ids.
esptool.py flash_id
For example, on my WeMos D1 Mini:
esptool.py v1.1
Connecting...
Manufacturer: e0
Device: 4016
0xe0 is Winbond (not listed in flashchips.h?)
0x4016 is W25Q32FV https://www.winbond.com/resource-files/ ... 091613.pdf
You can find most matching ids here:
https://code.coreboot.org/p/flashrom/so ... ashchips.h
https://github.com/jhcloos/flashrom/blo ... ashchips.h
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Firmware issue
@pfalcon stated http://forum.micropython.org/viewtopic. ... ion#p12362 that if you specify 8m it will automatically resize for bigger boards.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Firmware issue
Is there a way to "interogate" the chips to know what their flash size and available space is? Should it display it on the chip somewhere?
Thanks for the help.
Thanks for the help.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Firmware issue
Why do we have to suffer this problem time and time again ?
As I have said repeatedly esptool should stop there and then if the file is larger than the size of the flash it (guesses or knows) it is dealing with.
Could somebody with the authority to do so please fix esptool !
(I'll have a go at the github method but suspect it is more political than technical.)
Credit to pfalcon who clearly sees there is a (closely related) problem.
https://github.com/themadinventor/esptool/issues/105
Jon
As I have said repeatedly esptool should stop there and then if the file is larger than the size of the flash it (guesses or knows) it is dealing with.
Could somebody with the authority to do so please fix esptool !
(I'll have a go at the github method but suspect it is more political than technical.)
Credit to pfalcon who clearly sees there is a (closely related) problem.
https://github.com/themadinventor/esptool/issues/105
Jon
Re: Firmware issue
I think they accept pull requests. Feel free to propose one.jms wrote: Could somebody with the authority to do so please fix esptool !
Re: Firmware issue
Done.
Jon
NEW: My first ever pull request has just been accepted
Jon
NEW: My first ever pull request has just been accepted
Last edited by jms on Thu Sep 15, 2016 8:35 am, edited 1 time in total.