How to flash the ESP32 ?

Alexis
Posts: 7
Joined: Mon Dec 05, 2016 7:01 am

How to flash the ESP32 ?

Postby Alexis » Tue Dec 06, 2016 2:05 am

Hello,

Is it possible to flash an ESP32 from the ESP32 DevKit (ESP32-Core-Board-V2) ?

If yes, what should be the manip ? The same as if I want to flash the ESP32-Core-Board but instead, I connect the RX / TX pin of the Dev Kit, to the RX / TX of the ESP32 ?
Then I simply Ground EN / IO pin of the ESP32 when I want to flash it ?

Thanks.

Alexis,

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: How to flash the ESP32 ?

Postby ESP_igrr » Tue Dec 06, 2016 3:32 am

Yes, that would work. Make sure you connect TX and RX the right way, and then ground GPIO0 and toggle EN before uploading. Make sure you connect EN pin of the DevKitC to ground, to keep it in reset.

Alexis
Posts: 7
Joined: Mon Dec 05, 2016 7:01 am

Re: How to flash the ESP32 ?

Postby Alexis » Tue Dec 06, 2016 4:12 am

Hello,

Thanks for your answer.

What do you mean exactly by "Make sure you connect TX and RX the right way" ?
Should I connect direclty the RXD0/TXD0 from the DevKitC to the RXD0/TXD0 of the ESP32 I want to flash ?
Or should I remove R17 / R18 from the DevKitC and then connect directly the RXD0/TXD0 of the ESP32 I want to flash to the RXD/TXD of the DevKitC ?

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: How to flash the ESP32 ?

Postby ESP_igrr » Tue Dec 06, 2016 4:39 am

I mean that you need to make sure that TXD of CP2102 on the DevKitC board goes to RXD of the ESP32 and vice versa. Or just connect them and then try swapping connection if it doesn't work.

Alexis
Posts: 7
Joined: Mon Dec 05, 2016 7:01 am

Re: How to flash the ESP32 ?

Postby Alexis » Tue Dec 06, 2016 7:38 am

Well ok, it's exactly what I've done but it does not work.
I cannot detect the ESP32 and so flash it.

I will keep working on this to figure out...

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: How to flash the ESP32 ?

Postby ESP_Angus » Tue Dec 06, 2016 8:46 pm

A useful first step is to connect any serial terminal program to the interface at 115200bps. Then reset the chip (toggle EN low then high).

If the UART flashing mode is correctly initialised, you should see this output when EN goes high:

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x6 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_FEO_V2))
waiting for download
... which means you can then run esptool.py (or make flash, or the GUI flashing tool), and get correct results.

If you see nothing, verify power, pin connections, etc. and keep trying until you see something.

If you see a similar but different message, the ESP32 is going into a different boot mode. Verify the "strapping pins" mentioned in the datasheet.

Alexis
Posts: 7
Joined: Mon Dec 05, 2016 7:01 am

Re: How to flash the ESP32 ?

Postby Alexis » Thu Dec 08, 2016 3:48 am

Hello,

Thanks for your help.
I've finally been able to flash the ESP32. It was a Hardware issue with another component at the end.

Just a last question regarging flashing the ESP32.
Is there any tool available for Mass Production yet ? Or is it still too early in the ESP32 Release ?

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: How to flash the ESP32 ?

Postby ESP_igrr » Thu Dec 08, 2016 4:03 am

There is a "FLASH_DOWNLOAD_TOOL" available for download from Espressif website. Essentially it's a GUI for esptool.py, plus some features to combine binaries and modify them before flashing.

You can also use esptool.py itself ($IDF_PATH/components/esptool_py/esptool/esptool.py). Since it is a console tool, it is fairly easy to script/automate.

Finally, the most "mass" option is to mass-program flash chips before they are soldered to the PCBs. Many component vendors offer flash mass-programming services.

nietbelangrijk
Posts: 1
Joined: Sat Sep 23, 2017 12:03 pm

Re: How to flash the ESP32 ?

Postby nietbelangrijk » Sat Sep 23, 2017 12:05 pm

What am I doing wrong? The esp32 will not boot after flashing with below parameters. But when I use the Arduino IDE I can upload working sketches.


C:\Users\peter\Downloads\ESPEasy_v2.0.0-dev12>esptool.py -p com4 -b 921600 -c auto write_flash 0x1000 ESPEasy_v2.0.0-dev12_normal_4096.bin
esptool.py v2.1
Connecting........___
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 566528 bytes to 373377...
Wrote 566528 bytes (373377 compressed) at 0x00001000 in 6.1 seconds (effective 740.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How to flash the ESP32 ?

Postby WiFive » Sun Sep 24, 2017 3:26 am

Afaik espeasy is a esp8266 firmware that won't run on esp32. Second, you have to flash a bootloader, partition table, and app to esp32.

https://esp-idf.readthedocs.io/en/lates ... notes.html

Who is online

Users browsing this forum: No registered users and 193 guests