Sevc Dominik wrote:
> Hi all.
> I try convert Keil example (hid)to WinARM but show my error and I can't
> corect it.
> Can look to source code where is problem?
> the code is on this sevc.szm.sk\dom.zip
>
> regards.
I had a quick look.
You seem to have more source files in you directory than you have in the
makefile ?
Is this what you get :-
-------- begin --------
arm-elf-gcc (GCC) 3.4.0
Copyright (C) 2004 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 (ARM-only): main.c
arm-elf-gcc -c -mcpu=arm7tdmi -I. -gstabs -DROM_RUN -Os -Wall
-Wcast-align -Wi
mplicit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type
-Wshadow -Wunu
sed -Wa,-adhlns=main.lst -MD -MP -MF .dep/main.o.d -Wnested-externs
-std=gnu9
9 main.c -o main.o
In file included from main.c:14:
usbhw.h:36: warning: type defaults to `int' in declaration of `__irq'
usbhw.h:36: warning: data definition has no type or storage class
Linking: main.elf
arm-elf-gcc -mcpu=arm7tdmi -I. -gstabs -DROM_RUN -Os -Wall
-Wcast-align -Wimp
licit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow
-Wunuse
d -Wa,-adhlns=Cstartup.lst -MD -MP -MF .dep/main.elf.d Cstartup.o
main.o Cst
artup_SAM7.o --output main.elf -nostartfiles
-Wl,-Map=main.map,--cref -lc
-lm -lc -lgcc -TAT91SAM7S64-ROM.ld
main.o(.text+0x150): In function `main':
main.c:54: undefined reference to `USB_Init'
main.o(.text+0x158):main.c:55: undefined reference to `USB_Connect'
make: *** [main.elf] Error 1
I think this error is caused by not putting all the source files in the
make file.
It means that there is a call to USB_Connect in the files you have
included, but it cannot find that function. (Because you have not put
that code in the make file).
Good Luck!