Adding Version (and other meta-data) to Atmel Studio Projects

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

There's been discussion on the 'Freaks about versioning (or lack of) in Atmel Studio. This has prompted me to polish and share my in-house solution. It includes a custom template with version and copyright strings. It also includes a shell extension for Windows to display these strings.

 

 

 

Attachment(s): 

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

As a stop gap, I use

const char coreVersion[] PROGMEM = "0.01";		// manually enter
const char buildDate[] PROGMEM = __DATE__;		// 11 bytes
const char buildTime[] PROGMEM = __TIME__;		// 8 bytes

and dump them out to I2C or serial with

    while( (data = pgm_read_byte(&(buildDate
))) != 0 && (index < 15) )     {         twiTransmitByte( data );         ++index;     }

__DATE__ and __TIME__ are generated automatically.

"If you find yourself in an even battle, you didn't plan very well."
http://pc.gameactive.org

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

"Dare to be naïve." - Buckminster Fuller

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

It's easy for a user to add new strings to their local template. It's just a zip file in Documents\Atmel Studio\Templates.

 

This is the code I use to embed strings with just 6 bytes of overhead per string. It's a little messy, but handles all flavors of AVRs (that I know of).

#ifdef GPIO0	
	void EmbedString(char * Str) { GPIO0 = Str[0];}
#else
	#ifdef GPIOR0
		void EmbedString(char * Str) { GPIOR0 = Str[0];}
	#else
		#ifdef ICR1L
			void EmbedString(char * Str) { ICR1L = Str[0];}
		#else
			void EmbedString(char * Str) { volatile char dummy = Str[0];}
		#endif
	#endif
#endif

I just packaged up what I had. If there's interest in extending it, I'd happily put it out on github.