Install is failing

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Install is failing

Post by pythoncoder » Sun Aug 06, 2017 5:11 am

I have an Espressif ESP32-DEVKITC with ESP-WROOM-32. I've got esptool v2.1-beta1.

Code: Select all

esptool.py --chip esp32 flash_id
reports "Detected flash size: 4MB"
So I ran:

Code: Select all

esptool.py --chip esp32 erase_flash
esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 write_flash -z --flash_mode dio --verify --flash_freq 40m --flash_size 4MB 0 esp32-20170806-v1.9.1-394-g79feb956.bin
Both appeared to run successfully, with the verify reporting success. However the serial terminal produces

Code: Select all

>ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>
What am I doing wrong?
Peter Hinch
Index to my micropython libraries.

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

Re: Install is failing

Post by Roberthh » Sun Aug 06, 2017 7:05 am

Hi Peter, I think the flashing address was moved to 0x1000. You may look into the Makefile.

Code: Select all

deploy: $(BUILD)/firmware.bin
        $(ECHO) "Writing $^ to the board"
        $(Q)$(ESPTOOL) --chip esp32 --port $(PORT) --baud $(BAUD) write_flash -z --flash_mode $(FLASH_MODE) --flash_freq $(FLASH_FREQ) 0x1000 $^

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

Re: Install is failing - FIXED

Post by pythoncoder » Sun Aug 06, 2017 10:48 am

Thanks, Robert. Worked first time. 460800 baud seems reliable too, unlike the ESP8266.

The connection behaviour seems to differ from the ESP8266 in that after a power cycle it forgets the network details. Is there a FAQ anywhere for people coming from ESP8266 to ESP32? This might save me asking a load of dumb questions ;)
Peter Hinch
Index to my micropython libraries.

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

Re: Install is failing

Post by Roberthh » Sun Aug 06, 2017 12:09 pm

after a power cycle it forgets the network details
That#s what I noticed too. I not know of such a FAQ you are asking for. Generally, the ESP32 port does not implement everything available for ESP8266, but has also additions, like the bluetooth section. And by far not everything supported by the chip and esp-idf is available in python.
There are a few branches of this ESP32 port which evolve fast, and sometimes away from the actual master, like the one of @loboris, which is very interesting, but for my impression almost impossible to merge back.

EasyRider
Posts: 94
Joined: Wed Dec 30, 2015 8:17 am

Re: Install is failing

Post by EasyRider » Mon Aug 07, 2017 10:56 am

Daily build ESP32 firmware is not installing on ESP-WROOM-32 using esptool. This is only happening with firmware built during last few days or so. Previous builds are OK
  • esp32-20170807-v1.9.1-394-g79feb956.bin (latest)
After install, rolling error message:

Flash read error 1000, Falling back to command interpreter.

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

Re: Install is failing

Post by Roberthh » Mon Aug 07, 2017 12:56 pm

The flash target address has changed from 0 to 0x1000. Did you change that?
Better do a flash erase and then re-flash at 0x1000.

EasyRider
Posts: 94
Joined: Wed Dec 30, 2015 8:17 am

Re: Install is failing

Post by EasyRider » Mon Aug 07, 2017 1:26 pm

Thanks Robert,
Yes, clean erased and tried 0x1000 offset as you stated in earlier post but no go.
Have tried yesterday's and today's build with no success.

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

Re: Install is failing

Post by Roberthh » Mon Aug 07, 2017 1:59 pm

Did you flash with flash_mode=dio ? If you use the Makefile, that`s the default.

EasyRider
Posts: 94
Joined: Wed Dec 30, 2015 8:17 am

Re: Install is failing

Post by EasyRider » Mon Aug 07, 2017 9:26 pm

Thanks Robert,
flash_mode=dio


This did the trick, works fine now.
esptool.py --port COM13 --baud 460800 write_flash --flash_mode dio --flash_size=detect 0x1000 esp32-20170807-v1.9.1-394-g79feb956.bin

Post Reply