diff --git a/components/shell/Kconfig b/components/shell/Kconfig index 0148daa8..13658362 100644 --- a/components/shell/Kconfig +++ b/components/shell/Kconfig @@ -19,6 +19,11 @@ config SHELL_PRIO range 1 31 depends on SHELL +config SHELL_STACK_SIZE + int "Shell Task Stack Size" + default 4096 + depends on SHELL + config SHELL_LK bool "Enable Shell lk" default y diff --git a/components/shell/src/base/shmsg.c b/components/shell/src/base/shmsg.c index 8cc37ff2..720af9be 100644 --- a/components/shell/src/base/shmsg.c +++ b/components/shell/src/base/shmsg.c @@ -258,7 +258,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LosShellInit(VOID) } task1.pfnTaskEntry = (TSK_ENTRY_FUNC)ShellTaskEntry; - task1.uwStackSize = 0x1000; + task1.uwStackSize = LOSCFG_SHELL_STACK_SIZE; task1.pcName = "ShellTaskEntry"; task1.usTaskPrio = LOSCFG_SHELL_PRIO; ret = LOS_TaskCreate(&taskID1, &task1); diff --git a/kernel/include/los_config.h b/kernel/include/los_config.h index fe418720..db3a5170 100644 --- a/kernel/include/los_config.h +++ b/kernel/include/los_config.h @@ -679,6 +679,14 @@ extern UINT8 *m_aucSysMem0; #define LOSCFG_KERNEL_PM_IDLE 0 #endif +/** + * @ingroup los_config + * Configuration item to set shell stack size. + */ +#ifndef LOSCFG_SHELL_STACK_SIZE +#define LOSCFG_SHELL_STACK_SIZE 0x1000 +#endif + #ifdef __cplusplus #if __cplusplus }