App Version in DROM management

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

App Version in DROM management

Postby gunar.kroeger » Tue Apr 30, 2019 2:08 pm

I have found that there is a location for storing app version inside an esp-idf structure:
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
  
The problem is that every time I build, it changes the build number and takes foreeeeever to build. So is there another way to achieve autoincrementing version number x in "A.B.C.x" without impacting build time?

thanks
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot], Rckyan and 118 guests