Witam, chciałbym opanować komunikowanie się mikrokontrolera z komputerem za pomocą UART przez FT232. Nie wiem dlaczego winavr nie rozpoznaje makrodefinicji UBRRH_VALUE, UBRRL_VALUE, chociaż zdefiniowałem w kodzie
AVR Studio 6 kompiluje program bez problemu, więc w czym może być problem?
Oto program:
Dodano po 19 [minuty]:
tutaj jeszcze błąd:
> "make.exe" all
-------- begin --------
avr-gcc (GCC) 4.1.2 (WinAVR 20070525)
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 C: wzor.c
avr-gcc -c -mmcu=atmega8 -I. -gdwarf-2 -DF_CPU=1000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./wzor.lst -std=gnu99 -Wundef -MMD -MP -MF .dep/wzor.o.d wzor.c -o wzor.o
wzor.c:1:1: warning: "F_CPU" redefined
<command line>:1:1: warning: this is the location of the previous definition
wzor.c:8: warning: function declaration isn't a prototype
wzor.c:10:27: warning: util/setbaud.h: No such file or directory
wzor.c: In function 'USART_init':
wzor.c:11: error: 'UBRRH_VALUE' undeclared (first use in this function)
wzor.c:11: error: (Each undeclared identifier is reported only once
wzor.c:11: error: for each function it appears in.)
wzor.c:12: error: 'UBRRL_VALUE' undeclared (first use in this function)
wzor.c:14:6: warning: "USE_2X" is not defined
wzor.c:33:2: warning: no newline at end of file
make.exe: *** [wzor.o] Error 1
> Process Exit Code: 2
> Time Taken: 00:01
Kod: C / C++
AVR Studio 6 kompiluje program bez problemu, więc w czym może być problem?
Oto program:
Kod: C / C++
Dodano po 19 [minuty]:
tutaj jeszcze błąd:
> "make.exe" all
-------- begin --------
avr-gcc (GCC) 4.1.2 (WinAVR 20070525)
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 C: wzor.c
avr-gcc -c -mmcu=atmega8 -I. -gdwarf-2 -DF_CPU=1000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./wzor.lst -std=gnu99 -Wundef -MMD -MP -MF .dep/wzor.o.d wzor.c -o wzor.o
wzor.c:1:1: warning: "F_CPU" redefined
<command line>:1:1: warning: this is the location of the previous definition
wzor.c:8: warning: function declaration isn't a prototype
wzor.c:10:27: warning: util/setbaud.h: No such file or directory
wzor.c: In function 'USART_init':
wzor.c:11: error: 'UBRRH_VALUE' undeclared (first use in this function)
wzor.c:11: error: (Each undeclared identifier is reported only once
wzor.c:11: error: for each function it appears in.)
wzor.c:12: error: 'UBRRL_VALUE' undeclared (first use in this function)
wzor.c:14:6: warning: "USE_2X" is not defined
wzor.c:33:2: warning: no newline at end of file
make.exe: *** [wzor.o] Error 1
> Process Exit Code: 2
> Time Taken: 00:01
