[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to migrate from arm-linux-gnu-gcc to arm-linux-gnueabi-gcc?



Hi,

2011/3/14 Dmitry E. Oboukhov <unera@debian.org>:

> I used lenny's gcc crosscompiler arm-linux-gnu-gcc. I built a
> microcontroller (AT91SAM9XE512) program by it.
> Now I've upgraded my distro upto squeeze.
> It contains arm-linux-gnueabi-gcc.
>
> All my programs are built but don't work now.

arm-linux-gnu was old ABI, while arm-linux-gnueabi is using Embedded ABI.

You should make sure your code is using EABI calling conventions, your
linker script is EABI compliant and your processor is able to execute
EABI code, check whether you need to produce Thumb or Thumb2 code.
Having said that you probably need an updated linker script.

In case it helps, here is an example of linker script which you might
need to adapt to you current processor:

MEMORY
{
  ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
  rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
}
SECTIONS
  {
        .  = 0x0;          /* From 0x00000000 */
    .text : {
    *(vectors)      /* Vector table */
    *(.text)        /* Program code */
    *(.rodata)      /* Read only data */
    } >rom
        .  = 0x20000000;   /* From 0x20000000 */
    .data : {
    *(.data)        /* Data memory */
    } >ram AT > rom
  .bss : {
    *(.bss)         /* Zero-filled run time allocate data memory */
    } >ram AT > rom
 }
/*========== end of file ==========*/


I hope it helps!

Best regards,
-- 
 Héctor Orón

"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."

-- Day DVB-T stop working nicely
Video flare: http://antwrp.gsfc.nasa.gov/apod/ap100510.html


Reply to: