gcc和mdk都能编译成功

This commit is contained in:
andy
2023-11-01 23:51:19 +08:00
parent ddeec88a89
commit 17729e664f
17 changed files with 563 additions and 27 deletions

View File

@@ -23,10 +23,17 @@ void *tappend(void *p,void *del);
static commend_def *cmd_find(char *name)
{
#if defined (__CC_ARM)
extern const int cmdstruct$$Base;
extern const int cmdstruct$$Limit;
commend_def *start=(commend_def *)&cmdstruct$$Base;
commend_def *end=(commend_def *)&cmdstruct$$Limit;
#else
extern const int __start_cmdstruct;
extern const int __stop_cmdstruct;
commend_def *start=(commend_def *)&__start_cmdstruct;
commend_def *end=(commend_def *)&__stop_cmdstruct;
#endif
for(commend_def *t=start;t<end;t++)
{
if(strcmp(t->name,name)==0)
@@ -114,10 +121,17 @@ int cmd_printf(const char *fmt,...)
static int cmd_help(list_def *argv)
{
#if defined (__CC_ARM)
extern const int cmdstruct$$Base;
extern const int cmdstruct$$Limit;
commend_def *start=(commend_def *)&cmdstruct$$Base;
commend_def *end=(commend_def *)&cmdstruct$$Limit;
#else
extern const int __start_cmdstruct;
extern const int __stop_cmdstruct;
commend_def *start=(commend_def *)&__start_cmdstruct;
commend_def *end=(commend_def *)&__stop_cmdstruct;
#endif
cmd_print("help ->");
for(commend_def *t=start;t<end;t++)
{