From ee9d5daeca256445c1ae1da8fe53584117b7ec0c Mon Sep 17 00:00:00 2001 From: nkj Date: Thu, 5 Jan 2023 10:05:25 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20088f88c=20from=20https://gitee.com/wenx?= =?UTF-8?q?in-liu=5Fadmin/kernel=5Fliteos=5Fm/pulls/991=20feat:=20kconfig?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0shell=20StackSize=E5=A4=A7=E5=B0=8F=E7=9A=84?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE: kconfig增加shell StackSize大小的设置: 新增配置项 Close #I6KHRF Signed-off-by: nkj Change-Id: I9d3a7e7933a01a0f1ad2199c82825cc471c623b0 Change-Id: I0d732e0270ae6dc354aec05f2a50f9439550accb --- components/shell/Kconfig | 5 +++++ components/shell/src/base/shmsg.c | 2 +- kernel/include/los_config.h | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) 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 }