[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] What method should I use to get started?

From: Terry Karlson
Subject: Re: [avr-gcc-list] What method should I use to get started?
Date: Wed, 11 May 2005 09:09:34 -0400
User-agent: Mozilla Thunderbird 0.8 (X11/20041020)

Tim wrote:
What is the best method of learning AVR programming
with GCC? Is it to just read through the avr-libc
manual and buy a C book? Are there any additional aids

It sounds like you're learning C at the same time, so yes, you'll need a
C book.

Ideally, before learning a particular hardware adaptation like avr-gcc,
one would first have a good understanding of C programming in general.

If you're learning C in the context of avr-gcc and you're getting
tripped up by general C programming issues, you need to spend some time
writing general C programs (i.e. non-avr) in your desktop computing
environment.  (I.e. the practice programs in a C book.)

Further, if in the context of avr-gcc you find some behaviours or ways
of doing things don't make a lot of sense, you may need to better
understand them in the context of the general C standard (and how they
have been adapted to the avr).

Note: most treatments of C deal with the ANSI standard (from 1989).
Make sure any book you get does too.  However, avr-gcc has several
specialized facilities, for example implementations of standard library
functions, and elements of the later C99 standard (most notably extended
integer types like uint8_t).  These are in ch 5 of the avr-libc manual.

out there?

Find other people's example code (e.g. at avrfreaks) and work through it
(with the CPU datasheet at hand) until you understand exactly how it
works.  Then, modify it or adapt parts of it to your own examples and
get them working.

Search the archives of this list and avrfreaks for questions that are
similar to your own.  (A good time to point out why descriptive subject
lines are better!!)

processor. But do you really read through all 300+
pages (at least thats the case with mega32) of the

Skim through it all to get a feel for what's there and how it fits
together, and the parts you'll need to study to get your first examples
working and understand them.  Expect to re-read sections many, many
times as you learn more.  Soon, you'll have read it over the equivalent
of several times.  I know I have, and I'm not done yet.

-Terry Karlson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]