Need help using ESP32 flash download tool

zazas321
Posts: 231
Joined: Mon Feb 01, 2021 9:41 am

Need help using ESP32 flash download tool

Postby zazas321 » Tue Sep 14, 2021 5:06 am

Hello. I am looking for the most simple method or tool for the customer to flash the ESP32 devices. Ideally, he would need to run a script or some sort of tool that will do everything for him so that it is as simple as possible, he would only need to provide the binary file.
I am now looking into ESP32 flash download tool but I am not fully understanding how to use it. In my project, I am using a custom partition table:

Code: Select all

nvs,      data, nvs,     0x9000,  0x4000,
otadata,  data, ota,     0xd000,  0x2000,
phy_init, data, phy,     0xf000,  0x1000,
factory,  app,  factory, 0x10000,  0x0F0000,
ota_0,    app,  ota_0,           , 0x0F0000
ota_1,    app,  ota_1,           , 0x0F0000,
storage,  data, spiffs,          , 0x4000,
I use OTA and SPIFFS. Could someone please give me a hand and explain to me how do I program a device using a flash download tool?

chegewara
Posts: 2371
Joined: Wed Jun 14, 2017 9:00 pm

Re: Need help using ESP32 flash download tool

Postby chegewara » Tue Sep 14, 2021 7:13 am

It all depends how you build binaries. When you are working with esp-idf and build with "idf.py build" then after success build you can see output similar to this (its from linux):

Code: Select all

/home/chegewara/.espressif/python_env/idf4.4_py3.8_env/bin/python ../../../components/esptool_py/esptool/esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32c3 --no-stub write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/hello-world.bin
1) from this output you can learn what binary flash at what offset using espressif flash download tool (windows):
https://www.espressif.com/en/support/do ... ther-tools
1a) or you can learn offsets from partition table, simple math,

2) You can also write script for client that will use esptool (any OS):
https://github.com/espressif/esptool

3) esp32 S2 can be easy flashed from some special website and DFU binary generated with idf.py dfu (any OS and chrome browser)

Who is online

Users browsing this forum: martins and 86 guests