What files to keep from a specific revision build, and how to flash

lalleglad
Posts: 9
Joined: Tue Feb 25, 2020 1:12 pm

What files to keep from a specific revision build, and how to flash

Postby lalleglad » Thu Apr 16, 2020 1:21 pm

While in development mode, I am continuously using the command 'idf.py -p COMX flash monitor' (X=port#) at the top of my source and build tree.

I would like to regularly save specific revisions, with as few files as possible, which I may at a later time flash my device with.

So, what files do I minimum need to keep, and how do I flash those to an ESP32-WROOM-32?

While developing for the ESP32-WROOM-32 using the 'idf.py flash' command, it always compares with the source tree and builds it if changes have been made, and I would like to avoid that.
I just want to flash a device with previously made binary or binaries, if possible.

With STM32 I can keep just one .hex file and then use an ST-LINK to flash the hardware, and I would like to know the equivalent method of this on ESP32?

I am working from both Win10 and Linux platforms, but I don't suppose there are differences regarding this?

Please let me know of any pointers you may have, or feel free to ask if it is unclear?

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Re: What files to keep from a specific revision build, and how to flash

Postby gunar.kroeger » Thu Apr 16, 2020 10:42 pm

most of the times you'll have one yourproject.bin for your flash partition, you also need the partition-table.bin, bootloader.bin and sometimes ota_data_initial.bin if you are using OTA

you can program with esptool.py

Code: Select all

esptool.py --chip esp32 -p ${config:idf.port} -b ${config:idf.baudRate} --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xd000 build/ota_data_initial.bin 0x1000 build/bootloader/bootloader.bin 0x10000 build/yourproject.bin 0x8000 build/partition_table/partition-table.bin"
there is also a flasher tool ESPFlashDownloadTool, that you can setup to flash your binaries without cmd
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

lalleglad
Posts: 9
Joined: Tue Feb 25, 2020 1:12 pm

Re: What files to keep from a specific revision build, and how to flash

Postby lalleglad » Fri Apr 17, 2020 8:49 am

Thank you for the pointers, that was helpful.

Copying all the mentioned .bin files to the same folder, I was able to flash it with this command:

esptool.py --chip esp32 -p COM14 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 partition-table.bin 0x90000 ota_data_initial.bin 0x1000 bootloader.bin 0x10000 my_app.bin

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: What files to keep from a specific revision build, and how to flash

Postby ESP_Sprite » Fri Apr 17, 2020 11:12 am

Do note that 'idf.py build' also spits out the exact command line needed to flash the program (it's effectively the command it executes when you run 'idf.py flash'.) Backup that and the files mentioned there and you should be good.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: What files to keep from a specific revision build, and how to flash

Postby ESP_igrr » Sat Apr 18, 2020 7:22 am

One more thing, the build systems produces some metadata files with flashing information. Please check https://docs.espressif.com/projects/esp ... -arguments

Who is online

Users browsing this forum: Google [Bot] and 91 guests