Skip to main content

IAR Embedded Workbench for Arm 9.70.x

‑‑no_rw_dynamic_init

In this section:
Syntax

‑‑no_rw_dynamic_init

Description

Use this option to disable runtime initialization of static C variables.

C source code that is compiled with ‑‑ropi or ‑‑rwpi cannot have static pointer variables and constants initialized to addresses of objects that do not have a known address at link time. To solve this for writable static variables, the compiler generates code that performs the initialization at program startup (in the same way as dynamic initialization in C++).

See also

‑‑ropi and ‑‑rwpi.

Caution

Project>Options>C/C++ Compiler>Code>No dynamic read/write/initialization