EmbDev.net

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


Author: Sevc Dominik (sevc)
Posted on:

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

Author: Fordp (Guest)
Posted on:

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

Author: Fordp (Guest)
Posted on:

Rate this post
0 useful
not useful
Look at this link it may help :-

http://gandalf.arubi.uni-kl.de/avr_projects/arm_pr...

All the best.

Author: Sevc Dominik (sevc)
Posted on:

Rate this post
0 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

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.