EmbDev.net

Forum: ARM programming with GCC/GNU tools Keil -> WinARM


von Sevc D. (sevc)


Rate this post
useful
not useful
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.

von Fordp (Guest)


Rate this post
useful
not useful
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!

von Fordp (Guest)


Rate this post
useful
not useful

von Sevc D. (sevc)


Rate this post
useful
not useful
Hi.
I declarate all file on makefile -> SRC = .... .
But show me error:
Compiling C: hiduser.c
arm-elf-gcc -c  -mcpu=arm7tdmi  -I. -gstabs -DROM_RUN  -Os -Wall
-Wcast-align -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls
-Wreturn-type -Wshadow -Wunused -Wa,-adhlns=hiduser.lst   -MD -MP -MF
.dep/hiduser.o.d -Wnested-externs  -std=gnu99 hiduser.c -o hiduser.o
hiduser.c: In function 'HID_GetReport':
hiduser.c:40: error: 'InReport' undeclared (first use in this function)
hiduser.c:40: error: (Each undeclared identifier is reported only once
hiduser.c:40: error: for each function it appears in.)
hiduser.c: In function 'HID_SetReport':
hiduser.c:67: error: 'OutReport' undeclared (first use in this function)
make.exe: *** [hiduser.o] Error 1

I try it declarate but no effect.
new sorce is sevc.szm.sk\dom1.zip

regards

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.