How do you make a single binary file from multiple elf files

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

How do you make a single binary file from multiple elf files

跳至解决方案
1,807 次查看
MattJCole
Contributor V

 

I made a S32DS application project that has all the cores active in it. I would like to have a single binary file created from the three elf files. I am using S32 Design Studio for Power Architecture Version 2.1 as the IDE.

0 项奖励
回复
1 解答
1,791 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

one method is create only one elf for your multicore project - https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/Example-MPC5777C-Single-ELF-multi-core... 

 

Other method can be create binaries for all .elfs and merge them. But in raw binary - there is no info about addresses. Better idea is create three s-records and merge it with srecord tools - https://srecord.sourceforge.net/ 

 

 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,792 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

one method is create only one elf for your multicore project - https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/Example-MPC5777C-Single-ELF-multi-core... 

 

Other method can be create binaries for all .elfs and merge them. But in raw binary - there is no info about addresses. Better idea is create three s-records and merge it with srecord tools - https://srecord.sourceforge.net/ 

 

 

0 项奖励
回复
1,762 次查看
MattJCole
Contributor V

 

I got it to working. The problem I was having is that I had the wrong address for start for the other cores. Once I fixed the address for the start everything worked.

srec_cat BuoyOperMulticore_Z4_0.bin -Binary -offset 0x00000000 -fill 0xff 0x00000000 0x00005000 BuoyOperMulticore_Z4_1.bin -Binary -offset 0x00005000 -fill 0xff 0x00005000 0x0000A000 BuoyOperMulticore_Z2_2.bin -Binary -offset 0x0000A000 -o combined.bin -Binary

1,779 次查看
MattJCole
Contributor V

I got it to create a single binary file but am not able to get the other cores to start when programmed with a boot loader. Is there something special needed to get the other cores started? Do you have an example for the MPC5748G processor that uses all cores and built into a single binary file.

0 项奖励
回复
1,781 次查看
MattJCole
Contributor V

 

I am currently testing the srec tool and it looks promising. Once I get it to work I will "accept as solution". You actually can use the srec tool to combine multiple binary files.

0 项奖励
回复