Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Nerva Joachim
PostPosted: Sep 08, 2004 - 09:05 PM
Newbie


Joined: Aug 27, 2004
Posts: 1


Can you please help?

I am using the latest WINAVR-2004-0720.

I used atmega163 as MCU name to compile an application, the result is what I expected.


When I used atmega16 to compile the same file I have the following:

Compiling: gcctest4.c
avr-gcc -c -mmcu=atmega16 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=gcctest4.lst -std=gnu99 gcctest4.c -o gcctest4.o
gcctest4.c: In function `uart_init':
gcctest4.c:89: error: `UBRR' undeclared (first use in this function)
gcctest4.c:89: error: (Each undeclared identifier is reported only once
gcctest4.c:89: error: for each function it appears in.)
gcctest4.c:104:2: warning: no newline at end of file
make.exe: *** [gcctest4.o] Error 1

 Process Exit Code: 2


The program that I try to compile is AVR-GCC test program #4 from Volker Oth
 
 View user's profile Send private message  
Reply with quote Back to top
John_A_Brown
PostPosted: Sep 08, 2004 - 09:51 PM
Raving lunatic


Joined: Sep 20, 2003
Posts: 4844
Location: Surrey, England

I think you'll find that the Mega16 has two registers to set the baud rate, UBRRL and UBRRH. It's all in the (freely available from Atmel) datasheet.
 
 View user's profile Send private message  
Reply with quote Back to top
EW
PostPosted: Sep 08, 2004 - 11:03 PM
Raving lunatic


Joined: Mar 01, 2001
Posts: 5014
Location: Rocky Mountains

Nerva Joachim wrote:

Compiling: gcctest4.c
...
The program that I try to compile is AVR-GCC test program #4 from Volker Oth


Which is incredibly out-of-date, is deprecated, and should not be used as a test/sample program any more.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits