[Top][All Lists]

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

Re: [avr-gcc-list] defining stdio

From: Greg Kulosa
Subject: Re: [avr-gcc-list] defining stdio
Date: Wed, 20 Mar 2002 16:45:52 -0800
User-agent: Mutt/1.2.5i

> I'm about to dive head first into embedded programming
> in c on the avr.  I looked at the docs for gcc-avr and
> found references to the .h file(s) and standard c
> library for the avr and chip specific definitions but
> no references as to how/where to define what
> ports/interfaces are to be used as stdio, stderr, etc.

No such thing on an embedded processor.  No display or input devices.

The closest that you will get is if you use the serial port, and attach
a VT-100 terminal.

I frequently use this for debugging, although the final product may not
end up having a serial port.  (although my projects usually do).

Also, look at:


for references for the libc, and some example code.

> what would "hello_world" look like on/for the avr?

You could write your own printf, that outputted to the UART on the chip.

However, the first program that I usually write just flashes an LED at
1hz or so.  That verifies the compiler, programmer, and the power supply
for the project.  I often keep the LED flashing all through development,
as a way to tell that the main loop of the software is running.

See the web page above for an example of flashing the LED using a
PWM port.

Greg A. Kulosa          | "The avalanche has already started, it is too
Systems Administrator   |  late for the pebbles to vote." - Ambassador Kosh
Independent Consultant  |___________________________________________________
avr-gcc-list at http://avr1.org

reply via email to

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