SREC file generation from command line

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SREC file generation from command line

Jump to solution
3,111 Views
vsantos01
Contributor II

Hi

I'm using a custom build chain, using proprietary toolchain, that I launch from the command line (from my continuous integration system). I use tools from this toolchain to create an srec file from the linked elf.

I need to validate the output of the SREC generation and I've thought on using a different tool to generate again the srec and compare the two srec files obtained (build chain vs alternate tool). I have downloaded the S32K1 Design Studio (v3.5) hoping to get from there the tool needed, but all documentation I'm finding points on how to do it thorugh the IDE.

Which tool can be used to generate the srec file, out from an elf file, from the command line?

thanks

0 Kudos
Reply
1 Solution
3,086 Views
jiri_kral
NXP Employee
NXP Employee

Hi,

you can use gnu objcopy - 

arm-none-eabi-objcopy -O srec my.elf my.srec

 

With default install path is objcopy located in c:\NXP\S32DS.3.5\S32DS\build_tools\gcc_v9.2\gcc-9.2-arm32-eabi\bin\  folder. 

 

View solution in original post

4 Replies
3,087 Views
jiri_kral
NXP Employee
NXP Employee

Hi,

you can use gnu objcopy - 

arm-none-eabi-objcopy -O srec my.elf my.srec

 

With default install path is objcopy located in c:\NXP\S32DS.3.5\S32DS\build_tools\gcc_v9.2\gcc-9.2-arm32-eabi\bin\  folder. 

 

3,069 Views
vsantos01
Contributor II

Ok, I can generate an srec file already which seems to match my needs. Now I just need to tweak around the options to get the same file I'm generating with the other tool. Thanks!

0 Kudos
Reply
3,061 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

if you need different format - you can use srec_cat tool: 
https://srecord.sourceforge.net/

 

0 Kudos
Reply
3,082 Views
vsantos01
Contributor II

Thanks for the feedback. I will give it a try, though I read on the web that it generates intel hex file and I'm not sure it will work for the project. Be back with results.

0 Kudos
Reply