GENERAL: CREATING MOTOROLA S-RECORD FILES
Information in this article applies to:
My device programmer only supports the Motorola S-Record file format. How can I convert the HEX files created by the object-HEX converters into S-Record files?
For all other microcontroller devices, we recommend to use the free utility srec_cat.exe, which is part of the SRecord project hosted on sourceforge.net. This utility is available as Windows EXE file from https://sourceforge.net/projects/srecord/files/srecord-win32. You can manipulate one or multiple HEX files in many ways and then convert it to a Motorola S-Record file.
You can invoke srec_cat.exe from a Windows command prompt or Make tool:
srec_cat.exe HexFile.hex -Intel -o MotorolaFile.srec -Motorola
You can also invoke this tool after each project build/rebuild by specifying its invocation in the µVision dialog Options for Target - User - After Build/Rebuild. In this example, the HEX file which is generated by a µVision project build/rebuild is converted to a Motorola S-Record file in the same folder. Please see the description of µVision key sequences for more details. If many parameters are needed, it may be easier to use a command file. When using a command file for srec_cat.exe, be sure to double the '@' character, or µVision might interpret it as a key-sequence.
For a full description of all srec_cat.exe parameters, refer to the SRecord Reference Manual. Here are some options which are useful with Keil tools:
Last Reviewed: Tuesday, July 17, 2018
of your data.