anything running on a reflashed ESP-12E. I believe the firmware is being
flashed and loaded correctly, but doesn't seem to be running after reset. I
know that's pretty vague, so to get more concrete:
If I install the 'basic' example, the upload appears to be successful:
pi@raspberrypi:~/dev/source-code-examples/basic_example$ sudo make flash
esptool.py --port /dev/ttyUSB0 write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
esptool.py v1.2.1
Connecting...
Auto-detected Flash size: 32m
Running Cesanta flasher stub...
Flash params set to 0x0040
Writing 28672 @ 0x0... 28672 (100 %)
Wrote 28672 bytes at 0x0 in 2.5 seconds (92.0 kbit/s)...
Writing 192512 @ 0x40000... 192512 (100 %)
Wrote 192512 bytes at 0x40000 in 16.7 seconds (92.3 kbit/s)...
Leaving...
I then verify that everything uploaded properly:
pi@raspberrypi:~/dev/source-code-examples/basic_example/firmware$ sudo esptool.py read_flash 0x0000 25680 a
[...]
pi@raspberrypi:~/dev/source-code-examples/basic_example/firmware$ sudo esptool.py read_flash 0x40000 188420 b
[...]
The second chunk looks fine:
pi@raspberrypi:~/dev/source-code-examples/basic_example/firmware$ cmp b 0x40000.bin
pi@raspberrypi:
Interestingly, the first chunk has 2 bytes wrong:
pi@raspberrypi:~/dev/source-code-examples/basic_example/firmware$ cmp -l 0x00000.bin a
3 0 2
4 0 60
I reflashed, and the same 2 bytes were wrong - but with different values. Since
I'm not getting any complaint about the checksum, I suspect this is a red
herring, but I don't know enough to be sure.
I then connect to the serial port, and reset the ESP8266:
pi@raspberrypi:~/dev/source-code-examples/basic_example$ sudo miniterm.py -b 74880 /dev/ttyUSB0
--- Miniterm on /dev/ttyUSB0: 74880,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 24468, room 16
tail 4
chksum 0xee
load 0x3ffe8000, len 892, room 4
tail 8
chksum 0x21
load 0x3ffe8380, len 272, room 0
tail 0
chksum 0x3f
csum 0x3f
<hang>
I get a similar result if I build and install the 'blink' example - but with no
blinking.
Just in case there was something wrong with the way I was building, I also tried
to install the standard AT firmware:
sudo esptool.py -p /dev/ttyUSB0 -b 115200 write_flash -fm dio -fs 16m -ff 40m \
0x0000 ./bin/boot_v1.2.bin \
0x1000 ./bin/at/512+512/user1.1024.new.2.bin \
0x1fc000 bin/esp_init_data_default.bin \
0x7e000 bin/blank.bin \
0x1fe000 bin/blank.bin
<reset>
[...]
tail 4
chksum 0xcf
csum 0xcf
2nd boot version : 1.2
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size : 16Mbit
jump to run user1
<hang>
FWIW, I'm pretty sure I have the flash parameters correct:
pi@raspberrypi:~$ sudo esptool.py flash_id
esptool.py v1.2.1
Connecting...
Manufacturer: c8
Device: 4016 <--- 40MHz / 16Mbit
If this were a hardware / hookup issue, I wouldn't expect to get as far as I
have. I would expect the write/read flash to fail. At the very least, I
wouldn't expect to see this sane output from the freshly installed bootloader.
I have a second ESP-12E that is displaying exactly the same behavior. They came
in the same shipment, and I'm just swapping them out on the same breadboard, so
this doesn't conclusively rule out a hardware issue - but it does make it less
likely.
Since the first suggestions for any ESP8266 issue are almost always around
power... I'm running on a stable 3.3v breadboard power supply, and I have a
decoupling capacitor across VCC and ground right next to the chip.
I've been beating my head against this for a couple of days, so any suggestions
would be welcome.