ESP32 Download Tool Address

huynh213
Posts: 5
Joined: Tue Dec 18, 2018 4:45 pm

ESP32 Download Tool Address

Postby huynh213 » Wed Dec 19, 2018 11:23 pm

Hi,

I've been always using Arduino IDE to load firmware to my ESP32 device, but recently I need to switch over to the ESP32 Download Tool. I have a hard time to find/fill in the Bootloader and Partition Bin files and their addresses, hope someone can help provide some hints or guideline.

This is my Arduino Set Up for my custom board:
*Board: ESP32 Dev Module
*Upload Speed: 115200
*Flash frequency: 40Mhz
*Flash Mode: DIO
*Flash Size: 4MB
*Partition Scheme: Minimal SPIFFS (since I use BLE and Wifi for OTA update, which need more memory space)

For the ESP32 Download Tool (see my attached picture)

1. For the bootloader:
I did try to use bootloader_qio_40m.bin at the address 0x1000
-> I got the file from Arduino\hardware\espressif\esp32\tools\sdk\bin
-> For the address, I am not sure which one to put there so I use a random address that I found online, where other people use it.
-> I got an IO error saying the bootload is not available in the flash download tool folder.

IOError: [Errno 2] No such file or directory: u'C:\\...\\Programmer Software\\flash_download_tools_v3.6.5_0\\flash_download_tools_v3.6.5\\flash_download_tools_v3.6.5\\dl_temp/_temp_by_dltool/downloadPanel1\\bootloader_qio_40m.bin_rep'

2. For the partition:
I have min_spiffs.bin at the address 0x4000
->I used Python to generate the bin file from the min_spiffs.csv from the folder Arduino\hardware\espressif\esp32\tools\partitions
-> Same as the bootloader's address, I really don't know what to use for the partition address.

3. For my firmware:
I have the .bin file generated by Arduino, address at 0x10000. It looks like this is a valid address.


Any thoughts?

-
Attachments
Capture.JPG
Capture.JPG (266.82 KiB) Viewed 17161 times

huynh213
Posts: 5
Joined: Tue Dec 18, 2018 4:45 pm

Re: ESP32 Download Tool Address

Postby huynh213 » Fri Dec 21, 2018 1:09 am

Does anyone have a suggestion?


huynh213
Posts: 5
Joined: Tue Dec 18, 2018 4:45 pm

Re: ESP32 Download Tool Address

Postby huynh213 » Fri Dec 21, 2018 1:40 am

Hi chegewara,

I used PY to generate the partition table bin file from that min_spiffs.csv. The bin file I addressed at 0x10000 (app0) should be right, but I am not sure what addresses I should use for the Bootloader and partition table?

Also, do you know where and how I can obtain the bootloader.bin file for my application?

huynh213
Posts: 5
Joined: Tue Dec 18, 2018 4:45 pm

Re: ESP32 Download Tool Address

Postby huynh213 » Fri Dec 21, 2018 4:25 pm

Just an update though the board still doesn't work. I did also post this question on Github espressif/arduino-esp32 for more feedback.



Goal: Loading firmware to my custom board using ESP32 Download Tool.

I've been developing my code on my custom board (use ESP32-WROOM32D module) in Arduino IDE, and it loads the firmware perfectly and works great using Arduino:

For Arduino
Board: ESP32 Dev Module
Upload Speed: 115200
Flash frequency: 80Mhz
Flash Mode: DIO
Flash Size 4MB
Partition Scheme: Minimal SPIFFS (since I need more space for Wifi, BLE, and OTA libs)

For the ESP32 Bootloader:
Crystal Frequency: 40M
SPI speed: 80MHz
SPI mode: DIO
Flash size: 32Mbit
SpiAuoSet: unchecked
DonotChgBin: unchecked

For bin files

For the bootloader:
I did try to use bootloader_dio_80m.bin at the address 0x1000
-> I got the file from Arduino\hardware\espressif\esp32\tools\sdk\bin
-> For the address, I am not sure which one to put there so I use a random address that I found online, where other people use it.

For the partition:
I have min_spiffs.bin at the address 0x4000
->I used Python to generate the bin file from the min_spiffs.csv from the folder Arduino\hardware\espressif\esp32\tools\partitions
-> Same as the bootloader's address, I really don't know what to use for the partition address.

For my firmware:
I have the .bin file generated by Arduino, address at 0x10000. It looks like this is a valid address.

Some other info for reference:
--------------------------Arduino Message when successful loading firmware and board works-------
esptool.py v2.3.1
Connecting......
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, Embedded Flash
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 8MB (**I will switch my hardware module to 4MB later)
Compressed 8192 bytes to 47...

Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 65525.1 kbit/s)...
Hash of data verified.
Flash params set to 0x023f
Compressed 13696 bytes to 8946...

Writing at 0x00001000... (100 %)
Wrote 13696 bytes (8946 compressed) at 0x00001000 in 0.8 seconds (effective 134.8 kbit/s)...
Hash of data verified.
Compressed 1509936 bytes to 871891...

Writing at 0x00010000... (1 %)
.................

--------------------------Using ESP32 Download Tool, the board doesn't work-------

From the ESP32 Download Tool:

.Uploading stub...
Running stub...
Stub running...
test offset : 4096 0x1000
case ok
test offset : 16384 0x4000
case ok
test offset : 65536 0x10000
case ok
======
CONNECT BAUD: 115200
============
.Efuse CONSOLE_DEBUG_DISABLE is already burned.
Uploading stub...
Running stub...
Stub running...

Then from Arduino Serial Monitor after resetting the power

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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1324
load:0x40078000,len:7788
ho 0 tail 12 room 4
load:0x40080400,len:6448
csum err:0xd0!=0xff
ets_main.c 371
ets Jun 8 2016 00:22:57

windgo
Posts: 1
Joined: Tue Feb 26, 2019 7:26 am

Re: ESP32 Download Tool Address

Postby windgo » Tue Feb 26, 2019 7:31 am

you can modify arduino preferences --> show verbose output during upload --> checked
then upload your ESP32 firmware to ESP32
you will get a link like below:

C:\Users\logoz\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\2.6.0/esptool.exe --chip esp32 --port COM4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 C:\Users\logoz\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1/tools/partitions/boot_app0.bin 0x1000 C:\Users\logoz\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1/tools/sdk/bin/bootloader_dio_80m.bin 0x10000 C:\Users\logoz\AppData\Local\Temp\arduino_build_626737/mqtt_esp32_fine_noconfig_20190225.ino.bin 0x8000 C:\Users\logoz\AppData\Local\Temp\arduino_build_626737/mqtt_esp32_fine_noconfig_20190225.ino.partitions.bin

then your can see
0xe000 boot_app0.bin
0x0000 bootloader_dio_80m.bin
0x10000 mqtt_esp32_fine_noconfig_20190225.ino.bin
0x8000 mqtt_esp32_fine_noconfig_20190225.ino.partitions.bin

above is ESP32 flash address
then you can write a ESP32.bat to flash it by esptool.exe or another tool

Who is online

Users browsing this forum: No registered users and 34 guests