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

AVR Studio nie kompiluje. Wykorzystane standardowe biblioteki.

28aug240 18 Lip 2006 13:25 2745 5
REKLAMA
  • #1 2830498
    28aug240
    Poziom 14  
    Posty: 158
    Pomógł: 3
    Ocena: 1
    Witam

    Mam problem z skompilowaniem programu do LCD z standardowych bibliotek wywala mi następujące błędy może ktoś wie co można z tym zrobić ??


    Build started 18.7.2006 at 13:14:15
    avr-gcc -mmcu=atmega8535 -Wl,-Map=LCD2.map LCD2.o  -L"C:\WinAVR\avr\include\avr\lcd" -L"C:\WinAVR\avr\include\avr"   -o LCD2.elf
    LCD2.o(.text+0x20): In function `progressbar':
    ../LCD2.c:19: undefined reference to `LCD_progressbar'
    LCD2.o(.text+0x26):../LCD2.c:20: undefined reference to `LCD_xy'
    LCD2.o(.text+0x2e):../LCD2.c:21: undefined reference to `LCD_putint'
    LCD2.o(.text+0x32):../LCD2.c:22: undefined reference to `LCD_putchar'
    LCD2.o(.text+0x38):../LCD2.c:23: undefined reference to `delayms'
    LCD2.o(.text+0x6a): In function `chartable':
    ../LCD2.c:31: undefined reference to `LCD_PL_chars_init'
    LCD2.o(.text+0x80):../LCD2.c:36: undefined reference to `LCD_xy'
    LCD2.o(.text+0x98):../LCD2.c:38: undefined reference to `LCD_putchar'
    LCD2.o(.text+0xae):../LCD2.c:40: undefined reference to `delayms'
    LCD2.o(.text+0xd6): In function `delayms1000':
    ../LCD2.c:46: undefined reference to `delayms'
    LCD2.o(.text+0xe6): In function `main':
    ../LCD2.c:57: undefined reference to `LCD_init'
    LCD2.o(.text+0xe8):../LCD2.c:61: undefined reference to `LCD_PL_chars_init'
    LCD2.o(.text+0xee):../LCD2.c:63: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0xf4):../LCD2.c:64: undefined reference to `LCD_xy'
    LCD2.o(.text+0xfa):../LCD2.c:65: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0xfe):../LCD2.c:68: undefined reference to `LCD_clear'
    LCD2.o(.text+0x104):../LCD2.c:69: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x108):../LCD2.c:72: undefined reference to `LCD_clear'
    LCD2.o(.text+0x10e):../LCD2.c:73: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x114):../LCD2.c:74: undefined reference to `delayms'
    LCD2.o(.text+0x116):../LCD2.c:75: undefined reference to `LCD_clear'
    LCD2.o(.text+0x11c):../LCD2.c:76: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x122):../LCD2.c:77: undefined reference to `delayms'
    LCD2.o(.text+0x124):../LCD2.c:78: undefined reference to `LCD_clear'
    LCD2.o(.text+0x12a):../LCD2.c:79: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x12e):../LCD2.c:82: undefined reference to `LCD_clear'
    LCD2.o(.text+0x134):../LCD2.c:83: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x13a):../LCD2.c:84: undefined reference to `delayms'
    LCD2.o(.text+0x13e):../LCD2.c:87: undefined reference to `LCD_clear'
    LCD2.o(.text+0x144):../LCD2.c:88: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x14a):../LCD2.c:92: undefined reference to `LCD_clear'
    LCD2.o(.text+0x150):../LCD2.c:93: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x156):../LCD2.c:94: undefined reference to `LCD_send'
    LCD2.o(.text+0x15a):../LCD2.c:97: undefined reference to `LCD_clear'
    LCD2.o(.text+0x160):../LCD2.c:98: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x166):../LCD2.c:99: undefined reference to `delayms'
    LCD2.o(.text+0x16c):../LCD2.c:100: undefined reference to `LCD_send'
    LCD2.o(.text+0x172):../LCD2.c:101: undefined reference to `delayms'
    LCD2.o(.text+0x178):../LCD2.c:102: undefined reference to `LCD_send'
    LCD2.o(.text+0x17e):../LCD2.c:103: undefined reference to `delayms'
    LCD2.o(.text+0x184):../LCD2.c:104: undefined reference to `LCD_send'
    LCD2.o(.text+0x18a):../LCD2.c:105: undefined reference to `delayms'
    LCD2.o(.text+0x190):../LCD2.c:106: undefined reference to `LCD_send'
    LCD2.o(.text+0x194):../LCD2.c:109: undefined reference to `LCD_clear'
    LCD2.o(.text+0x19a):../LCD2.c:110: undefined reference to `LCD_putstr_P'
    LCD2.o(.text+0x1a0):../LCD2.c:111: undefined reference to `LCD_send'
    LCD2.o(.text+0x1a4):../LCD2.c:114: undefined reference to `LCD_clear'
    make: *** [LCD2.elf] Error 1
    Build failed with 47 errors and 0 warnings...




    Program jest w pliku testlcd.c biblioteki rklibavr_20050411. Z góry dziękuję za pomoc.

    Pozdrawiam
  • REKLAMA
  • #2 2832366
    kaczor55
    Poziom 12  
    Posty: 18
    Pomógł: 2
    Witam.

    Musisz dodać do projektu pliki bibliotek z których korzystasz, zarówno pliki nagłówkowe jak i pliki źródłowe. Nie wystarczy samo include. Trzeba to zrobić tak: prawym klawiszem na Header Files->Add Existing Header File(s)... i na Source Files->Add Existing Source File(s)... U mnie to zadziałało.
    Tylko, że powstaje inny problem. Jeżeli w takich bibliotekach są funkcje, których później nie wykorzystuje w swoim programie to kompilator i tak je kompiluje i dołącza do kodu wynikowego, co niepotrzebnie zajmuje miejsce w pamięci. Czy da się to ominąć w inny sposób jak usunięcie nieużywanych funkcji?

    Pozdrawiam.
  • REKLAMA
  • #3 2833848
    28aug240
    Poziom 14  
    Posty: 158
    Pomógł: 3
    Ocena: 1
    Witam

    Już dodałem wszystkie ścieżki do bibliotek i chyba zaczął kompilować problem teraz mam taki że kompilator podczas kompilacji się zawiesza (zużycie procesora 100%) Co może się z tym dziać??
  • REKLAMA
  • #4 2834593
    GienekS
    Poziom 32  
    Posty: 1971
    Pomógł: 139
    Ocena: 15
    Daj procesor o większej pamięci.
  • REKLAMA
  • #6 3569927
    28aug240
    Poziom 14  
    Posty: 158
    Pomógł: 3
    Ocena: 1
    wgranie SP2 do AVR Studio rozwiązało problem

    Temat zakończony
REKLAMA