logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

[atmega16][C]problem z wyświetlaczem Lcd - biblioteki?

kolchoz 10 Sty 2010 18:47 1935 3
REKLAMA
  • #1 7515820
    kolchoz
    Poziom 10  
    Witam.
    mam problem z układem termometru cyfrowego (ds18b20+atmega16+lcd2x16) na płaszczyźnie programowej. Korzystam z bibliotek rklibavr i mam przeczucie że to z nimi jest problem.Poniżej przedstawiam listing i treść błędów. Podałem w makefile'u ścieżki do folderu z bibliotekami rklibavr.
    Listing
    Kod: C / C++
    Zaloguj się, aby zobaczyć kod


    Log błędów

    avr-gcc (WinAVR 20090313) 4.3.2
    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: termometr.c

    termometr.c:1:1: warning: "F_CPU" redefined
    <command-line>: warning: this is the location of the previous definition
    termometr.c: In function 'main':
    termometr.c:125: warning: pointer targets in passing argument 1 of 'LCD_putstr' differ in signedness

    In function main':
    C:\uC\termometr/termometr.c:102: undefined reference to `LCD_init'
    C:\uC\termometr/termometr.c:103: undefined reference to `LCD_clear'
    C:\uC\termometr/termometr.c:104: undefined reference to `LCD_putstr_P'
    C:\uC\termometr/termometr.c:105: undefined reference to `delayloop32'
    C:\uC\termometr/termometr.c:106: undefined reference to `LCD_clear'
    C:\uC\termometr/termometr.c:114: undefined reference to `delayloop32'
    C:\uC\termometr/termometr.c:124: undefined reference to `LCD_xy'
    C:\uC\termometr/termometr.c:125: undefined reference to `LCD_putstr'
    C:\uC\termometr/termometr.c:126: undefined reference to `delayloop32'
    C:\uC\termometr/termometr.c:130: undefined reference to `LCD_xy'
    C:\uC\termometr/termometr.c:131: undefined reference to `LCD_putstr_P'
    make.exe: *** [termometr.elf] Error 1

    > Process Exit Code: 2
    > Time Taken: 00:07
  • REKLAMA
  • #2 7515833
    Freddie Chopin
    Specjalista - Mikrokontrolery
    W makefile podałeś ścieżkę do KODU, a nie do bibliotek. Biblioteka to coś takiego, co ma rozszerzenie .a i jest to skompilowany kod, który wystarczy zlinkować.

    Kod tej "biblioteki" musisz dodać normalnie do projektu i kompilować tak jak inne pliki.

    4\/3!!
  • REKLAMA
  • #3 7535383
    kolchoz
    Poziom 10  
    Po dołączeniu wszystkich plików .h, do folderu projektu nadal wyskakuje mi ten błąd. Co jeszcze można z tym zrobić?

    problem rozwiązany - do obsługi LCD użyłem innych funkcji.
REKLAMA