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: Steve
Subject: Objcopy to convert binary file to object file for Cortex-M4
Date: Fri, 3 Jan 2014 07:43:43 -0600

All,


Sorry for my previous email blunder ... obviously I don't post to public forums often :).


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


I’m trying to use 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.

 

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.


reply via email to

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