WinAVR a Programmers notepad

Michal Grunt michal.grunt na vynet.cz
Čtvrtek Červen 16 16:13:06 CEST 2011


Zkousim misto AVR Studia program Programmer's notepad (zda se mi v nem zobrazeny kod prehlednejsi a vubec proc to nezkusit). Zalozim projekt s jednim zdrojovym .c souborem. Zkopiruju do adresare kde je zdrojovy .c soubor makefile z c:\WinAVR-20100110\sample\Makefile. Takto jednoduchy priklad zkompiluju bez problem, ale jakmile mam svoji vlastni .h knihovnu a do do zdrojoveho .c ji prilozim, compiler hodi chybu undefined reference to (a ted je jmeno procedury z knihovny)... Nejspis to je tim, ze neni v makefile nadefinovano, aby to linkovalo i "uzivatelske".h soubory. Kde se to da nastavit (co editovat/pridat). Googluji uz peknou chvilku, ale nic o tom nemuzu najit.

Prikladam vystup z prekladace. Nikde neni zminka o .h knihovne.

> "make.exe" all

-------- begin --------
avr-gcc (AVR_Toolchain_3.0_149) 4.4.3
Copyright (C) 2010 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=atmega128 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst  -std=gnu89 -MMD -MP -MF .dep/main.o.d main.c -o main.o

Linking: main.elf
avr-gcc -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.o  -std=gnu89 -MMD -MP -MF .dep/main.elf.d main.o --output main.elf -Wl,-Map=main.map,--cref     -lm
main.o: In function `main':
c:\users\michal.grunt\desktop\testavr01/main.c:14: undefined reference to `PortInitialize'
c:\users\michal.grunt\desktop\testavr01/main.c:15: undefined reference to `SerialInitialize'
c:\users\michal.grunt\desktop\testavr01/main.c:17: undefined reference to `TxDString'
make.exe: *** [main.elf] Error 1

> Process Exit Code: 2
> Time Taken: 00:00

MG
------------- další část ---------------
HTML příloha byla odstraněna...
URL: <http://list.hw.cz/pipermail/hw-list/attachments/20110616/3f07a5c9/attachment.htm>


Další informace o konferenci Hw-list