**** Advance Notice ****

This site will be closed on 31 December 2015,

Important Information for users of NXP LPCXpresso

This site is for users of Code Red branded products.

NXP LPCXpresso users should visit the LPCXpresso FAQ's for up-to-date information relevant to that product.

Post-processing your linked application

It is sometimes useful to be able to automatically post-process your linked application, typically to run one or more of the GNU 'binutils'.

Any new project that you create using the Project wizard will usually have least one such "post-build step" - typically to display the size of your application. Additional commands may also be listed (for example to create a binary and to run a checksum command), but be commented out (and hence not executed) by use of a # character.

But adding addition steps is very simple.

In this example we are going to carry out three post-link steps:

To do this:

  1. Open the Project properties. There are a number of ways of doing this. For example, make sure the Project is highlighted in the Project Explorer view then open the menu "Project -> Properties".

  2. In the left-hand list of the Properties window, open "C/C++ Build" and select "Settings".
  3. Select the "Build steps" tab
  4. In the "Post-build steps - Command" field, enter:

      arm-none-eabi-size ${BuildArtifactFileName}; 
      arm-none-eabi-objdump -S ${BuildArtifactFileName} >${BuildArtifactFileBaseName}.lss;
      arm-none-eabi-objcopy -O ihex ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.hex;
  1. Click apply
  2. Repeat for your other Build Configurations (Debug/Release)

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.

Temporarily removing post-build steps

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.

More information

PostProcessApp (last edited 2011-09-13 07:44:59 by CrSupportAb)