diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 596c834d60..59e62cee24 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -215,7 +215,11 @@ #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE +#ifdef CONFIG_LTO +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 8192 +#else #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 6144 +#endif #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 64