Build number in firmware version
-
- Experienced Member
- Posts: 125
- Joined: Mon Apr 16, 2018 9:14 am
Build number in firmware version
How to automatically add build number in firmware version? It would also work if version automatically incremented every time I compiled a new firmware.
-
- Experienced Member
- Posts: 119
- Joined: Mon Jan 08, 2018 4:14 pm
Hello MaximLiadov
you could generate a APP_NAME_build.h file containing a #define xxx incremented with a shell script.
this shell script can be launched at each build by patching the file
xcommon/module_xcommon/build/Makefile.common1
for example, you can add this launcher
$(call EXEC_$(CONFIG))
at line 1047 just below
@echo Checking build modules
and then somewhere in your project makefile, just add a line describing your EXEC_Default command line
EXEC_Default = @echo creating my incremental build number && buildnumber.sh $(APP_NAME)_build.h
then upto you to write buildnumber.sh and share it here :)
you could generate a APP_NAME_build.h file containing a #define xxx incremented with a shell script.
this shell script can be launched at each build by patching the file
xcommon/module_xcommon/build/Makefile.common1
for example, you can add this launcher
$(call EXEC_$(CONFIG))
at line 1047 just below
@echo Checking build modules
and then somewhere in your project makefile, just add a line describing your EXEC_Default command line
EXEC_Default = @echo creating my incremental build number && buildnumber.sh $(APP_NAME)_build.h
then upto you to write buildnumber.sh and share it here :)
-
- Experienced Member
- Posts: 125
- Joined: Mon Apr 16, 2018 9:14 am
That's a bit too much. I give up and prefer manual increment then. Thank you anyway.
-
- XCore Expert
- Posts: 944
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
I'm generally using a manual increment these days with a test in the regression to make sure it is set correctly.
Previously I used to use a release script - it would tag etc and also search for and update version defines - I'd like to get back to that method at some point I think.
Previously I used to use a release script - it would tag etc and also search for and update version defines - I'd like to get back to that method at some point I think.