Page 1 of 1

Append an incremented version/build number to compiled firmware binary name

Posted: Thu Oct 03, 2019 3:08 pm
by AloyseTech
Hi,

I would like my binary executable firmware to have the version and build number appended to the filename automatically. How can I do that?

For example, if I have a project "myProject", currently the binary generated is always "myProject.bin". I would like to append a version (which is defined using the Kconfig.projbuild) and a build number automatically incremented at each build.

Is there a way to do this using the current build system?

Thanks for your help :)

Re: Append an incremented version/build number to compiled firmware binary name

Posted: Thu Oct 03, 2019 4:50 pm
by PeterR
Well calling 'make app' from a script would be easy enough! (and then on completion rename).
Where do you propose to get the version information from?
ESP seem to work on the principle that we are using release branches and so the branch name contains the version plus minor as hash.
In this case 'git describe' gives you the renaming details.

Re: Append an incremented version/build number to compiled firmware binary name

Posted: Fri Oct 04, 2019 12:08 pm
by AloyseTech
I was hoping for a way to use the current cmake build system to do it.
I'm getting the version from the generated sdkconfig.h (it is set using menuconfig). I could also use the sdkconfig.json intermediate file.

Re: Append an incremented version/build number to compiled firmware binary name

Posted: Sat Oct 05, 2019 10:13 am
by rudi ;-)
AloyseTech wrote:
Thu Oct 03, 2019 3:08 pm
Hi,

I would like my binary executable firmware to have the version and build number appended to the filename automatically. How can I do that?

For example, if I have a project "myProject", currently the binary generated is always "myProject.bin". I would like to append a version (which is defined using the Kconfig.projbuild) and a build number automatically incremented at each build.

Is there a way to do this using the current build system?

Thanks for your help :)
hi

can i ask you which environment you use? ( windows, linux, mac )
which build tool ( gnu make, cmake ) ?

best wishes
rudi ;-)

Re: Append an incremented version/build number to compiled firmware binary name

Posted: Sun Oct 06, 2019 10:34 am
by rudi ;-)
AloyseTech wrote:
Fri Oct 04, 2019 12:08 pm
I was hoping for a way to use the current cmake build system to do it.
I'm getting the version from the generated sdkconfig.h (it is set using menuconfig). I could also use the sdkconfig.json intermediate file.
I was hoping to get an answere from you what you want do exactly in which environment and tools.
So i did not know exactly how i can help you - so i started simply
perhabs you find next weeks time for an answere and i will try to find time for this again.
At this saturday (05 Oct 2019 ) i did start an Auto-Incrementing-Build-Number Component ,
it can used in every way ( GNU Make, CMake ) and is waiting for you and your Test :)
but now you have to wait for me to come over again ( find time ) this thread :)
Auto Incrementing Build Number ( with History, Database and so on ) is done since sunday 06.10.2019
and work like a charme to me, will try to investigate small time to build an eclipse plugin for it perhabs.

best wishes
rudi ;-)

Re: Append an incremented version/build number to compiled firmware binary name

Posted: Sun Oct 06, 2019 11:51 am
by AloyseTech
I'm one windows and I use the CMake build system. Do you plan to put your component on github?