Download C Cross Compiler User's Guide for CORTEX-M

Transcript
Linker Options
Segment Control Options Usage (cont.)
Option
Description
-n*
set the output name of the segment to *. Segment output
names have at most 15 characters; longer names are truncated. If no name is given with a -n option, the segment
inheritates a default name equal to its assembler section
name.
For example, use this option when you want to generate the
hex records for a particular PROM, such as:
+seg .text -b0x2000 -n prom1
<object_files>
+seg .text -b0x4000 -n prom2
<object_files>
...
You can generate the hex records for prom1 by typing:
chex -n prom1 file.cxm
For more information, see “The chex Utility” in Chapter 8.
-o*
set the logical start address of the segment to * if -b option
is specified or the logical end address if -e option is specified. The default is to set the logical address equal to the
physical address. Options -b and -e cannot be specified
both if -o has been specified.
-q*
enable a manual initialization mechanism by specifying a
name of an empty segment which will host the initialization
image of the current segment. See “Manual Segment Initialization” on page 286.
-r*
round up the starting address of the segment and all the
loaded sections. The expression defines the power of two of
the alignment value. The option -r3 will align the start
address to an 8 bytes boundary. This option has no effect if
the start address is explicitly defined by a -b option and has
no effect on the first object module.
© 2012 COSMIC Software
Using The Linker 271