12.8.15. Adding prelink and postlink commands

Prelink and postlink commands are run only when the linker is run. Prelink commands can be used to copy libraries or objects from other developers so that you do not have to build them yourself. Postlink commands might be used to convert the executable file into another format, for example to load to Flash or for loading by a specific operating system.

To add prelink and postlink commands to the build:

  1. Select Project → Project Properties... to display the Project Properties window.

  2. Right-click on the *BUILD group in the List of Entries pane, and select Expand whole Tree from the context menu.

  3. Select the Pre_Post_Link group in the List of Entries pane.

  4. Right-click on the Pre_link setting in the Settings Values pane, and select Edit Value from the context menu.

  5. Type @+echo This is before linkage and then press Enter to confirm the value.

    This string is output every time you build or rebuild, the application, but the command is not displayed when it is executed.

  6. Right-click on the Post_link setting in the Settings Values pane, and select Edit Value from the context menu.

  7. Type +copy $(PROGRAM) $\temp.axf and then press Enter to confirm the value.

    Type this exactly as shown.

    This postlink command copies the output from the build, that is dhrystone.axf, to another location. In this case, you are sending the executable file to a temporary location, but it might be a predefined central location for images to be debugged.

    The copy command is displayed in the Build tab when executed.

  8. Select File → Save and Close to regenerate the makefile(s) for the project, and close the Project Properties window.

  9. Select Tools → Build... to rebuild the application.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B
Non-Confidential