[XCSSA] Links from Monday's XCSSA Arduino/AVR Microcontroller Programming Meeting
X-otic Computer Systems of San Antonio
xcssa at xcssa.org
Thu May 22 16:22:16 CDT 2008
On Thu, May 22, 2008 at 4:01 PM, X-otic Computer Systems of San Antonio <
xcssa at xcssa.org> wrote:
> Sweet! Thanks Anton (missed you at the last meeting! It was a hoot!).
I'll try to schedule my next trip to SA to coincide with a meeting. It's a
bit difficult now that y'all meet over 300 miles from me ;)
>
> But now that I look at this site that you listed, I see that in one of
> their
> projects, the source code calls some support libraries that seem to load up
> said register variables:
> (from http://nerdkits.com/videos/musicbox1/musicbox1.c)
> [...]
> #include <avr/io.h>
> #include <avr/interrupt.h>
> #include <avr/pgmspace.h>
> [...]
>
> Do you have experience with these header files? Are they for just ONE of
> the
> ATmel devices? How do you "switch" between models? Anyone?
The avr/ includes are part of the avr-libc project.
http://www.nongnu.org/avr-libc/
You switch between the AVR models with a compiler flag. It appears to
support a whole slew of processors, including the ATTiny and others. YMMV
may vary when coaxing your code to compile into the smaller chips.
GCCFLAGS=-g -Os -Wall -mmcu=atmega168 -B /usr/avr/include
Ubuntu has version 1.4.x of avr-libc, so go hunting for the avr-libc 1.6
debs from Debian Sid. The floating point in 1.4 is a bit lacking. The
avr-gcc package in Ubuntu 8.04 works fine though.
For Windows users, check out WinAVR which appears to be a bundle of avr-gcc
and avr-libc for windows environs.
Look at the Makefiles in the NerdKits projects to see how everything
compiles, links, and gets loaded to the chip. One make does it all.
--Anton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xcssa.org/pipermail/xcssa/attachments/20080522/e67e0774/attachment.html
More information about the XCSSA
mailing list