build versioning on compiling

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
alro_2373731
Level 1
Level 1

I would like to store some type of reference to the version of code im programming to boards so I can easily tell what is out in the field in production.  I am currently just hardcoding this in with a variable like int version = 2;  Is there something in the flash I can reference that would have something unique based on the build?

0 Likes
1 Solution
WaMa_286156
Level 5
Level 5
First comment on blog 100 replies posted 50 replies posted

I use the string macros __DATE__ and __TIME__ to embed a pseudo version.

For me this info is better and can be sent out a uart or in a message

View solution in original post

1 Reply
WaMa_286156
Level 5
Level 5
First comment on blog 100 replies posted 50 replies posted

I use the string macros __DATE__ and __TIME__ to embed a pseudo version.

For me this info is better and can be sent out a uart or in a message