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

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

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

Jump to solution
1,291 Views
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 Kudos
1 Solution
1,275 Views
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/ 

 

 

View solution in original post

0 Kudos
4 Replies
1,276 Views
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 Kudos
1,246 Views
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,263 Views
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 Kudos
1,265 Views
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 Kudos