You copied the Doc URL to your clipboard.

Preprocessing a scatter file when linking with armlink

Preprocessing a scatter file when linking with armlink in Arm® Compiler 6 requires extra options.

The following shows the required change to the first line of the scatter file:

Arm Compiler 5
#!armcc -E
Arm Compiler 6

#!armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m7 -xc

The mandatory option --target specifies the target state, either AArch32 state, as shown in this example, or AArch64 state. See --target.

The option -mcpu specifies a processor, Cortex®‑M7 in this example. You can also use -march to specify an architecture. See -mcpu or -march.

The option -x specifies the source language. See -x.

The option -E makes armclang only execute the preprocessor step. See -E.