Code
The Code options control the code generation of the compiler.

For more information about these compiler options, see Compiler options.
Processor mode
Selects the processor mode for your project:
- Arm
Generates code that uses the full 32-bit instruction set.
- Thumb
Generates code that uses the reduced 16-bit instruction set. Thumb code minimizes memory usage and provides higher performance in 8/16-bit bus environments.
Position-independence
Determines how the compiler should handle position-independent code and data:
- Code and read-only data (ropi)
Generates code that uses PC-relative references to address code and read-only data.
- Read/write data (rwpi)
Generates code that uses an offset from the static base register to address-writable data.
- Read/write data style
Specifies how the offset from the static base register is calculated. Choose between:
The compiler uses offsets relative to the static base register
(R9).The compiler uses offsets relative to the global offset table (GOT). This setting is used when generating code for shared objects. Because this behavior is set implicitly by the option Shared object on the General>Output page, there is no need for setting this explicitly.
- No dynamic read/write initialization
Disables runtime initialization of static C variables.
Security
Controls various features that increase the integrity of your application and device:
- No data reads in code memory
Use this option to generate code that should run from a memory region where it is not allowed to read data, only to execute code.
The option also affects the automatic library selection performed by the linker. An IAR-specific ELF attribute is used for determining whether libraries compiled with this option should be used.
This option can only be used with Armv6-M and Armv7-M cores (includes Armv8-M, Armv8.1-M, Armv8-A and Armv8-R cores). For more information, see the compiler option
‑‑no_literal_poolin the IAR C/C++ Development documentation.
- Stack protection
Use this option to enable stack protection for the functions that are considered to need it.
- Pointer authentication
Use this option to make the compiler create the code needed for Pointer Authentication. For more information, see Branch protection (PACBTI) — 32-bit mode only.
- Branch target identification
Use this option to make the compiler create the code needed for Branch Target Identification. For more information, see Branch protection (PACBTI) — 32-bit mode only.