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

AloyseTech
Posts: 22
Joined: Mon Jul 22, 2019 2:29 pm

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

Postby AloyseTech » 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 :)

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

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

Postby PeterR » Thu Oct 03, 2019 4:50 pm

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.
& I also believe that IDF CAN should be fixed.

AloyseTech
Posts: 22
Joined: Mon Jul 22, 2019 2:29 pm

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

Postby AloyseTech » 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.

User avatar
rudi ;-)
Posts: 1728
Joined: Fri Nov 13, 2015 3:25 pm

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

Postby rudi ;-) » Sat Oct 05, 2019 10:13 am

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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1728
Joined: Fri Nov 13, 2015 3:25 pm

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

Postby rudi ;-) » Sun Oct 06, 2019 10:34 am

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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

AloyseTech
Posts: 22
Joined: Mon Jul 22, 2019 2:29 pm

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

Postby AloyseTech » Sun Oct 06, 2019 11:51 am

I'm one windows and I use the CMake build system. Do you plan to put your component on github?

Who is online

Users browsing this forum: No registered users and 86 guests