Witam!
Czy istnieje gdzieś w sieci jakaś strona gdzie opisane byłoby jak skompilować przykłady z biblioteki rklibavr? Ściągnąłem sobie paczkę z
W pliku testlcd.c na początku:
Kod: #include <avr/io.h>
#include <avr/pgmspace.h>
#include "lcd.h"
ale lcd.h jest w katalogu ../../lib - czy należy ten wpis zmienić lub lcd.h przekopiować do katalogu przykłądu?
przy próbie kompilacji avr-gcc -mmcu=atmega16 testlcd.c dostaję:
Cytat: testlcd.c:7:17: error: lcd.h: No such file or directory testlcd.c: In function ‘progressbar’: testlcd.c:15: error: ‘u08’ undeclared (first use in this function) testlcd.c:15: error: (Each undeclared identifier is reported only once testlcd.c:15: error: for each function it appears in.) testlcd.c:15: error: expected ‘;’ before ‘i’ testlcd.c:17: error: ‘i’ undeclared (first use in this function) testlcd.c: In function ‘chartable’: testlcd.c:29: error: ‘u08’ undeclared (first use in this function) testlcd.c:29: error: expected ‘;’ before ‘x’ testlcd.c:30: error: expected ‘;’ before ‘ch’ testlcd.c:32: error: ‘z’ undeclared (first use in this function) testlcd.c:32: error: ‘LCD_X’ undeclared (first use in this function) testlcd.c:32: error: ‘LCD_Y’ undeclared (first use in this function) testlcd.c:34: error: ‘y’ undeclared (first use in this function) testlcd.c:37: error: ‘x’ undeclared (first use in this function) testlcd.c:38: error: ‘ch’ undeclared (first use in this function) testlcd.c: In function ‘main’: testlcd.c:82: error: expected ‘)’ before ‘_z’
Jak wpiszę make to dostaję:
- Cytat:
------- begin -------- ../../lib/counter.sh: 9: Syntax error: end of file unexpected (expecting "then") make: *** [counter] Błąd 2
Jak skopiuję wszysttkie potrzebne pliki *.h do katalogu projektu to dostaję:
Cytat: /tmp/cc4sEFwG.o: In function `progressbar': testlcd.cSad.text+0x14): undefined reference to `LCD_progressbar_init' testlcd.cSad.text+0x20): undefined reference to `LCD_progressbar' testlcd.cSad.text+0x28): undefined reference to `LCD_xy' testlcd.cSad.text+0x32): undefined reference to `LCD_putint' testlcd.cSad.text+0x38): undefined reference to `LCD_putchar' testlcd.cSad.text+0x44): undefined reference to `delayloop32' /tmp/cc4sEFwG.o: In function `chartable': testlcd.cSad.text+0x7c): undefined reference to `LCD_PL_chars_init' testlcd.cSad.text+0x8c): undefined reference to `LCD_xy' testlcd.cSad.text+0x9e): undefined reference to `LCD_putchar itd...
Ogólnie nie mam pojęcia jak skompilować te przykładowe programy i prosiłbym o napisanie jakiegoś krótkiego przewodnika. Podejrzewam, że mój problem to jakiś banał... z góry dziękuję za podpowiedzi - od czego zacząć.