Timestamp / build number tool

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just knocked up a little timestamp / build number generation tool that might be of use to other freaks: https://github.com/kuro68k/times...

 

You can use it as part of the pre-build commands in Atmel Studio or from your makefile. It spits out a timestamp as an int (epoch 01/01/2000 or 01/01/1970) and optionally an incremental build number. Redirect the output to a file that you can then #include in your code.

 

I also included a little batch file (Windows only I'm afraid, I'm sure Unix gurus can make their own) which creates a copy of every build you do, along with the .map file. I've found this to be useful in the past - someone comes to you with a firmware issue from an old build and you have use the .map file to peek and poke its memory for hints.

 

It's a rather trivial little tool, but I couldn't find anything similar for Windows. It should compile on Unix too, the code is fully portable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

mojo-chan wrote:
I also included a little batch file (Windows only I'm afraid, I'm sure Unix gurus can make their own) which creates a copy of every build you do, along with the .map file. I've found this to be useful in the past - someone comes to you with a firmware issue from an old build and you have use the .map file to peek and poke its memory for hints.

Isn't this the exact reason God created Revision Control Systems? ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

Isn't this the exact reason God created Revision Control Systems? ;-)

 

Probably ;-)

 

What I've learned over the years is that the more manual steps required to do something, the more likely it is to go wrong. Automation reduces stress.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

mojo-chan wrote:
Automation reduces stress.

That was the other reason God gave in his famous treatise "Why I invented Revision Control Systems" :-)