CONFIG_LOG2_ALWAYS_RUNTIME¶
Always use runtime message creation (v2)
Type: bool
Help¶
If enabled, runtime method is always used for message creation. Static
creation relies on compiler being able to optimize and remove code
based on information known at compile time. It is recommended to
enable this option when optimization is disabled because some compilers
(seen on arm_cortex_m and x86) were using unrealistic amount of stack
for dead code. Option applies to v1 as well because distinction
between versions is done by the compiler.
Default¶
- y if - NO_OPTIMIZATIONS
Kconfig definition¶
At <Zephyr Subsystem>/logging/Kconfig.misc:37
Included via Kconfig:8 → Kconfig.zephyr:44 → <Zephyr Subsystem>/Kconfig:31 → <Zephyr Subsystem>/logging/Kconfig:27
Menu path: (Top) → Sub Systems and OS Services → Logging → Misc
config LOG2_ALWAYS_RUNTIME
    bool "Always use runtime message creation (v2)"
    default y if NO_OPTIMIZATIONS
    depends on LOG
    help
      If enabled, runtime method is always used for message creation. Static
      creation relies on compiler being able to optimize and remove code
      based on information known at compile time. It is recommended to
      enable this option when optimization is disabled because some compilers
      (seen on arm_cortex_m and x86) were using unrealistic amount of stack
      for dead code. Option applies to v1 as well because distinction
      between versions is done by the compiler.
(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)