ESP32 - Flashing does not work

nathan
Posts: 2
Joined: Mon Sep 19, 2016 2:30 pm

ESP32 - Flashing does not work

Postby nathan » Mon Sep 19, 2016 2:40 pm

Hello,

I've just got a fresh off the press ESP32 developer module (yet to hit the market i presume) and and expansion board providing UART-USB. Trying to make it work at least enough to compile and upload the IDF sample application. But the flashing does not seem to work. Below are the details, the results are reproducible.

The device boots normally and runs the existing flashed program right now. I managed to connect GPIO0 to GND and got the ESP32 to boot in download mode. I get this report on UART.

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
Very happy about it, trying to run the esp tool from IDF to do some basic operations, like flash_id and reading flash, I get it to work and get decent result.

Code: Select all

>>>>>$ python /home/nathan/tools/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 flash_id
esptool.py v2.0-dev
Connecting...
Uploading stub...
Calling 4009068c
Stub running...
Manufacturer: ef
Device: 4016
But the actual flashing does not work. I get the following result:

Code: Select all

>>>>>$ python /home/nathan/tools/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 write_flash --flash_mode qio --flash_freq 40m 0x1000 /home/nathan/Projects/test-esp32-1/build/bootloader/bootloader.bin 0x10000 /home/nathan/Projects/test-esp32-1/build/app-template.bin 0x4000 /home/nathan/Projects/test-esp32-1/build/partitions_singleapp.bin
esptool.py v2.0-dev
Connecting...
Uploading stub...
Calling 4009068c
Stub running...
Attaching SPI flash...
Configuring flash size...
Erasing flash...
Took 0.01s to erase flash block
Wrote 16384 bytes at 0x00001000 in 1.4 seconds (91.0 kbit/s)...
File  md5: 190703f7d3c17e0d1ba9150fb29f0760
Flash md5: 03a74fe0d612a329564b7d1c5cb4e88e

A fatal error occurred: MD5 of file does not match data in flash!
When I disconnect the GPIO0 to boot normally, I continue to get the factory programmed program functionality. Happy to get any advice on locating the root cause of this issue.

--best rgds
Marcin

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 - Flashing does not work

Postby ESP_Sprite » Mon Sep 19, 2016 2:54 pm

You seem to have QIO mode selected. It could be that your board does not support that (for now). Can you run 'make menuconfig' and then in the serial flasher configuration menu select DIO and try again?

nathan
Posts: 2
Joined: Mon Sep 19, 2016 2:30 pm

Re: ESP32 - Flashing does not work

Postby nathan » Tue Sep 20, 2016 12:24 pm

Hi,

Thanks. The board supports QIO (I can see a status report from the originally programmed code if I boot normally).

Interestingly, we found a way forward, and it seems virtualization was the issue.

On the very same piece of hardware:
  • The above was run under Ubuntu running in VMWare 12.5 Player, hosted on Windows 10.
  • Same board - my friend tried using the ESP32 Windows download tool on Windows 7 running in Parallels VM, hosted on MacOs X, also failed to program.
  • Finally I ran the ESP32 Windows download tool directly on my PC's Windows 10, and that worked without issue.
Must be a problem with virtualization of the USB. I will try with virtualized COM port later on.

--best rgds
Marcin

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 - Flashing does not work

Postby ESP_Sprite » Wed Sep 21, 2016 9:05 am

Strange - as far as I know, virtualization can lead to timing issues, but our upload protocol isn't really timing sensitive... Anyway, glad to hear that you have managed to fix it.

Who is online

Users browsing this forum: No registered users and 49 guests