Hallo
Meist du so?
Code:
#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdio.h>
#include "uart.h"
#include "uart.c"
static FILE mystdout = FDEV_SETUP_STREAM(uart_putc, NULL, _FDEV_SETUP_WRITE);
int main(void)
{
/* initialisieren der UART */
uart_init();
stdout = &mystdout;
/* printf... */
printf("Hello World!\n");
/* endless loop */
while(1)
{};
/* exit... (should never reached) */
return 0;
}
> "c:\WinAVR\compile-can128.bat" test
compiling ...
In file included from test.cc:5:
uart.c: In function `void uart_init()':
uart.c:51: error: `F_CPU' was not declared in this scope
uart.c:56: error: `TIMSK' was not declared in this scope
uart.c:56: error: `TICIE1' was not declared in this scope
uart.c:69: error: `TIFR' was not declared in this scope
uart.c:51: warning: unused variable 'F_CPU'
uart.c:56: warning: unused variable 'TIMSK'
uart.c:56: warning: unused variable 'TICIE1'
uart.c:69: warning: unused variable 'TIFR'
uart.c: In function `int uart_putc(char, __file*)':
uart.c:85: error: `TIMSK' was not declared in this scope
uart.c:86: error: `TIFR' was not declared in this scope
uart.c:85: warning: unused variable 'TIMSK'
uart.c:86: warning: unused variable 'TIFR'
uart.c: In function `void __vector_12()':
uart.c:103: error: `TIMSK' was not declared in this scope
uart.c:103: warning: unused variable 'TIMSK'
uart.c: In function `void __vector_11()':
uart.c:122: error: `TIFR' was not declared in this scope
uart.c:123: error: `TIMSK' was not declared in this scope
uart.c:123: error: `TICIE1' was not declared in this scope
uart.c:122: warning: unused variable 'TIFR'
uart.c:123: warning: unused variable 'TICIE1'
uart.c: In function `void __vector_13()':
uart.c:152: error: `TIMSK' was not declared in this scope
uart.c:152: error: `TICIE1' was not declared in this scope
uart.c:153: error: `TIFR' was not declared in this scope
uart.c:152: warning: unused variable 'TICIE1'
uart.c:153: warning: unused variable 'TIFR'
test.cc: At global scope:
test.cc:7: error: expected primary-expression before '.' token
test.cc:7: error: expected primary-expression before '.' token
test.cc:7: error: expected primary-expression before '.' token
test.cc:7: error: expected primary-expression before '.' token
avr-objcopy: 'test.elf': No such file
OK
> Process Exit Code: 0
> Time Taken: 00:00
mfg palermo
Lesezeichen