Page 1 of 1

esptool.py and using hex format files

Posted: Wed Jul 17, 2024 8:10 pm
by agatrost1620
I have created a hex file using esptool.py using the following command:
esptool.py --chip ESP32 merge_bin --format hex -o ${CMAKE_BINARY_DIR}/22143V${CI_BUILD_TAG}R${CI_COMMIT_SHORT_SHA}.hex --flash_mode dio --flash_size 4MB 0x1000 ${CMAKE_BINARY_DIR}/bootloader/bootloader.bin 0x9000 ${CMAKE_BINARY_DIR}/partition_table/partition-table.bin 0xe000 ${CMAKE_BINARY_DIR}/ota_data_initial.bin 0x20000 ${APP_BINARY}

It shows successful, now how do I use esptool.py to flash this hex?

I have tried a few things, but none have been successful. Either I have the wrong arguments or if it does happen to load, it just flashes the hex like it is a binary file and then sends the esp32 into a boot loop.

Thank you

Re: esptool.py and using hex format files

Posted: Wed Jul 17, 2024 8:32 pm
by agatrost1620
If it is a correct hex format, write_flash will work using:
esptool.py --port /dev/ttyUSB1 write_flash --flash_mode dio --flash_size 4MB 0x0 ${CMAKE_BINARY_DIR}/22143V${CI_BUILD_TAG}R${CI_COMMIT_SHORT_SHA}.${FORMAT}