Hallo,
ich bin gerade dabei die oben erwähnte AppNote von Atmel in mein Projekt
einzubinden.
Ich verwende ebenfalls einen Tiny26, AVR Studio und den gcc Compiler.
Leider wurde der Code der AppNote mit dem Compiler "IAR EWAVR 2.28A"
getestet.
Hier der Link zu dem AppNote Quellcode:
http://www.atmel.com/dyn/resources/prod_documents/AVR307.zip
Mein Problem ist nun, dass der gcc die includes nicht finden kann.
(#include <iotiny26.h> und #include <inavr.h>)
Daraufhin habe ich sie durch #include <avr/io.h> ersetzt, allerdings
bekomme ich dann folgende Fehlermeldungen:
../USI_UART.c:67: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '__regvar'
../USI_UART.c:67: error: stray '@' in program
../USI_UART.c: In function 'USI_UART_Initialise_Transmitter':
../USI_UART.c:117: warning: implicit declaration of function
'__disable_interrupt'
../USI_UART.c:118: error: 'TCNT0' undeclared (first use in this
function)
../USI_UART.c:118: error: (Each undeclared identifier is reported only
once
../USI_UART.c:118: error: for each function it appears in.)
../USI_UART.c:119: error: 'TCCR0' undeclared (first use in this
function)
../USI_UART.c:135: warning: implicit declaration of function
'__enable_interrupt'
../USI_UART.c: At top level:
../USI_UART.c:190: warning: ignoring #pragma vector
../USI_UART.c:191: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
../USI_UART.c:216: warning: ignoring #pragma vector
../USI_UART.c:217: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
../USI_UART.c:291: warning: ignoring #pragma vector
../USI_UART.c:292: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
make: *** [USI_UART.o] Error 1
Build failed with 9 errors and 5 warnings...
Hat jemand die original verwendeten Headers, oder kann mir helfen die
Fehler loszuwerden?
Vielen Dank schonmal,
Alex