Embedding revision numbers in compiled program names

06 Aug 2011

Hello, I'm a new mbed user, and I saw that there's now revision control, which is great! I was wondering if it would be possible to add an option to append the revision number to the compiled program's filename so that it would be easier to swap out older versions of code.

For example, say I had a project named Foo. Normally, the compiled binary will have a filename like "Foo_LPC1768.bin". If I compile it again, my web browser will save it to a different filename like "Foo_LPC1768 (2).bin" and so on. I can manually rename the binaries before I copy them to my mbed to make it a little bit clearer, but it's annoying. Additionally, if I develop on another computer, the sequence of "(#of files w/this name downloaded)" appended by the browser is meaningless.

Instead, I'd like to see something like "Foo_rev1_LPC1768.bin" as the default filename given to programs compiled from code based off of a working copy at revision 1. This way, binaries have semi-meaningful names that provide versioning info and if I want to swap out the code on the mbed, it's easy to tell which version to touch to make the mbed use it instead.

My apologies if this feature already exists or has already been proposed, but I didn't find anything by searching

05 Dec 2013

+1 on this being needed!

Also needed, something like:

Integrated revision control needed.

char * Curr_rev__cp = __LATEST_REVISION__;

Which would fill in the value automatically, changing appropriately with each new commit. Then the firmware can report it's version to interconnected devices.

-D