I'm planning to work on a bootloader project for my MPC5748G. *.elf file can't not be parsed easily, so I want to convert it to *.hex file. Is there any build-in tool in S32 that can do this job?
you can also create .hex file directly in design studio. Open project properties and C/C++ Build -> Setting. Check Create flash image button and click OK.
Now open project properties again and choose Standard S32DS Create Flash Image -> General. There are four output file formats and one of these is Intel HEX. Choose HEX and click OK. Build your project once again.
After the build, hex file is placed in Debug folder.
I'm using the open source SRecord (SRecord 1.64) utility for this and all kind of advanced convertsion and manipulation. It can be called from Eclipse/S32 Design Studio as part of the 'post build step'.
It supports both 32bit and 16bit Intel .hex files:
An Intel hex format file will be written. (See srec_intel(5) for a description of this file format.) The default is to emit “i32hex” 32-bit linear addressing; if you want “i16hex” 20-bit extended segment addressing use the −address-length=3 option, if you want “i8hex” 16-bit addressing use the −address-length=2 option.
An Intel-16 hex format (INHX16) file will be written. (See srec_intel16(5) for a description of this file format.)
For other usage, see
I hope this helps,
Thank you. Martin Kovar provides another for S32. If you aslo use S32, you can try it as well.
As we are trying to generate .hex file, default its generating with record type as Extended segment address( type 2) .We need .hex file with extended linear address(type 4).Please let me know any changes need to be done.
Great! Thank you very much, it works.
I did what you said, and why did the compiler make a mistake?
I'm trying to use the S32K144 chip. When I tried to flash the "bin" file to S32K144, it failed.
Doesn't S32K144 support "bin" type? "elf" and "hex" work well.
Retrieving data ...