.elf to .bin

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

.elf to .bin

580 Views
saurabhkulkarni123
Contributor II

Hello NXP

How can we generate .bin file through NXP MBDT instead of .ELF or Is there any way to convert .elf to .bin

0 Kudos
1 Reply

503 Views
Irina_Costachescu
NXP Employee
NXP Employee

Hi @saurabhkulkarni123 

MBDT for S32K1 does not perform the generation of .bin files during the process of building a model, however, for this, you could use the arm-none-eabi-objcopy.exe utilitary which can be found in the following path <toolbox_root>/tools/gcc-6.3-arm32-eabi/bin.
You could open the Windows Command Prompt at this location and type the following command:
arm-none-eabi-objcopy -O binary ${full_path_to_elf_file} ${full_path_to_binary_file}

Moreover, you could create a Matlab script that executes this command and run this script whenever you need to generate a .bin file based on a generated .elf. For executing such commands from the Matlab environment you could use the system function, please check the following link from MathWorks documentation. Please let us know in case additional information is needed.

Hope this helps,
Irina

0 Kudos