10.10. Converting ARM linker ELF output to binary ROM formats

By default, the ARM SDT 2.50 linker produces industry-standard ELF images. For embedded applications, the image usually needs to be converted into a binary format suitable for an EPROM programmer.

For more information on the ARM ELF implementation, refer to the ELF documentation in c:\ARM250\PDF\specs. For the command-line options for fromELF, see Chapter 8 Toolkit Utilities in the ARM Software Development Toolkit Reference Guide.

Follow these steps to add a FromELF build step to a project template:

  1. Select the root of the project tree view. Choose Edit variables for project.apj... from the Project menu. The Edit variables dialog is displayed.

  2. Find the variable named build_target and change its value from <$projectname>.axf to <$projectname>.bin and click OK.

  3. Choose Edit Project template from the Project menu. The Project Template Editor dialog is displayed.

  4. Select Edit Details... and add (ROM) to the title.

  5. Create a CreateROM build step by clicking on the New... button in the Project template Editor dialog.

    The Create a new build step pattern dialog is displayed.

  6. Type CreateROM in the Name field, and click OK. An empty Edit Build Step Pattern dialog for CreateROM appears.

  7. In the Command Lines field, type (on one line):

    <fromelf> <FROMELFOPTIONS> <$projectname>.axf -bin <$projectname>.bin

    The -bin option produces a Plain Binary image, suitable for blowing into ROM.Other output formats are also available, for example:

    • Motorola 32 bit Hex (-m32)

    • Intel 32 bit Hex (-i32)

    • Intellec Hex (-ihf).

  8. In the Input Partition, type:


  9. In the Input Pattern, type:


    This should match the Link build step output pattern.

  10. Click Add.

  11. In the Output Partition, type:


  12. In the Output Pattern, type:


    This should match the Link build step output pattern.

  13. Click Add, then OK.

  14. Select Edit variables for project.apj... from the Project menu.

    1. In the Name field of the Edit variables dialog, type


    2. In the Value field, type your chosen options, for example:


  15. Click OK.

  16. If you want to re-use this template for another project, save the template with the Save As Template option from the File menu.

  17. Rebuild the project. If you see an error message like:

    "project.apj";  No build target named '<$projectname>.bin'

    1. Remove all source files from your project by highlighting the files, then pressing delete.

    2. Replace all source files into your project using the Add Files to Project from the Project menu.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D