Skip to content

Commit b6d6e9a

Browse files
[nrf toup][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.
1 parent a16456f commit b6d6e9a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

config/nrfconnect/chip-module/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ config CHIP_LOG_FILE_NAME
163163
config CHIP_MALLOC_SYS_HEAP
164164
default y if !ARCH_POSIX
165165

166+
config CHIP_TASK_STACK_SIZE
167+
int "The CHIP (Matter) thread stack size"
168+
default 10240 if LTO
169+
default 6144
170+
help
171+
Configures the stack size available for the CHIP (Matter) thread.
172+
166173
config CHIP_FACTORY_DATA
167174
bool "Factory data provider"
168175
select ZCBOR

src/platform/nrfconnect/CHIPDevicePlatformConfig.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,7 @@
175175
#endif // CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY
176176

177177
#ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE
178-
#if defined(CONFIG_LTO)
179-
#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 10240
180-
#else
181-
#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 6144
182-
#endif // CONFIG_LTO
178+
#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE CONFIG_CHIP_TASK_STACK_SIZE
183179
#endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE
184180

185181
#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 64

0 commit comments

Comments
 (0)