The latest development version of this page may be more current than this released 1.14.1 version.
CONFIG_MAIN_STACK_SIZE

Size of stack for initialization and main thread

Type: int

Help

When the initialization is complete, the thread executing it then executes the main() routine, so as to reuse the stack used by the initialization, which would be wasted RAM otherwise.

After initialization is complete, the thread runs main().

Defaults

Kconfig definitions

At soc/arc/snps_emsk/Kconfig.defconfig.em7d:46

Included via Kconfig:10Kconfig.zephyr:23soc/arc/snps_emsk/Kconfig.defconfig:14

Menu path: (top menu)

config MAIN_STACK_SIZE
    int
    default 2048 if ARC_MPU_VER = 2 && SOC_EMSK_EM7D && SOC_EMSK
    depends on ARC_MPU_VER = 2 && SOC_EMSK_EM7D && SOC_EMSK

At soc/arc/snps_nsim/Kconfig.defconfig.em:41

Included via Kconfig:10Kconfig.zephyr:23soc/arc/snps_nsim/Kconfig.defconfig:17

Menu path: (top menu)

config MAIN_STACK_SIZE
    int
    default 2048 if ARC_MPU_VER = 2 && SOC_NSIM_EM && SOC_NSIM
    depends on ARC_MPU_VER = 2 && SOC_NSIM_EM && SOC_NSIM

At kernel/Kconfig:148

Included via Kconfig:10Kconfig.zephyr:31

Menu path: (top menu) → General Kernel Options

config MAIN_STACK_SIZE
    int
    prompt "Size of stack for initialization and main thread"
    default 2048 if COVERAGE_GCOV
    default 512 if ZTEST && !RISCV32
    default 1024
    help
      When the initialization is complete, the thread executing it then
      executes the main() routine, so as to reuse the stack used by the
      initialization, which would be wasted RAM otherwise.

      After initialization is complete, the thread runs main().

(Definitions include propagated dependencies, including from if’s and menus.)