Cannot (re) flash new firmware-combined.bin

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
rsuinux
Posts: 5
Joined: Tue Apr 05, 2016 2:19 pm
Location: Orion Galaxy

Cannot (re) flash new firmware-combined.bin

Post by rsuinux » Thu Apr 07, 2016 4:06 pm

Hi;
Sorry for my english. I'm new with micropython, and I have a ESP 8266-01 module (1M memory)
I managed to flash my first compiled fimrmware-combined-bin (with vagrant / virtualbox).
First test, with FTDI and external alim 3.3v : good but error with tests import pyb and test.
Ok. Y compile new version of firmware-combined.bin, but !!!!
Unable to acces my esp with same command and same connection:
[code]
python ./esptool/esptool.py -p /dev/ttyUSB0 write_flash 0x00 ./esp8266-micropython-vagrant/firmware-combined.bin -fm dio -fs 32m -ff 40m
[/code]
My tests with screen at boot with speed: 74880 baud
[code]
ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 31964, room 16
tail 12
chksum 0x52
ho 0 tail 12 room 4
load 0x3ffe8000, len 996, room 12
tail 8
chksum 0x49
load 0x3ffe83f0, len 29852, room 0
tail 12
chksum 0x1f
csum 0x1f
#0 ets_task(40210970, 31, 3ffef8a0, 4)
�q���*�nE����n=�#1 ets_task(40220250, 32, 3fff0860, 34)
#2 ets_task(4021f324, 20, 3fff05f0, 3)

SDK ver: 1.5.2(80914727) compiled @ Jan 29 2016 17:26:12
phy ver: 484, pp ver: 9.6

[/code]

My tests with screen at boot with speed: 115200 baud
[code]
rl��r��#�n������p�<����x��ǒ��p�nn��;�nĒ���b�#l`nn��܀���l���b�n��n�䎂l��8��nn����l`��#�n�$�l`�`rn|��n�����l`�~����#�n�$����nn���l`nn��܀�r����pp��<��l�b�ľ~�n���l`��#�n�rnr���;��?�lrp�n��܀�r�����8p��<��l�l��b�ľ~�n���r��#�n�$��l`�8`rn|��n�����`渎��;��?���;|������|nb���l�l�p�lp�����l8�b��#l`�don't use rtc mem data
ll��r�� �r�'b�������p��p�������p��cl`䈌�����|nb��lr���8�p������l��8�lr�ùl�Ğ����br�b� ��l����#�n�߱�n��܀ �c�n�Ď�����l������l�l`�`�ܒ��b��b����ܒ��b�b�$`nĒ���<�� l�could not find module 'boot'

>>>
MicroPython v1.6-329-g4b597a1 on 2016-04-01; ESP module with ESP8266
Type "help()" for more information.
>>> #5 ets_task(40100440, 3, 3fff9598, 4)
ets_alt_task: ets_run
q for task 2: queue: 3fff96b8, get ptr: 0, put ptr: 0, qlen: 16
q for task 3: queue: 3fff9598, get ptr: 0, put ptr: 0, qlen: 4
q for task 20: queue: 3fff05f0, get ptr: 0, put ptr: 0, qlen: 3
q for task 28: queue: 3fffa328, get ptr: 0, put ptr: 0, qlen: 10
q for task 31: queue: 3ffef8a0, get ptr: 0, put ptr: 0, qlen: 4
q for task 32: queue: 3fff0860, get ptr: 0, put ptr: 2, qlen: 34
====
scandone
no [my network] found, reconnect after 1s
reconnect
f 0, scandone
no [my network] found, reconnect after 1s
reconnect
f -180, scandone
no [my network] found, reconnect after 1s
reconnect
f r0, scandone
no [my network] found, reconnect after 1s
reconnect
.../...
[/code]
If I 'm not home, the module searches the network and I have no hand (in [my neywork] = the name of my network, modified here)
But, in my home, no problem.

So, no boot module, and no acces to flash.
I'm hopeless. My esp-01 is not bricked, but I can not re flasher.
Can you help me please?
R. Suinot.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: dont (re) flash new firmware-combined.bin

