bug-binutils
[Top][All Lists]
Advanced

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

Objcopy to convert binary file to object file for Cortex-M4


From: Fischer, Steve
Subject: Objcopy to convert binary file to object file for Cortex-M4
Date: Thu, 2 Jan 2014 15:10:46 -0600

All,

 

I’m using the objcopy utility for ARM to convert a binary file into an object file to be linked into a system build and I’m running into an issue that I hope someone can help with.  The issue is that the resulting object file is in the ARM EABI 0 format instead of the ARM EABI 5 format required by the linking process.

 

Some details:

 

-          The tool chain used is built for RTEMS similar to http://www.rtems.org/wiki/index.php/Building_Tools

-          The version of binutils used is 2.24

-          The target microcontroller is a Cortex-M4, thus it uses the “armv7-m” architecture and as I understand it must use the EABI 5 format

 

The command used to convert the binary file to an object file is:

 

arm-rtems4.11-objcopy –I binary –B arm –O elf32-littlearm <input-binary-file>.bin <output-object-file>.o

 

This operation appears to work in that the <outputfile>.o file is created.

 

When the linker attempts to build the elf file I receive the following error:

 

ld: error: Source object <output-object-file>.o has EABI version 0, but target <output-elf-file>.elf has EABI version 5

 

The linker is actually called via a call to “arm-rtems4.11-g++” with numerous options and *.o files and such.  The only significant options I see that are related to this issue are “-march=armv7-m –mthumb”.

 

I’ve tried a number of different approaches but haven’t hit on a winning combination.

 

My question is if there is an existing means to perform the appropriate binary to ARM EABI 5 object file conversion or whether this support is just missing from the current utilities?

 

FYI, we used this same sort of binary to object conversion (via objcopy) on a prior non-ARM architecture and it worked fine.

 

Regards,

 

Steve.


CONFIDENTIALITY STATEMENT. This email and any attachment is for the sole use of the intended recipient and may contain private, confidential and/or privileged information that may be subject to Hospira internal policies. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you have received this transmission in error, please notify Hospira immediately by return email or by email to address@hidden and delete the message and all copies and attachments from your system.   ­­  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]