Часики на attiny2313, нужна помощь
Добавлено: Пт мар 22, 2013 01:51:40
Здравствуйте, собрал часики http://licrym.org/index.php/Простые_часы
Теперь не могу откомпилировать исходник, что я делаю не так?
Сообщение компилятора:
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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: main.c
avr-gcc -c -mmcu=attiny2313 -I. -gdwarf-2 -DF_CPU=1600000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wundef -Wa,-adhlns=obj/main.lst -std=gnu99 -Wundef -MD -MP -MF .dep/main.o.d main.c -o obj/main.o
main.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'button_pressed1'
main.c:31: error: 'TIM1_COMPA' undeclared here (not in a function)
main.c:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
main.c:83: warning: return type of 'main' is not 'int'
main.c:171:2: error: invalid preprocessing directive #asm
main.c: In function 'main':
main.c:177: warning: implicit declaration of function 'delay_ms'
main.c:195: error: 'button_pressed1' undeclared (first use in this function)
main.c:195: error: (Each undeclared identifier is reported only once
main.c:195: error: for each function it appears in.)
main.c:206: error: 'button_pressed2' undeclared (first use in this function)
make.exe: *** [obj/main.o] Error 1
а вот и сам исходник:
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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: main.c
avr-gcc -c -mmcu=attiny2313 -I. -gdwarf-2 -DF_CPU=1600000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wundef -Wa,-adhlns=obj/main.lst -std=gnu99 -Wundef -MD -MP -MF .dep/main.o.d main.c -o obj/main.o
main.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'button_pressed1'
main.c:31: error: 'TIM1_COMPA' undeclared here (not in a function)
main.c:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
main.c:83: warning: return type of 'main' is not 'int'
main.c:171:2: error: invalid preprocessing directive #asm
main.c: In function 'main':
main.c:177: warning: implicit declaration of function 'delay_ms'
main.c:195: error: 'button_pressed1' undeclared (first use in this function)
main.c:195: error: (Each undeclared identifier is reported only once
main.c:195: error: for each function it appears in.)
main.c:206: error: 'button_pressed2' undeclared (first use in this function)
make.exe: *** [obj/main.o] Error 1
Заранее благодарен!
Теперь не могу откомпилировать исходник, что я делаю не так?
Сообщение компилятора:
Спойлер
-------- begin --------avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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: main.c
avr-gcc -c -mmcu=attiny2313 -I. -gdwarf-2 -DF_CPU=1600000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wundef -Wa,-adhlns=obj/main.lst -std=gnu99 -Wundef -MD -MP -MF .dep/main.o.d main.c -o obj/main.o
main.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'button_pressed1'
main.c:31: error: 'TIM1_COMPA' undeclared here (not in a function)
main.c:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
main.c:83: warning: return type of 'main' is not 'int'
main.c:171:2: error: invalid preprocessing directive #asm
main.c: In function 'main':
main.c:177: warning: implicit declaration of function 'delay_ms'
main.c:195: error: 'button_pressed1' undeclared (first use in this function)
main.c:195: error: (Each undeclared identifier is reported only once
main.c:195: error: for each function it appears in.)
main.c:206: error: 'button_pressed2' undeclared (first use in this function)
make.exe: *** [obj/main.o] Error 1
Спойлер
-------- begin --------avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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: main.c
avr-gcc -c -mmcu=attiny2313 -I. -gdwarf-2 -DF_CPU=1600000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wundef -Wa,-adhlns=obj/main.lst -std=gnu99 -Wundef -MD -MP -MF .dep/main.o.d main.c -o obj/main.o
main.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'button_pressed1'
main.c:31: error: 'TIM1_COMPA' undeclared here (not in a function)
main.c:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
main.c:83: warning: return type of 'main' is not 'int'
main.c:171:2: error: invalid preprocessing directive #asm
main.c: In function 'main':
main.c:177: warning: implicit declaration of function 'delay_ms'
main.c:195: error: 'button_pressed1' undeclared (first use in this function)
main.c:195: error: (Each undeclared identifier is reported only once
main.c:195: error: for each function it appears in.)
main.c:206: error: 'button_pressed2' undeclared (first use in this function)
make.exe: *** [obj/main.o] Error 1
Заранее благодарен!