9.90 --predefine="string"

Enables commands to be passed to the preprocessor when preprocessing a scatter file.

You specify a preprocessor on the first line of the scatter file.

Syntax

--predefine="string"
You can use more than one --predefine option on the command-line.
You can also use the synonym --pd="string".

Restrictions

Use this option with --scatter.

Example scatter file before preprocessing

The following example shows the scatter file contents before preprocessing.
#! armcc -E
lr1 BASE
{
    er1 BASE
    {
        *(+RO)
    }
    er2 BASE2
    {
        *(+RW+ZI)
    }
}
Use armlink with the command-line options:
--predefine="-DBASE=0x8000" --predefine="-DBASE2=0x1000000" --scatter=filename
This passes the command-line options: -DBASE=0x8000 -DBASE2=0x1000000 to the compiler to preprocess the scatter file.

Example scatter file after preprocessing

The following example shows how the scatter file looks after preprocessing:
lr1 0x8000
{
    er1 0x8000
    {
        *(+RO)
    }
    er2 0x1000000
    {
        *(+RW+ZI)
    }        
}
Related concepts
7.11 Preprocessing of a scatter file
Related reference
9.102 --scatter=filename
Non-ConfidentialPDF file icon PDF versionARM DUI0377G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.