Skip to main content

IAR Embedded Workbench for RX 5.20

section

In this section:
Syntax
#pragma section="NAME" [__memoryattribute]  

alias

#pragma segment="NAME" [__memoryattribute] 
Parameters

NAME

The name of the section.

__memoryattribute

An optional memory attribute identifying the memory the section will be placed in—if not specified, default memory is used.

Description

Use this pragma directive to define a section name that can be used by the section operators __section_begin, __section_end, and __section_size. All section declarations for a specific section must have the same memory type attribute and alignment.

The __memoryattribute parameter is only relevant when used together with the section operators __section_begin, __section_end, and __section_size.

If an optional memory attribute is used, the return type of the section operators __section_begin and __section_end is:

void __memoryattribute *.

Note

To place variables or functions in a specific section, use the #pragma location directive or the @ operator.

Example
#pragma section="MYdata16" __data16
See also

Dedicated section operators, and Linking your application.