Registering a new flash algorithm

Note

To register flash algorithms, you must have a valid ARM® Compiler license file.

Before carrying out any flash programming operations you must register your flash algorithm with the debugger. You can use the flash list command to display all the registered flash algorithms.

Flash algorithms are comprised of one or more object files containing code that runs on the target to access the flash device. An XML file describes these object files along with some additional meta data. The XML file must be registered with the debugger before the flash algorithm can be used.

Show/hidePrerequisites

Before registering a flash algorithm you must ensure that you have a set of object files that are generated by compiling the algorithm source files.

Show/hideProcedure

To register a new flash algorithm:

  1. Create an XML file that describes the algorithm that you want to register. The XML tags include the following:

    id

    Unique name containing only alphanumeric characters, hyphens or underscore characters.

    type

    NOR or NAND. Used to represent the type of flash device.

    byteOrder

    LE, BE8, or BE32. Used to represent the endianness of the flash device.

    microlib

    True or false. Specifies whether to use the microlib C library or the standard C library.

    name

    User-friendly name. You can specify multiple name tags with different language attributes.

    param

    Dependent on the algorithm. List consisting of key and defaultValue attributes that are required by the algorithm.

    object

    Dependent on the algorithm. Lists all the object files and relative paths to the XML file.

    Example 13. Typical XML configuration file containing two devices

    <flashDevices>
        <flashDevice id="IntegratorAPDevice"
            type="NOR" cpu="ARM7TDMI" byteOrder="LE" microLib="false">
            <name value="Intel DT28F320S3 2Mx16 x2 x4" lang="en"/>
            <params>
                <param key="baseAddress" defaultValue="0x24000000"/>
                <param key="endAddress" defaultValue="0x24200000"/>
            </params>
            <objects>
                <object file="integratorAP\IntegratorAP.o"/>
            </objects>
        </flashDevice>
        <flashDevice id="IntegratorCPDeviceLE" 
            type="NOR" cpu="ARM7TDMI" byteOrder="LE" microLib="false">
            <name value="Intel DT28F640J3A 64Mbit x2 (le)" lang="en"/>
            <params>
                <param key="baseAddress" defaultValue="0x24000000"/>
                <param key="endAddress" defaultValue="0x24200000"/>
            </params>
            <objects>
                <object file="integratorCP\IntegratorCP-le.o"/>
            </objects>
        </flashDevice>
    </flashDevices>
    

  2. Use the flash register command to find algorithms that are described in XML files and register them with the debugger. For example:

    flash register "usr\algorithms"     # Register flash algorithms from the
                                         # directory: usr\algorithms
    

Show/hideSee also

Copyright © 2010, 2011 ARM. All rights reserved.ARM DUI 0446G
Non-ConfidentialID092311