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?
What files to keep from a specific revision build, and how to flash
- 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
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
there is also a flasher tool ESPFlashDownloadTool, that you can setup to flash your binaries without cmd
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"
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."
Re: What files to keep from a specific revision build, and how to flash
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
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
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: What files to keep from a specific revision build, and how to flash
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.
Re: What files to keep from a specific revision build, and how to flash
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: No registered users and 86 guests