March 28, 2024, 01:27:50 PM

OlimexODS problems !

Started by anotherbrick, December 20, 2012, 06:31:39 PM

Previous topic - Next topic

anotherbrick

I am trying to compile a C Program with OlimexODS since 1 month
the result is as follows:

if I link with arm-none-eabi-ld in Makefile it doesnot link with libgcc.a no matter what I do
I tried everything from copying the libgcc.a in project directory to using switches -lgcc and so on
no success
console output :
Quote
..linking
arm-none-eabi-ld -g -v -nostartfiles -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_tim.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/psock.o obj/httpd-fs.o obj/httpd-cgi.o obj/http-strings.o obj/syscall.o obj/startup_stm32f4xx.o libgcc.a
obj/main.o: In function `main':
GNU ld (GNU Binutils) 2.20.1.20100303
C:\OlimexODS\examples\STM32-E407_Ethernet/main.c:360: undefined reference to `memcpy'

if I link with arm-none-eabi-gcc it links however it produces code
which includes 32 bit libraries (ARM7/ARM9)
which when I download to the board causes hardfault

you can see following discussion in STM32 forum

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex%5fmx%5fstm32%2fhelp%20%21%20memcpy%20causes%20hardfault&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https%3A%2F%2Fmy%2Est%2Ecom%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex%5Fmx%5Fstm32%2FAllItems%2Easpx&currentviews=181


I want ask
is there anybody who uses OlimexODS ?can he tell me how he compiles with libgcc.a library succesfully ?
what is the Makefile adjustments ?

regards

maria_olimex

Hello,

From what I can see you're linking libgcc.a correctly, your issue is with the memcpy() function.
C:\OlimexODS\examples\STM32-E407_Ethernet/main.c:360: undefined reference to `memcpy'
Take a look here and see if this applies to your main.c file:
http://stackoverflow.com/questions/10659914/memcpy-on-gcc-code-sourcery-for-arm
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3934.html

Best Regards,
Maria/OLIMEX
Software developer at Olimex