Page 1 of 1

MicroPython can't boot up

Posted: Fri Sep 08, 2017 6:13 am
by アルト
I flashed binary file with Espressif flash write tool(flash_download_tools_v3.4.9.2_0.zip). But MicroPython cant't boot.
I got flollowing message repeating.
I tried esptool. but resualt was same.
Binary file is this : esp32-20170907-v1.9.2-269-g5311cc76.bin

------------------------------------
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:QIO, clock div:2
load:0x3fff0008,len:8
load:0x21323063,len:276250785
1162 mmu set 00010000, pos 00010000
1162 mmu set 00020000, pos 00020000
1162 mmu set 00030000, pos 00030000
1162 mmu set 00040000, pos 00040000
1162 mmu set 00050000, pos 00050000
1162 mmu set 00060000, pos 00060000
1162 mmu set 00070000, pos 00070000
1162 mmu set 00080000, pos 00080000

Re: MicroPython can't boot up

Posted: Sat Sep 09, 2017 5:03 am
by pythoncoder
How did you invoke esptool?

In the following you may need to change the port to suit your system.
First erase the flash:
esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
Then try the following:
esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20170907-v1.9.2-269-g5311cc76.bin

Re: MicroPython can't boot up

Posted: Sat Sep 09, 2017 8:57 am
by アルト
Than you replay pythoncoder.

I tried flash write with esptool today. so, resualt was same. Can't boot up.
python esptool.py --chip esp32 --port COM5 write_flash -z 0x1000 esp32-20170909-v1.9.2-270-g14fb53e0.bin

But, I found OK case. It is to add "--flash_mode dio".
python esptool.py --chip esp32 --port COM5 write_flash --flash_mode dio -z 0x1000 esp32-20170909-v1.9.2-270-g14fb53e0.bin
^^^^^^^^^^^
Boot up message:
-------------------
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
^^^
load:0x3fff0008,len:8
load:0x3fff0010,len:3408
load:0x40078000,len:9488
load:0x40080000,len:252
---------------------

I tried --flash mode qio. It is NG.
It is look like Micropython-esp32 issue (Current ESP32 image (esp32-20170731...) boot failure #147 )
I changed the byte manually to 00 that it looks like this: E9 04 02 20 xx xx xx xx 00 00
It is Boot up OK.

Boot up message
------------------------
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:QIO, clock div:2
^^^
load:0x3fff0008,len:8
load:0x3fff0010,len:3472
load:0x40078000,len:7804
load:0x40080000,len:252
entry 0x40080034
------------------------

Original ESP32 Micropython don't work SPI qio mode?

Re: MicroPython can't boot up

Posted: Sun Sep 10, 2017 8:34 am
by pythoncoder
The esptool invocation I quoted was from the official docs and I've just re-checked that it works with my hardware (Espressif ESP-WROOM-32). So I can see two options:
  • Your issue is hardware related.
  • You don't have the latest version of esptool. Mine is esptool.py v2.1-beta1.
I'd check the version first.

Re: MicroPython can't boot up

Posted: Sun Sep 10, 2017 10:22 am
by Roberthh
If I just look of which options "make deploy" is doing, I get:

Code: Select all

esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z --flash_mode dio --flash_freq 40m 0x1000 build/firmware.bin
So I assume that --flash_mode dio is be used as default. But that may depend on the respective board.

Re: MicroPython can't boot up

Posted: Sun Sep 10, 2017 1:07 pm
by アルト
My esptool.py was rev. 2.0. so,I tried flash write by new esptool.py(rev.2.1).
It was good!!

I seem flash mode default was changed. (qio -> dio)
It is saying that this can't work my ESP-WROOM-32 device by a QIO mode, right?.

Re: MicroPython can't boot up

Posted: Sun Sep 10, 2017 5:46 pm
by pythoncoder
Perhaps the new esptool can auto-detect the correct settings for the chip?

Re: MicroPython can't boot up

Posted: Fri Jan 18, 2019 5:21 pm
by HerbV
pythoncoder wrote:
Sat Sep 09, 2017 5:03 am
How did you invoke esptool?

In the following you may need to change the port to suit your system.
First erase the flash:
esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
Then try the following:
esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20170907-v1.9.2-269-g5311cc76.bin
Thank you very much for that post.
It made my day!

Tx, Herbert