I’m dealing a lot with bootloaders recently (see “Flash-Resident USB-HID Bootloader with the NXP Kinetis K22 Microcontroller“), and bootloaders are sometimes very picky about what file format they are able to consume. So what if I have a binary (see “S-Record, Intel Hex and Binary Files“) file and I need to convert it into the Intel Hex format?
Using the ‘SRecord‘ tool it is actually very simple:
srec_cat.exe srcFile.bin -binary -output dstFile.hex -Intel
With the -binary option I load the binary file and with the -Intel option used with the -output I can convert the file.
Below it shows a binary and its converted version in Eclipse (see “5 Best Eclipse Plugins: #4 (EHEP)“).
Happy Hexing 🙂
- SRecord Tool on SourceForge: http://srecord.sourceforge.net/
- Flash-Resident USB-HID Bootloader with the NXP Kinetis K22 Microcontroller
- S-Record, Intel Hex and Binary Files
- Merging S19 Files
- Tutorial: CRC32 Checksum with the KBOOT Bootloader