From 7d8a217ef5c78a2177cbe4a2d5892b8a1fd77e63 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Tue, 30 Jul 2024 13:47:58 +0200 Subject: [PATCH] [nrfconnect] Introduced Kconfig to configure CHIP stack size There is not Kconfig that would allow to set the CHIP task size, what is not convenient, as other stacks can be configured using Kconfig. --- config/nrfconnect/chip-module/Kconfig | 7 +++++++ src/platform/nrfconnect/CHIPDevicePlatformConfig.h | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index 6333462130..60aefa73d3 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -163,6 +163,13 @@ config CHIP_LOG_FILE_NAME config CHIP_MALLOC_SYS_HEAP default y if !ARCH_POSIX +config CHIP_TASK_STACK_SIZE + int "The CHIP (Matter) thread stack size" + default 10240 if LTO + default 6144 + help + Configures the stack size available for the CHIP (Matter) thread. + config CHIP_FACTORY_DATA bool "Factory data provider" select ZCBOR diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 991c368942..92c46d5a91 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -175,11 +175,7 @@ #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE -#if defined(CONFIG_LTO) -#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 10240 -#else -#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 6144 -#endif // CONFIG_LTO +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE CONFIG_CHIP_TASK_STACK_SIZE #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 64