I was trying to compile the stdiodemo example code that comes with the avr-libc documentation with the mega88 as the target. I merely changed one line in the makefile:
# MCU name MCU = atmega88 #MCU = atmega8 #MCU = atmega169 #MCU = atmega128
I get the following errors in my make output:
uart.c: In function ‘uart_init’: uart.c:33: error: ‘UBRRL’ undeclared (first use in this function) uart.c:33: error: (Each undeclared identifier is reported only once uart.c:33: error: for each function it appears in.) uart.c:35: error: ‘UCSRB’ undeclared (first use in this function) uart.c:35: error: ‘TXEN’ undeclared (first use in this function) uart.c:35: error: ‘RXEN’ undeclared (first use in this function) uart.c: In function ‘uart_putchar’: uart.c:54: error: ‘UCSRA’ undeclared (first use in this function) uart.c:54: error: ‘UDRE’ undeclared (first use in this function) uart.c:55: error: ‘UDR’ undeclared (first use in this function) uart.c: In function ‘uart_getchar’: uart.c:104: error: ‘UCSRA’ undeclared (first use in this function) uart.c:104: error: ‘RXC’ undeclared (first use in this function) uart.c:105: error: ‘FE’ undeclared (first use in this function) uart.c:107: error: ‘DOR’ undeclared (first use in this function) uart.c:109: error: ‘UDR’ undeclared (first use in this function) make: *** [uart.o] Error 1
When I try the 169 or 8 targets, everything is fine, but the 128 and 88 targets fail. Are these just not implemented on the megax8s?
PS - I am using 1.4.4 of the avr-libc