Forum: ARM programming with GCC/GNU tools Problems moving to yagarto from gnuarm

Author: Rui (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi all.
I'm using GNUARM with gcc 4.0.2.
I installed YAGARTO with gcc 4.4.1 and I was trying to compile my 
project with it.
My project uses a LPC2292.
When I try to compile my project with yagarto I get errors like this:

e:  ERROR: c:/program 
files/yagarto/bin/../lib/gcc/arm-elf/4.4.1\libgcc.a(_udivsi3.o) uses 
hardware FP, whereas armit_21.o uses software FP

e:  failed to merge target specific data of file c:/program 

e:  error: no memory region specified for loadable section `.eh_frame'

I try to compile my file with option -mhard-float but the result is the 
I also try the options -mfloat-abi=softfp and -msoft-float but the 
result is the same.
Can anyone help with this?
I'm around this for a couple of days and I'm stuck.

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
- Use the compiler-frontend (arm-elf-gcc) for linking, do not call the 
linker (arm-elf-ld) directly
- Pass the target specific options to the gcc-call for linking as you 
use for compilation (mcu, thumb, thumb-interwork...)
- Show the complete output of "make all" so all options for compiling 
assembling and linking can be seen.
- Show the linker-script
- Create a minimal example with all needed files (makefile, sources, 
linker-script) to reproduce the problem, pack them into a zip-file and 
attach the zip-file to a forum-message.

Author: Giovanni Di sirio (gdisirio)
Posted on:

Rate this post
0 useful
not useful
The .eh_frame section is a known GCC 4.4.x problem: 

You have to discard it by adding something like this to the linker 
    /DISCARD/ :

ChibiOS/RT http://chibios.sourceforge.net

Author: Rui (Guest)
Posted on:

Rate this post
0 useful
not useful
Thank you very much Giovani.

Your solution works just fine.
I can compiled without any problems and the program runs in my board as 
I expected.

I had found the .eh_frame section issue already.
But I had implemented the solution found in the yagarto site:
. = ALIGN(4);
.eh_frame :
     KEEP (*(.eh_frame))
} > ram

It compiled ok but I couldn't download the program using lpc21isp 
(version 1.64).
I got this error:
«New Extended Linear Address Record [04] out of memory range
Current Memory starts at: 0x00000000, new Address is: 0x40000000»
So I remove this section and went back to the linker problem.

Thank you very much once again.

Author: Rui (Guest)
Posted on:

Rate this post
0 useful
not useful
Thank you very much Martin.
I learn many in the past from your posts.

By my reply to Giovani you can see my problem is solved.
Nevertheless I would like to give you some feedback on your post.
Maybe I'm doing things in the wrong way or they could be done better.
Your feedback is appreciated.

For compiling I'm using:
arm-elf-gcc -I"inc" -I"inc/tcp_ip" -mcpu=arm7tdmi -c -save-temps 
-fverbose-asm -Wall -Wextra -Wmissing-include-dirs -Wswitch-default 
-Wfloat-equal -Wundef -Wcast-qual -Wpacked -Wshadow -Wcast-align 
-Wswitch-enum -Wbad-function-cast -Winit-self -Wpointer-arith 
-Waggregate-return  -Wstrict-prototypes -Wmissing-prototypes 
-Wmissing-declarations -O3 src/main.c

For linking
arm-elf-gcc -nostartfiles -Wl,-Map=armit_21.map,--cref,-nostdlib \
  -Tlink/lpc2292.ld -s -o armit_21.o asm/crt0.s \
  asm/interrupts.s main.o cmd_int.o nv_mem.o app_can.o card.o ...

arm-elf-objdump -x -t --source --full-contents armit_21.o > armit_21.dmp

arm-elf-objcopy --output-target ihex armit_21.o armit_21.hex



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.