[Top][All Lists]

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

[avr-gcc-list] Recent request for newby help

From: Nick Downing
Subject: [avr-gcc-list] Recent request for newby help
Date: 05 Jun 2003 12:42:43 +1000

dear List,

Thanks all for your helpful responses.  From your responses I gather
that (1) the "--oformat ihex" option has a bug due to incorrect bitmasks
which would easily be fixed, but (2) it doesn't output the init data
segment which makes it unsuitable for my example.  (3)  The behaviour is
already documented so no need to report a bug.  (4)  The AVR-LIBC docs
and FAQ will explain any special syntax needed for accessing the FLASH.

Anyway, I have now solved my problem.  Thinking my work may be useful to
other beginners, I published a sample program which should provide most
people with a starting point for any AVR-GCC project.  I use the AVR
UART for 'printf' output, as in this 'hello world' example.  So my work
may be useful to others who also use the UART and wish to do it via
AVR-LIBC.  Please download the file from the following URL:


In the tarfile are the following files:

makefile (has the correct CPPFLAGS and dependencies)
avr_make (has the implicit make-rules which probably don't change)
hello.c (a simple 'hello world' program)
hello.h (header for the 'hello world' program)

I think the makefiles are based on Volker Oth's work.  We had to do a
fair bit of trawling the web to find them.  Then we had to change
various options to get things to work properly.  By the way:  My example
is useful to those who need  "*.HEX" and  "*.EEP" output.  (For example,
those upgrading from AVRASM or TAVRASM to AVR-GCC).  The  "*.HEX" and 
"*.EEP" files are generated using "avr-objcopy" on the "*.ELF" output.

Nice work everyone.  I'm very happy with AVR-GCC now that I got it
working.  Thanks again for your help.  I'll be back.  :)

talk soon,

reply via email to

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