Keil -> WinARM

Guest #1171255
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!
OP #1171257
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

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.