I know we have a few Atmel fluent folks about so has anybody ever noticed that the source code for a lot of the Atmel AtMega evaluation boards is written for/with the IAR compiler suite and not the Atmel supplied, WinAVR based, AVR Studio suite? Along those lines has anybody got a good source for porting the inavr.h functions to something available in the WinAVR (which of course is based on avr-gcc) tool set? I’ve done the obvious google searches and have a few code snippets but I guess I am looking for the not so necessarily obvious really excellent authority on dealing with this seemingly inescapably obvious porting issue that anybody new to AVR must immediatly smash headlong into.
Recommendations (other than buy the IAR tool suite please)?
I know what you mean, I do have the code for the AVR butterfly board from Atmel on my machine and all of the source files have a dependancy on that file…
You might want to ask over on the Open Servo forums. They use AVRs with WinAVR and somebody there may have used the IAR compiler and know what needs to be done. Those guys are the best AVR Gurus I could suggest.
Oh btw I think I’m all set on my project… will know for sure next week when my jtagicemkii shows up.
I will say it is very interesting about the difference in how IAR handles data in code space vs. how WinAVR (avr-gcc) goes about it. IAR actually created a storage class for the root types much like using const, static, volatile, near, far, huge, etc do. They must put the data in a seperate segment and then just map it into CODE (CSEG, C_TEXT, whatever) when linking. Very transparent, lends itself to simply overloading the various operators to support accessing the constants. avr-gcc on the other hand applied to the type a PROGMEM attribute and then you have to take the responsibility of using program memory space specific macros and functions to access the data. messy messy messy. Anyway, that was probably the biggest programming hurdle to deal with as the other stuff was mostly re-deining some intrinsic inline statements and modifying how interrput service routines are established.
yeah, that’s a port to gcc of the butterfly code, but it sounds like you’ve already done it.
Should be interesting for you to compare another’s solution.
ah ok. thanks. kurte was the one with the butterfly board. I am working on something else that uses an atmega based part at work… first time I had to get into the software part of an atmel based product so I was discovering things. heh. thanks for the link.
Yes I do have a butterfly board, as well as few of the boards that Seattle Robotic Society work shop robots use and also one Maveric 1B board by BDMicro.
When I get more time I will do more work using the Maveric 1B board. One thing I wish this board had was all of the signal lines set up with 3 pin headers like SSC32 or the mini AAB board. That way it would be a lot easier to add on sensors and the like without either using an external breadboard or develop your own circuit. It would be nice if the new SSC-NB board allowed us the capability to easily add in our own functionality…