SREC file generation from command line

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

SREC file generation from command line

跳至解决方案
3,320 次查看
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 项奖励
回复
1 解答
3,295 次查看
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. 

 

在原帖中查看解决方案

4 回复数
3,296 次查看
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,278 次查看
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 项奖励
回复
3,270 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

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

 

0 项奖励
回复
3,291 次查看
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 项奖励
回复