November 09, 2024, 03:30:48 AM

help ! I cant get rid of eclipse error

Started by anotherbrick, December 03, 2012, 03:53:46 PM

Previous topic - Next topic

anotherbrick

hello dear forum ,

I am trying to compile a C program for STM32F407 microcontroller
with OlimexODS  ( Eclipse + yagarto compiler )

I get the error;

"undefined reference to memcpy" error
as you can see in the attached picture

---------------------- makefile ------------
CROSS_COMPILE = arm-none-eabi-

CC = $(CROSS_COMPILE)gcc
SIZE = $(CROSS_COMPILE)size
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
LD = $(CROSS_COMPILE)ld
AS = $(CROSS_COMPILE)as

# Flags
CFLAGS = -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb
CFLAGS += -g $(OPTIMIZATION) $(INCLUDES) -DTRACE_LEVEL=$(TRACE_LEVEL)
ASFLAGS = -g -mapcs-32
LDFLAGS = -g -v -nostartfiles
OBJCOPYFLAGS = -O binary
OBJDUMPFLAGS = -x --syms -S

why the linker cannot find a libray function
which is 40 years old already ?

here is the error
=================0==================
..linking
arm-none-eabi-ld -g -v -nostartfiles -Map ./main.map -T./lib/stm32f4xx_flash.ld -o ./main.out obj/main.o obj/system_stm32f4xx.o obj/stm32f4xx_gpio.o obj/stm32f4xx_rcc.o obj/stm32f4xx_it.o obj/stm32f4xx_syscfg.o obj/stm32_eth.o obj/ethernet.o obj/clock-arch.o obj/timer.o obj/misc.o obj/uip.o obj/httpd.o obj/uip_arp.o obj/startup_stm32f4xx.o libgcc.a
obj/ethernet.o: In function `tapdev_read':
C:\OlimexODS\examples\STM32-E407_Ethernet/ethernet.c:391: undefined reference to `memcpy'
obj/ethernet.o: In function `tapdev_send':
C:\OlimexODS\examples\STM32-E407_Ethernet/ethernet.c:421: undefined reference to `memcpy'