From e49a29f2dc306213a73a4f3c68d1ac9a34f49d9a Mon Sep 17 00:00:00 2001 From: aozima Date: Mon, 2 Jul 2018 09:56:12 +0800 Subject: [PATCH] [shell] add re-initial check. --- components/finsh/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 6bdb41812..66a0141de 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -726,6 +726,12 @@ int finsh_system_init(void) rt_err_t result = RT_EOK; rt_thread_t tid; + if(shell) + { + rt_kprintf("finsh shell already init.\n"); + return RT_EOK; + } + #ifdef FINSH_USING_SYMTAB #ifdef __CC_ARM /* ARM C Compiler */ extern const int FSymTab$$Base; -- GitLab