Hi,
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?
Solved! Go to Solution.
Hi,
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.
Regards,
Martin
Hi,
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.
Regards,
Martin
Hi,
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.
Thank you,
BR,
Seunghyun Um
Hi Martin,
I did what you said, and why did the compiler make a mistake?
Great! Thank you very much, it works.
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:
−Intel | 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. |
−Intel_HeX_16
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
https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/
https://mcuoneclipse.com/2015/09/23/aligning-s19-records-to-64-bit-boundaries/
https://mcuoneclipse.com/2016/02/26/merging-s19-files/
I hope this helps,
Erich
Hi Erich,
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.
Thank you. Martin Kovar provides another for S32. If you aslo use S32, you can try it as well.