It is sometimes useful to be able to automatically post-process your linked application, typically to run one or more of the GNU 'binutils'.
For example, any application project that you create using the Project wizard will have least one such "post-build step" - typically to display the size of your application.
Note: Additional commands may also be listed (for example to create a binary and to run a checksum command), but be commented out by use of a # character and hence not executed. Any commands following a comment #command will be ignored.
Adding addition steps is very simple.
In this example we are going to carry out three post-link steps:
To do this:
arm-none-eabi-size ${BuildArtifactFileName};
arm-none-eabi-objdump -S ${BuildArtifactFileName}>
${BuildArtifactFileBaseName}.lss;
arm-none-eabi-objcopy -O ihex ${BuildArtifactFileName}
${BuildArtifactFileBaseName}.hex;
Note that the above is actually a single line with each post-build step separated from the next by a ";" (semi-colon) character.
Next time you do a build, this set of post-link steps will now run, displaying the application size in the console, creating you an interleaved C/assembler listing file called <projectname>.lss and a hex file called <projectname>.hex.
Next time you do a build, this set of post-link steps will now run, displaying the application size in the console, creating you an interleaved C/assembler listing file called <projectname>.lss and a hex file called <projectname>.hex.
If you want to temporarily remove a step from your post-build process, rather than deleting it completely - move that entry to the end of the line and pre-fix it with a "#" (hash) character. This acts as a comment, causing the rest of the post-build-step line to be ignored.