MicroPython can't boot up

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
アルト
Posts: 3
Joined: Fri Sep 08, 2017 6:09 am

MicroPython can't boot up

Post by アルト » Fri Sep 08, 2017 6:13 am

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

User avatar
pythoncoder
Posts: 3501
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: MicroPython can't boot up

Post by pythoncoder » 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
Peter Hinch

アルト
Posts: 3
Joined: Fri Sep 08, 2017 6:09 am

Re: MicroPython can't boot up

Post by アルト » Sat Sep 09, 2017 8:57 am

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?

User avatar
pythoncoder
Posts: 3501
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: MicroPython can't boot up

Post by pythoncoder » Sun Sep 10, 2017 8:34 am

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.
Peter Hinch

User avatar
Roberthh
Posts: 1514
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: MicroPython can't boot up

Post by Roberthh » Sun Sep 10, 2017 10:22 am

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.

アルト
Posts: 3
Joined: Fri Sep 08, 2017 6:09 am

Re: MicroPython can't boot up

Post by アルト » Sun Sep 10, 2017 1:07 pm

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?.

User avatar
pythoncoder
Posts: 3501
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: MicroPython can't boot up

Post by pythoncoder » Sun Sep 10, 2017 5:46 pm

Perhaps the new esptool can auto-detect the correct settings for the chip?
Peter Hinch

HerbV
Posts: 3
Joined: Sat Oct 27, 2018 1:33 pm

Re: MicroPython can't boot up

Post by HerbV » Fri Jan 18, 2019 5:21 pm

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

Post Reply