With my Freedom KL25Z board I’m using the GNU/gcc build tools and Eclipse/CodeWarrior. When I wanted to create an S19 file of my application using the GNU tools, this was not that easy to find out. So here are the steps to do this:
I open the project setting using the menu Project > Properties and go to C/C++ Build > Settings > Additional Tools and enable’Create Flash Image‘:
Now I need to press the Apply button:
Pressing the Apply button will show up an additional ‘Create Flash Image’ group. Many other formats are available in the drop down as shown in the screenshot.
Now I can specify S-Record/S19 as output format:
Pressing OK, and building my project again will show up the S19 file together with the application file:
Post Build Step
A generic way to generate the S19 file is to use a post build step:
In the above screenshot, I’m using the objcopy (which is present in my PATH environment variable). It is using the command line options described here. See DIY Free Toolchain for Kinetis: Part 2 – Eclipse IDE for more details.