Post by deshipu » Thu Apr 07, 2016 8:39 pm

Did you forget to pull the GPIO0 down to bring your module into flashing mode?

User avatar
rsuinux
Posts: 5
Joined: Tue Apr 05, 2016 2:19 pm
Location: Orion Galaxy

Re: dont (re) flash new firmware-combined.bin

Post by rsuinux » Fri Apr 08, 2016 9:08 am

Hi,

No, I tested with
GPIO0 -> GND
and
GPIO0 -> GND
GPIO2 -> R10K -> 3.3v

Same result (for flashing)

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: dont (re) flash new firmware-combined.bin

Post by deshipu » Sat Apr 09, 2016 6:32 pm

Do you also have GPIO15 pulled down?

User avatar
rsuinux
Posts: 5
Joined: Tue Apr 05, 2016 2:19 pm
Location: Orion Galaxy

Re: dont (re) flash new firmware-combined.bin

Post by rsuinux » Sun Apr 10, 2016 5:02 pm

deshipu wrote:Do you also have GPIO15 pulled down?
In ESP8266-01, I have just GPIO0 and GPIO2 and, of cource, rt/tx/gnd/3.3v, CH_PD, RST.
My first flash of micropython work (not good, but work) but, impossible of flashing a second time.

I'm desperate

User avatar
rsuinux
Posts: 5
Joined: Tue Apr 05, 2016 2:19 pm
Location: Orion Galaxy

Re: dont (re) flash new firmware-combined.bin

Post by rsuinux » Sun Apr 10, 2016 5:30 pm

Yeee!!!! :D
After multiple attempts and connections, that's work!!!

Code: Select all

remi@unimatrice:/home/remi/sketchbook/Compilations$ ./esptool/esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00 ./esp8266-micropython-vagrant/firmware-combined.bin -fm dio -fs 32m -ff 40m
Connecting...
Erasing flash...
Took 2.13s to erase flash block
Wrote 409600 bytes at 0x00000000 in 39.6 seconds (82.7 kbit/s)...

Leaving...
For which the same problems, the connections is (in esp-01):

Code: Select all

    Rx <-------->    tx   |   GND  <-------> GND power and FTDI
3.3v <-> R=10k <-> CH_PD  |  GPIO2
                   RST    |  GPIO0 <--------> R=10k <-> GND
   3.3v <------->  VCC    |  rx <--------------> TX
power supply for VCC and CH_PD is external power ( 5v->3.3v)

Thank you for taking the time to help me .

Rémi.
Last edited by rsuinux on Mon Apr 11, 2016 10:25 am, edited 1 time in total.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: dont (re) flash new firmware-combined.bin

Post by deshipu » Sun Apr 10, 2016 8:53 pm

I'm glad you resolved it. I think it's generally impossible to break the ESP8266 by bad flashing -- unless you break the flash memory itself somehow. The boot mode selection comes before the module even looks at the flashed code, so no way you could break that. Power is, however, a common source of problems with this module, as it takes a bit more than the USB2TTL can give it.

User avatar
rsuinux
Posts: 5
Joined: Tue Apr 05, 2016 2:19 pm
Location: Orion Galaxy

Re: dont (re) flash new firmware-combined.bin

Post by rsuinux » Mon Apr 11, 2016 10:35 am

deshipu wrote:I'm glad you resolved it. I think it's generally impossible to break the ESP8266 by bad flashing -- unless you break the flash memory itself somehow. The boot mode selection comes before the module even looks at the flashed code, so no way you could break that. Power is, however, a common source of problems with this module, as it takes a bit more than the USB2TTL can give it.
Yes, the power supply is a problem. I think my problem was on two level:
1/ no Resistor in GPIO0 nor CH_PD
2/ I flashing 1 second after connecting power.

Now , I have the soft problems. But this is something else.
Thank's.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Cannot (re) flash new firmware-combined.bin

Post by pfalcon » Mon Apr 11, 2016 11:43 am

Note that official README contains troubleshooting section to give ESP8266 newbies some pointers: https://github.com/micropython/micropyt ... leshooting .
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