esptool info_image issue

pdelprat
Posts: 10
Joined: Mon Sep 04, 2017 1:37 pm

esptool info_image issue

Postby pdelprat » Wed Jan 03, 2018 3:01 pm

Hello,

Even if flashing works perfectly :

Code: Select all

python /home/pasca/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port "COM7" --baud 115200 --before "default_reset" --after "hard_reset" write_flash -z --flash_mode "dio" --flash_freq "40m" --flash_size detect 0x1000 /home/pasca/esp/TempC/build/bootloader/bootloader.bin 0x10000 /home/pasca/esp/TempC/build/hello-world.bin 0x8000 /home/pasca/esp/TempC/build/partitions_singleapp.bin
esptool.py v2.1
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 19376 bytes to 11438...
Wrote 19376 bytes (11438 compressed) at 0x00001000 in 1.0 seconds (effective 153.8 kbit/s)...
Hash of data verified.
Compressed 144064 bytes to 72004...
Wrote 144064 bytes (72004 compressed) at 0x00010000 in 6.4 seconds (effective 180.1 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 82...
Wrote 3072 bytes (82 compressed) at 0x00008000 in 0.0 seconds (effective 1621.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...
esptool info_image report always errors :

Code: Select all

$ python /home/pasca/esp/esp-idf/components/esptool_py/esptool/esptool.py image_info build/hello-world.bin
esptool.py v2.1
WARNING: Suspicious segment 0xee, length 0
WARNING: Suspicious segment 0x0, length 16777216

A fatal error occurred: End of file reading segment 0x0, length 16777216 (actual length 144040)
I hope I use it correctly :shock:

Kind regards,
Pascal

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

Re: esptool info_image issue

Postby ESP_Angus » Wed Jan 03, 2018 10:21 pm

"esptool.py image_info" can't tell if the image is ESP8266 or ESP32, and it currently defaults to ESP8266. An ESP32 image looks like an invalid ESP8266 image.

Try "esptool.py --chip esp32 image_info"

This should be made more user-friendly. I've opened an issue on github to track this: https://github.com/espressif/esptool/issues/258

Angus

pdelprat
Posts: 10
Joined: Mon Sep 04, 2017 1:37 pm

Re: esptool info_image issue

Postby pdelprat » Thu Jan 04, 2018 10:05 am

Hello,

Many thanks for your reply,
Yes, your fix works perfectly,
I was also confuse by this document :
https://github.com/espressif/esptool/wi ... age-Format
Which is related to ESP8266 only,
Where is the format definition for a ESP32 image ?

Kind regards,
Pascal

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

Re: esptool info_image issue

Postby ESP_Angus » Thu Jan 04, 2018 11:55 pm

pdelprat wrote: Which is related to ESP8266 only,
Where is the format definition for a ESP32 image ?
Correct. Unfortunately I don't believe the ESP32 format has been documented yet - the source code for esptool & in IDF is probably the closest thing.

I've added a note to the Wiki and opened a second issue for this: https://github.com/espressif/esptool/issues/260

Who is online

Users browsing this forum: No registered users and 54 guests