5.1.6.2 Attributes that Modify Section Types [DD]
Depending on the attribute, all or some section types may be modified by it, as below.
Attribute* | Description | Attribute applies to** |
---|---|---|
address(a) |
locate at absolute address a | auxflash ,
bss , code , data ,
eedata , heap ,
memory , persist ,
psv , stack |
near |
locate in the first 8K of memory | bss ,
data , persist |
xmemory |
locate in X address space | bss ,
data , heap ,
persist |
ymemory |
locate in Y address space | bss ,
data , heap ,
persist |
reverse(n) |
align the ending address +1 | auxflash ,
bss , data ,
eedata , memory ,
persist , psv |
align(n) |
align the starting address | auxflash ,
bss , code , data ,
eedata , heap ,
memory , persist ,
psv , stack |
noload |
allocate, do not load | auxflash ,
bss , code , data ,
eedata , memory ,
persist , psv |
merge(n) |
mergable elements of size n*** | auxflash ,
code , data ,
eedata , psv |
info |
do not allocate or load | auxflash ,
bss , code ,
data |
dma |
locate in DMA space | bss ,
data , persist |
boot |
locate in boot segment | bss ,
code , eedata ,
psv |
secure |
locate in secure segment | bss ,
code , eedata ,
psv |
eds |
locate in extended data space | bss ,
data , persist |
shared |
use section outside of application | auxflash ,
bss , code , data ,
eedata , memory ,
psv , stack |
preserved |
preserve variables on restart | bss ,
data , memory ,
persist |
update |
initialize variables on restart | bss ,
data , memory ,
persist |
priority(n) |
group variable initializations together. | auxflash ,
bss , code ,
data |
page |
do not cross page boundary | auxflash ,
bss , code , data ,
persist , psv |
* = Not all devices support
all attributes. ** = See 5.1.6.1 Attributes that Represent Section Types [DD] for descriptions and device support. *** = This attribute could be used by a linker to merge identical constants across input files. If n=0, the section contains null-terminated strings of variable length. |
Attributes that modify section types may be used in combination. For
example, xmemory,address(a)
is a valid attribute string, but
xmemory,address(a),ymemory
is not. [DD]
Attribute* | Attribute can be combined with* |
---|---|
address |
near ,
xmemory , ymemory ,
noload , dma ,
boot , secure , eds ,
page |
near |
address ,
xmemory , ymemory ,
reverse , align ,
noload , merge |
xmemory |
address ,
near , reverse ,
align , noload ,
merge , eds ,
page |
ymemory |
address ,
near(30,33) , reverse ,
align , noload ,
merge , eds ,
page |
reverse |
near ,
xmemory , ymemory(30/33) ,
noload , merge ,
dma , boot ,
secure , eds ,
page |
align |
near ,
xmemory , ymemory(30/33) ,
noload , merge ,
dma , boot ,
secure , eds ,
page |
noload |
address ,
near , xmemory ,
ymemory , reverse ,
align , dma , boot ,
secure , eds ,
page |
merge |
near ,
xmemory , ymemory ,
reverse , align ,
eds , page |
info |
N/A |
dma |
address ,
reverse , align ,
noload , eds ,
page |
boot |
address ,
reverse , align ,
noload , eds ,
page |
secure |
address ,
reverse , align ,
noload , eds ,
page |
eds |
address ,
xmemory , ymemory ,
reverse , align ,
noload , merge ,
dma , boot ,
secure , page |
shared |
address ,
near , xmemory ,
ymemory , reverse ,
align , noload ,
merge , dma , boot ,
secure , eds ,
preserved , update ,
priority , page |
preserved |
address ,
near , xmemory ,
ymemory , reverse ,
align , noload ,
merge , dma , eds ,
shared , priority ,
page |
update |
address ,
near , xmemory ,
ymemory , reverse ,
align , noload ,
merge , dma , eds ,
shared , priority ,
page |
priority(n) |
address ,
near , xmemory ,
ymemory , reverse ,
align , dma , boot ,
secure , eds ,
shared , preserved ,
update , page |
page |
address ,
xmemory , ymemory(30, 33) ,
reverse , align ,
noload , merge ,
dma , boot ,
secure , eds |
* = Not all devices support all attributes. |