Hey guys, I have been going through the smiley mircros book (which is a great book for those just getting started), and am trying to compile the examples under linux, and am running into some undefined macros.
In particular, the Joystick example:
-------- begin -------- avr-gcc (GCC) 3.4.6 (Gentoo 3.4.6, ssp-3.4.5-1.0, pie-8.7.9) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiling: PC_Comm.c avr-gcc -c -mmcu=atmega169 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=PC_Comm.lst -std=gnu99 -Wp,-M,-MP,-MT,PC_Comm.o,-MF,.dep/PC_Comm.o.d PC_Comm.c -o PC_Comm.o PC_Comm.c: In function `isCharAvailable': PC_Comm.c:48: error: `UCSR0A' undeclared (first use in this function) PC_Comm.c:48: error: (Each undeclared identifier is reported only once PC_Comm.c:48: error: for each function it appears in.) PC_Comm.c: In function `receiveChar': PC_Comm.c:55: error: `UDR0' undeclared (first use in this function) PC_Comm.c: In function `sendChar': PC_Comm.c:63: error: `UDR0' undeclared (first use in this function) PC_Comm.c:69: error: `UCSR0A' undeclared (first use in this function) PC_Comm.c: In function `USARTinit': PC_Comm.c:100: error: `UBRR0H' undeclared (first use in this function) PC_Comm.c:101: error: `UBRR0L' undeclared (first use in this function) PC_Comm.c:104: error: `UCSR0A' undeclared (first use in this function) PC_Comm.c:104: error: `U2X0' undeclared (first use in this function) PC_Comm.c:107: error: `UCSR0B' undeclared (first use in this function) PC_Comm.c:107: error: `RXEN0' undeclared (first use in this function) PC_Comm.c:107: error: `TXEN0' undeclared (first use in this function) PC_Comm.c:107: error: `RXCIE0' undeclared (first use in this function) PC_Comm.c:107: error: `UDRIE0' undeclared (first use in this function) PC_Comm.c:110: error: `UCSR0C' undeclared (first use in this function) PC_Comm.c:110: error: `UMSEL0' undeclared (first use in this function) PC_Comm.c:110: error: `UPM00' undeclared (first use in this function) PC_Comm.c:110: error: `USBS0' undeclared (first use in this function) PC_Comm.c:110: error: `UCSZ00' undeclared (first use in this function) PC_Comm.c:110: error: `UCPOL0' undeclared (first use in this function) make: *** [PC_Comm.o] Error 1
I grabbed the source for avr-libc-1.4.3 and grepped for some of the above macros and they appear to be missing. Is this something which is only part of winavr?
-jason