Guest
#1174262
Hello,
I have a little problem with memcpy,and eventhough I have read other
topics and try to solve it, I couldn't My WinARM Version is 4.1.1
I have an structure very basic, called Rect. I wanted to pass this
structure to a function this way:
void getRectSize (Rect rectangle){
}
but when compilling it says "undefined reference to `memcpy'". So I
added to my make file the option -lgcc -lc, in the linker part. But now
it says: c:\WinARM\bin\arm-elf-ld.exe: cannot find -lgcc
This is my makefile:
NAME = M1
MCU = arm7tdmi-s
CC = arm-elf-gcc
LD = arm-elf-ld -v
AR = arm-elf-ar
AS = arm-elf-as
CP = arm-elf-objcopy
OD = arm-elf-objdump
SIZE = arm-elf-size
CFLAGS = -mcpu=$(MCU) -I./include -c -fno-common -g
AFLAGS = -mcpu=$(MCU) -ahls -mapcs-32 -o crt.s
LFLAGS = -Map main.map -lgcc -lc -lm -T./src/2106.cmd
CPFLAGS = -O ihex
ODFLAGS = -x --syms
all: M1 size
main.out: crt.o delay.o main.o system.o ./src/2106.cmd
@ echo "..linking Main"
$(LD) $(LFLAGS) -o ./release/main.out ./release/crt.o
./release/delay.o ./release/main.o ./release/system.o
delay.o: ./src/delay.c
@ echo ".compiling delay.c"
$(CC) $(CFLAGS) ./src/delay.c -o ./release/delay.o
system.o: ./src/system.c
@ echo ".compiling System.c"
$(CC) $(CFLAGS) ./src/system.c -o ./release/system.o
main.o: ./src/main.c
@ echo ".compiling Main.c"
$(CC) $(CFLAGS) ./src/main.c -o ./release/main.o
crt.o: ./src/crt.s
@ echo ".assembling CRT.S"
$(AS) $(AFLAGS) ./src/crt.s > ./release/crt.lst -o ./release/crt.o
How can I solve this problem.. I cannot continue making a clear program
without the features that memcpy gives.
Thanks very much.
Ezequiel