cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate an hex file to use directly for download?

ilcontefabio
Associate II

Hi,

I'm using TMS570 with SPC5STUDIO environment.

My toolchain generates out.elf and out.hex but I would like to have 

a byte hex stream (without address and other information) directly do use as download by

another microcontroller that lead TMS570.

I have to write a source code to analyze and parse the .hex or

it already exsist that format?

Thanks

Fabio

1 ACCEPTED SOLUTION

Accepted Solutions

The format is relatively trivial as object files go, well documented and 40 years or so old.

Tools like SRECORDs can output, modify, etc.

OBJCOPY, OBJDUMP and FROMELF among others can also be used in various forms.

 

http://www.s-record.com/

https://github.com/sierrafoxtrot/srecord

https://srecord.sourceforge.net/

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

 TMS570 is from Texas Instruments, you might mean SPC570?

Irrespective of this, a hex file in Intel format without address information is quite pointless, as it can consist of sections that are loaded at different addresses. For this reason, I am not aware of any ready-to-use tools. However, if you absolutely want the pure data, you could use external tools to remove the header with colon, record length and address, also the checksum byte at the end.

Hope that helps?
Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi,

yes sorry SPC570 :(

TMS570 is the other microcontroller that has to be donwload the code into SPC570 and for 

that reason I need a pure data because the other software still know where it must donwload the code.

Which external tool can I use for that?

Thanks

Fabio

Peter BENSCH
ST Employee

A simple text editor with a macro function, such as Notepad++, can do this without any problems.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

ok thanks

it should be better an external tool called directly by the toolchain or 

integrated into to have the nude data file coming form the toolchain automatically

Fabio

The format is relatively trivial as object files go, well documented and 40 years or so old.

Tools like SRECORDs can output, modify, etc.

OBJCOPY, OBJDUMP and FROMELF among others can also be used in various forms.

 

http://www.s-record.com/

https://github.com/sierrafoxtrot/srecord

https://srecord.sourceforge.net/

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi Tesla,

many thanks .... I will try

Fabio