未验证 提交 f51a864b 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1638 from armink/fix_com_init

[components][finsh] Fix shell re-initialization check code to support…
...@@ -791,12 +791,6 @@ int finsh_system_init(void) ...@@ -791,12 +791,6 @@ int finsh_system_init(void)
rt_err_t result = RT_EOK; rt_err_t result = RT_EOK;
rt_thread_t tid; rt_thread_t tid;
if(shell)
{
rt_kprintf("finsh shell already init.\n");
return RT_EOK;
}
#ifdef FINSH_USING_SYMTAB #ifdef FINSH_USING_SYMTAB
#ifdef __CC_ARM /* ARM C Compiler */ #ifdef __CC_ARM /* ARM C Compiler */
extern const int FSymTab$$Base; extern const int FSymTab$$Base;
...@@ -826,6 +820,12 @@ int finsh_system_init(void) ...@@ -826,6 +820,12 @@ int finsh_system_init(void)
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
unsigned int *ptr_begin, *ptr_end; unsigned int *ptr_begin, *ptr_end;
if(shell)
{
rt_kprintf("finsh shell already init.\n");
return RT_EOK;
}
ptr_begin = (unsigned int *)&__fsym_begin; ptr_begin = (unsigned int *)&__fsym_begin;
ptr_begin += (sizeof(struct finsh_syscall) / sizeof(unsigned int)); ptr_begin += (sizeof(struct finsh_syscall) / sizeof(unsigned int));
while (*ptr_begin == 0) ptr_begin ++; while (*ptr_begin == 0) ptr_begin ++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册