Friday, September 4, 2009

Using winavr with visual studio

I've been using winavr gcc port together with Atmel's AVR studio 4 for developing the code for a AVR butterfly board, but I've been finding the editor a bit frustrating. Since I use Visual Studio 2008 for the day job I wondered whether I could easily integrate my project into that instead.

A quick and dirty solution was to create a "makefile project" in Visual Studio and point it at the temporary makefile that gets generated by AVR Studio each time you build. Seems to work...

One gotcha was that the error positions were not working as the error message format was not what VC2008 expected. A quick batch file @avr-gcc.exe %* 2>&1 | sed "s/:\([0-9]*\):/(\1):/" 1>&2 took care of that.

No comments: