Burn ELF to ESP32

tatulea
Posts: 18
Joined: Wed Feb 06, 2019 12:39 pm

Burn ELF to ESP32

Postby tatulea » Wed Sep 25, 2019 2:03 pm

Hi,

I want to create an automated firmware update via the USB cable. I have a Python script that connects to my ESP serial port. The ESP will send its app_elf_sha256 and Python compares it with the one that a specific .elf file has. If it is different, it means that there should be an update. The problem is that I don't know how to burn this ELF file.

I know that I can use "python /home/xxx/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /home/xxx/esp/myapp/build/bootloader/bootloader.bin 0x10000 /home/xxx/esp/myapp/build/myapp.bin 0x8000 /home/xxx/esp/myapp/build/partitions_singleapp.bin", but there is no .elf file.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Burn ELF to ESP32

Postby Ritesh » Wed Sep 25, 2019 5:54 pm

tatulea wrote:
Wed Sep 25, 2019 2:03 pm
Hi,

I want to create an automated firmware update via the USB cable. I have a Python script that connects to my ESP serial port. The ESP will send its app_elf_sha256 and Python compares it with the one that a specific .elf file has. If it is different, it means that there should be an update. The problem is that I don't know how to burn this ELF file.

I know that I can use "python /home/xxx/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /home/xxx/esp/myapp/build/bootloader/bootloader.bin 0x10000 /home/xxx/esp/myapp/build/myapp.bin 0x8000 /home/xxx/esp/myapp/build/partitions_singleapp.bin", but there is no .elf file.
Hello,

I believe you can not directly burn elf file into ESP32 device. So, You first have to create binary file using xtensa toolchain utility to create that binary file with library dependecies as well. Then you can directly flash that binary file into appropriate locations.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 411 guests