Build number autogenerating

Showing results for 
Search instead for 
Did you mean: 

Build number autogenerating

Contributor II

Is there a possibility to autogenerate build number after building the project in codewarrior. This way every time project is built, some location in FLASH (constant) will be incremented and we can clearly distinguish the difference between two device by reading the build number .

Labels (1)
Tags (3)
0 Kudos
1 Reply

NXP Employee
NXP Employee

Have a look at

So this could be used say to run a script/batch file which changes a source file and increments the build number.

Another possibility is to use the burner which would modify the S19/binary file. Again either with a .bbl or with a post build step:

What I'm using as a build identification is as well the __DATE__ and __TIME__ compiler macros. This is not a build number, but gives date and time of the build in a string. I use it like this in my FSShell component:

  FSSH1_SendStatusStr((const unsigned char*)"Firmware", (const unsigned char*)__DATE__, io->stdOut);

  FSSH1_SendStr((unsigned char*)" ", io->stdOut);

  FSSH1_SendStr((unsigned char*)__TIME__, io->stdOut);

  FSSH1_SendStr((unsigned char*)"\r\n", io->stdOut);

The output of this you can see n the last screenshot in

Hope this helps,