https://docs.espressif.com/projects/esp ... pp-version
Is there a way to autoincrement the version on each build with eclipse, windows?
I got it to work with some Makefile magic I found on stackoverflow:
Code: Select all
a.txt:
echo "increasing build number!"
fullflash: a.txt
python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port COM4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xd000 ${PWD_UPDATER}/build/ota_data_initial.bin 0x1000 ${PWD_UPDATER}/build/bootloader/bootloader.bin 0x10000 ${PWD_UPDATER}/build/ESP32_Updater.bin 0x90000 ${PWD}/build/ESP32_Main.bin 0x8000 ${PWD_UPDATER}/build/partitions.bin
rm fullflash
@id=`cat .build_id`; id=$$[id+1]; printf "#define BUILD_NUMBER\t\t\"%d\"\n" $$id >> $@; echo "$$id" > .build_id
thanks