‑‑section
Syntax
‑‑sectionOldName=NewName
Description
The compiler places functions and data objects into named sections which are referred to by the IAR ILINK Linker. Use this option to change the name of the section OldName to NewName.
This is useful if you want to place your code or data in different address ranges and you find the @ notation, alternatively the #pragma location directive, insufficient.
Note
Any changes to the section names require corresponding modifications in the linker configuration file.
These default sections and section qualifiers can be renamed: .data16, .data24, .data32, .sbdata, .text, .textrw, .switch, .inttable, bss, data, noinit, and rodata.
Example
To place functions in the section MyText, use:
‑‑section .text=MyText
See also
Controlling data and function placement in memory.
Caution
To set this option, use Project>Options>C/C++ Compiler>Extra Options.