Hallo,
ich habe an einen Atmega8538 ein Display angschlossen(Displaytech 162 von Reichelt) und will dieses jetzt im 4-Bit I/O Mode betreiben. Ich benutzte das AVR-Studio 4 und den AVRISP mkII Programmer. Bis jetzt hab ich folgenden Code:
und als Output bekomme ich ständig:Code:#include <stdlib.h> #include <avr/io.h> #include <avr/pgmspace.h> #include "lcd.h" int main(void) { for(;;) { /* Initialisiere Display, Cursor aus */ lcd_init(LCD_DISP_ON); /* loesche das LCD Display und Cursor auf 1 Zeile, 1 Spalte */ lcd_clrscr(); /* String auf Display anzeigen */ lcd_puts("Hello world."); } }
Build started 25.10.2007 at 20:17:19
avr-gcc.exe -I"D:\Robotik\Programme\Atmega8535\LCD_Lib" -mmcu=atmega8535 -Wall -gdwarf-2 -DF_CPU=16000000UL -O0 -fsigned-char -MD -MP -MT main.o -MF dep/main.o.d -c ../main.c
avr-gcc.exe -mmcu=atmega8535 main.o -o main.elf
main.o: In function `main':
../main.c:19: undefined reference to `lcd_init'
../main.c:22: undefined reference to `lcd_clrscr'
../main.c:25: undefined reference to `lcd_puts'
make: *** [main.elf] Error 1
Build failed with 3 errors and 0 warnings...
Warum immer dieses "undefined reference..."?
Bene







Zitieren

Lesezeichen