S19 vs. HEX

Showing results for 
Search instead for 
Did you mean: 

S19 vs. HEX

Contributor IV

We use CW to create S19 files. Then we have a 3rd party app that converts that S19 file into a HEX file format. This HEX file is then loaded onto external flash. Our bootloader pulls that HEX file from external flash into internal flash on the MCU to update the Application code.


Please help me understand more about this process.

  1. Why would CW provide an S19 file if the MCU is expecting a HEX file?
  2. Does CW have an option to output HEX files?
  3. Could I simply load the S19 file into external flash and then make my bootloader smart enough to convert that into HEX?

Project info:

MCU - MCF51CN128

IDE - CW 10.1

Labels (1)
4 Replies

Specialist III



There is a tool called burner.exe located in {Install}\MCU\prog directory.

This tool can be used to convert a Motorola S record file into an Intel Hex file.


Please refer to {Install}\MCU\Help\PDF\Build_Tools_Utilities.pdf chapter Burner Utility for more information on how this tool is working.

The tool can be use in interactive mode (using a GUI) or from batch.


To convert a S record file into a Hex file just specify the S record as input file and specify you want an Intel Hex file as output.

Adjust the other parameters and you should be done



0 Kudos

Specialist V

Hi Guys


I am tagging this question on here since the topic is (generally) related.


Specifically to CW10.1 - this can be configured to generate S19 output (by selecting the "Generate S-Record File" in the ARM linker output setting). However, unlike CW7 there doesn't seem to be the option to generate a binary output.

[As comparison, CW7 generates a Motorola format binary file - which is divided into blocks with an address and block length count for each block it generates (CW6 generated pure binary files)].


In some circumstances a 'pure' binary output file is needed for programming (eg. a tool that accepts only a binary image) and, for this reason, I have created a tool to convert from Motorola binary to pure binary (for info and not that relevant here).


When working with CW10.1 no binary is presently available and am wondering what would be the best way to generate it? Possibly there is a tool built in that will do this (how to activate it and will it generate Motorola binary or pure binary?).

Otherwise a fall-back would be to use a post build step to call a bat file to use GCC objcopy.exe to convert the S19 to a binary. Although this will work (has been used in emergency with other tool chains before) it always seems strange to have to install the GCC tool chain to do such clean-up work for a different IDE. What would be best?






0 Kudos

Specialist V

Hi again


I have had a go at using the BURNER.EXE to do the work but didn't get very far since it is very powerful and so also very complicated to do simple things with. I read the manual and tried following examples but it beat me in to submission.


In addition, it seems as though it is limited to 3k output size for 32 bit processors when working with the Special Editions of CW (https://community.freescale.com/message/65808#65808), so I decided that it will generally be easier to use the GCC tool for a quick result and write a new utility to do this in the long run.






0 Kudos

Specialist I

To answer your questions:


1) .S19 is the Motorola S-Record format. This is an ACSII representation of the binary file in hexadecimal format. It's what a typical Freescale programmer expects. You are using a programmer that uses Intel HEX, which is bought and paid for, right? Hence the conversion headache.


2) There is a way to specify the type of ASCII format for the final output file. This is controlled by a scripting file, burner.bbl. You can specify Motorola S-Record or Intel HEX output. For more information, follow this link to our on-line infocenter.


3) Given the answer in 2) you probably know the answer to this question.