; generated by Component: ARM Compiler 5.05 update 2 (build 169) Tool: ArmCC [4d0f38]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\mico_cli.o --asm_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --list_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --depend=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\mico_cli.d --cpu=Cortex-M4.fp --apcs=interwork -O0 --diag_suppress=9931,1,1293 -I..\..\..\..\Board\fire_F429 -I..\..\..\..\Demos\fire\ov2640 -I..\..\..\..\include -I..\..\..\..\libraries\utilities -I..\..\..\..\libraries\utilities\json_c -I..\..\..\..\MICO\core -I..\..\..\..\MICO\security -I..\..\..\..\MICO\system -I..\..\..\..\MICO\system\command_console -I..\..\..\..\Platform\include -I..\..\..\..\Platform\Cortex-M4 -I..\..\..\..\Platform\Cortex-M4\CMSIS -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries -I..\..\..\..\Platform\MCU\STM32F4xx\wlan_bus_driver -I..\..\..\..\Platform\Drivers\spi_flash -I..\..\..\..\Platform\Drivers -I..\..\..\..\libraries\daemons\homekit_server -I..\..\..\..\libraries\daemons\http_server -I..\..\..\..\Platform\Drivers\malloc -I..\..\..\..\Platform\Drivers\SDRAM -I..\..\..\..\Platform\Drivers\ov5640 -IG:\GIT_OSC\STM32_develop\F429-V2\develop\6-WIFI\STM32-WiFi\3.wifi_ov5640\Projects\STM32F429\demo\RVMDK\RTE -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -IC:\Keil_v5\ARM\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0 -D__UVISION_VERSION=515 -DSTM32F429xx -DUSE_STDPERIPH_DRIVER -DDEBUG -DHSE_VALUE=25000000 -DOV5640 --omf_browse=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\mico_cli.crf ..\..\..\..\MICO\system\command_console\mico_cli.c]
                          THUMB

                          AREA ||i.cli_exit_handler||, CODE, READONLY, ALIGN=1

                  cli_exit_handler PROC
;;;482    
;;;483    static void cli_exit_handler(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  4770              BX       lr
;;;484    {
;;;485      // exit command not excuted
;;;486    }
;;;487    
                          ENDP


                          AREA ||i.cli_getchar||, CODE, READONLY, ALIGN=1

                  cli_getchar PROC
;;;685    
;;;686    int cli_getchar(char *inbuf)
000000  b510              PUSH     {r4,lr}
;;;687    {
000002  4604              MOV      r4,r0
;;;688      if (MicoUartRecv(CLI_UART, inbuf, 1, 1000) == 0)
000004  f44f737a          MOV      r3,#0x3e8
000008  2201              MOVS     r2,#1
00000a  4621              MOV      r1,r4
00000c  2000              MOVS     r0,#0
00000e  f7fffffe          BL       MicoUartRecv
000012  b908              CBNZ     r0,|L2.24|
;;;689        return 1;
000014  2001              MOVS     r0,#1
                  |L2.22|
;;;690      else
;;;691        return 0;
;;;692    }
000016  bd10              POP      {r4,pc}
                  |L2.24|
000018  2000              MOVS     r0,#0                 ;691
00001a  e7fc              B        |L2.22|
;;;693    
                          ENDP


                          AREA ||i.cli_init||, CODE, READONLY, ALIGN=2

                  cli_init PROC
;;;608    
;;;609    int cli_init(void)
000000  b51c              PUSH     {r2-r4,lr}
;;;610    {
;;;611      int ret;
;;;612      
;;;613      pCli = (struct cli_st*)malloc(sizeof(struct cli_st));
000002  f44f60a5          MOV      r0,#0x528
000006  f7fffffe          BL       malloc
00000a  492d              LDR      r1,|L3.192|
00000c  6008              STR      r0,[r1,#0]  ; pCli
;;;614      if (pCli == NULL)
00000e  4608              MOV      r0,r1
000010  6800              LDR      r0,[r0,#0]  ; pCli
000012  b908              CBNZ     r0,|L3.24|
;;;615        return kNoMemoryErr;
000014  482b              LDR      r0,|L3.196|
                  |L3.22|
;;;616      
;;;617      cli_rx_data = (uint8_t*)malloc(INBUF_SIZE);
;;;618      if (cli_rx_data == NULL) {
;;;619        free(pCli);
;;;620        pCli = NULL;
;;;621        return kNoMemoryErr;
;;;622      }
;;;623      memset((void *)pCli, 0, sizeof(struct cli_st));
;;;624      
;;;625      ring_buffer_init  ( (ring_buffer_t*)&cli_rx_buffer, (uint8_t*)cli_rx_data, INBUF_SIZE );
;;;626      MicoUartInitialize( CLI_UART, &cli_uart_config, (ring_buffer_t*)&cli_rx_buffer );
;;;627      
;;;628      /* add our built-in commands */
;;;629      if (cli_register_commands(&built_ins[0],
;;;630                                sizeof(built_ins) /
;;;631                                  sizeof(struct cli_command))) {
;;;632                                    free(pCli);
;;;633                                    pCli = NULL;
;;;634                                    return kGeneralErr;
;;;635                                  }
;;;636      
;;;637    #if (DEBUG)
;;;638      cli_register_commands(user_clis, 1);
;;;639    #endif
;;;640      
;;;641      ret = mico_rtos_create_thread(NULL, MICO_DEFAULT_WORKER_PRIORITY, "cli", cli_main, 4096, 0);
;;;642      if (ret != kNoErr) {
;;;643        cli_printf("Error: Failed to create cli thread: %d\r\n",
;;;644                   ret);
;;;645        free(pCli);
;;;646        pCli = NULL;
;;;647        return kGeneralErr;
;;;648      }
;;;649      
;;;650      pCli->initialized = 1;
;;;651      
;;;652      return kNoErr;
;;;653    }
000016  bd1c              POP      {r2-r4,pc}
                  |L3.24|
000018  2050              MOVS     r0,#0x50              ;617
00001a  f7fffffe          BL       malloc
00001e  492a              LDR      r1,|L3.200|
000020  6008              STR      r0,[r1,#0]            ;617  ; cli_rx_data
000022  4608              MOV      r0,r1                 ;618
000024  6800              LDR      r0,[r0,#0]            ;618  ; cli_rx_data
000026  b940              CBNZ     r0,|L3.58|
000028  4825              LDR      r0,|L3.192|
00002a  6800              LDR      r0,[r0,#0]            ;619  ; pCli
00002c  f7fffffe          BL       free
000030  2000              MOVS     r0,#0                 ;620
000032  4923              LDR      r1,|L3.192|
000034  6008              STR      r0,[r1,#0]            ;620  ; pCli
000036  4823              LDR      r0,|L3.196|
000038  e7ed              B        |L3.22|
                  |L3.58|
00003a  f44f61a5          MOV      r1,#0x528             ;623
00003e  4820              LDR      r0,|L3.192|
000040  6800              LDR      r0,[r0,#0]            ;623  ; pCli
000042  f7fffffe          BL       __aeabi_memclr4
000046  2250              MOVS     r2,#0x50              ;625
000048  481f              LDR      r0,|L3.200|
00004a  6801              LDR      r1,[r0,#0]            ;625  ; cli_rx_data
00004c  481f              LDR      r0,|L3.204|
00004e  f7fffffe          BL       ring_buffer_init
000052  4a1e              LDR      r2,|L3.204|
000054  491e              LDR      r1,|L3.208|
000056  2000              MOVS     r0,#0                 ;626
000058  f7fffffe          BL       MicoUartInitialize
00005c  2117              MOVS     r1,#0x17              ;629
00005e  481d              LDR      r0,|L3.212|
000060  f7fffffe          BL       cli_register_commands
000064  b140              CBZ      r0,|L3.120|
000066  4816              LDR      r0,|L3.192|
000068  6800              LDR      r0,[r0,#0]            ;632  ; pCli
00006a  f7fffffe          BL       free
00006e  2000              MOVS     r0,#0                 ;633
000070  4913              LDR      r1,|L3.192|
000072  6008              STR      r0,[r1,#0]            ;633  ; pCli
000074  1e40              SUBS     r0,r0,#1              ;634
000076  e7ce              B        |L3.22|
                  |L3.120|
000078  2101              MOVS     r1,#1                 ;638
00007a  4817              LDR      r0,|L3.216|
00007c  f7fffffe          BL       cli_register_commands
000080  2000              MOVS     r0,#0                 ;641
000082  f44f5180          MOV      r1,#0x1000            ;641
000086  4b15              LDR      r3,|L3.220|
000088  a215              ADR      r2,|L3.224|
00008a  e9cd1000          STRD     r1,r0,[sp,#0]         ;641
00008e  2105              MOVS     r1,#5                 ;641
000090  f7fffffe          BL       mico_rtos_create_thread
000094  4604              MOV      r4,r0                 ;641
000096  b164              CBZ      r4,|L3.178|
000098  4621              MOV      r1,r4                 ;643
00009a  a012              ADR      r0,|L3.228|
00009c  f7fffffe          BL       cli_printf
0000a0  4807              LDR      r0,|L3.192|
0000a2  6800              LDR      r0,[r0,#0]            ;645  ; pCli
0000a4  f7fffffe          BL       free
0000a8  2000              MOVS     r0,#0                 ;646
0000aa  4905              LDR      r1,|L3.192|
0000ac  6008              STR      r0,[r1,#0]            ;646  ; pCli
0000ae  1e40              SUBS     r0,r0,#1              ;647
0000b0  e7b1              B        |L3.22|
                  |L3.178|
0000b2  2001              MOVS     r0,#1                 ;650
0000b4  4902              LDR      r1,|L3.192|
0000b6  6809              LDR      r1,[r1,#0]            ;650  ; pCli
0000b8  6008              STR      r0,[r1,#0]            ;650
0000ba  2000              MOVS     r0,#0                 ;652
0000bc  e7ab              B        |L3.22|
;;;654    
                          ENDP

0000be  0000              DCW      0x0000
                  |L3.192|
                          DCD      pCli
                  |L3.196|
                          DCD      0xffffe5b8
                  |L3.200|
                          DCD      cli_rx_data
                  |L3.204|
                          DCD      cli_rx_buffer
                  |L3.208|
                          DCD      cli_uart_config
                  |L3.212|
                          DCD      built_ins
                  |L3.216|
                          DCD      user_clis
                  |L3.220|
                          DCD      cli_main
                  |L3.224|
0000e0  636c6900          DCB      "cli",0
                  |L3.228|
0000e4  4572726f          DCB      "Error: Failed to create cli thread: %d\r\n",0
0000e8  723a2046
0000ec  61696c65
0000f0  6420746f
0000f4  20637265
0000f8  61746520
0000fc  636c6920
000100  74687265
000104  61643a20
000108  25640d0a
00010c  00      
00010d  00                DCB      0
00010e  00                DCB      0
00010f  00                DCB      0

                          AREA ||i.cli_main||, CODE, READONLY, ALIGN=2

                  cli_main PROC
;;;311    */
;;;312    static void cli_main(void *data)
000000  b570              PUSH     {r4-r6,lr}
;;;313    {
000002  4606              MOV      r6,r0
;;;314      while (1) {
000004  e026              B        |L4.84|
                  |L4.6|
;;;315        int ret;
;;;316        char *msg;
;;;317        
;;;318        if (!get_input(pCli->inbuf, &pCli->bp))
000006  481b              LDR      r0,|L4.116|
000008  6801              LDR      r1,[r0,#0]  ; pCli
00000a  1d09              ADDS     r1,r1,#4
00000c  6800              LDR      r0,[r0,#0]  ; pCli
00000e  3008              ADDS     r0,r0,#8
000010  f7fffffe          BL       get_input
000014  b900              CBNZ     r0,|L4.24|
;;;319          continue;
000016  e01d              B        |L4.84|
                  |L4.24|
;;;320        msg = pCli->inbuf;
000018  4816              LDR      r0,|L4.116|
00001a  6800              LDR      r0,[r0,#0]  ; pCli
00001c  f1000508          ADD      r5,r0,#8
;;;321        
;;;322        if (msg != NULL) {
000020  b1bd              CBZ      r5,|L4.82|
;;;323          if (strcmp(msg, EXIT_MSG) == 0)
000022  a115              ADR      r1,|L4.120|
000024  4628              MOV      r0,r5
000026  f7fffffe          BL       strcmp
00002a  b900              CBNZ     r0,|L4.46|
;;;324            break;
00002c  e013              B        |L4.86|
                  |L4.46|
;;;325          ret = handle_input(msg);
00002e  4628              MOV      r0,r5
000030  f7fffffe          BL       handle_input
000034  4604              MOV      r4,r0
;;;326          if (ret == 1)
000036  2c01              CMP      r4,#1
000038  d103              BNE      |L4.66|
;;;327            print_bad_command(msg);
00003a  4628              MOV      r0,r5
00003c  f7fffffe          BL       print_bad_command
000040  e004              B        |L4.76|
                  |L4.66|
;;;328          else if (ret == 2)
000042  2c02              CMP      r4,#2
000044  d102              BNE      |L4.76|
;;;329            cli_printf("syntax error\r\n");
000046  a00e              ADR      r0,|L4.128|
000048  f7fffffe          BL       cli_printf
                  |L4.76|
;;;330          cli_printf(PROMPT);
00004c  a010              ADR      r0,|L4.144|
00004e  f7fffffe          BL       cli_printf
                  |L4.82|
000052  bf00              NOP                            ;319
                  |L4.84|
000054  e7d7              B        |L4.6|
                  |L4.86|
000056  bf00              NOP                            ;324
;;;331        }
;;;332      }
;;;333      
;;;334      cli_printf("CLI exited\r\n");
000058  a00f              ADR      r0,|L4.152|
00005a  f7fffffe          BL       cli_printf
;;;335      free(pCli);
00005e  4805              LDR      r0,|L4.116|
000060  6800              LDR      r0,[r0,#0]  ; pCli
000062  f7fffffe          BL       free
;;;336      pCli = NULL;
000066  2000              MOVS     r0,#0
000068  4902              LDR      r1,|L4.116|
00006a  6008              STR      r0,[r1,#0]  ; pCli
;;;337      mico_rtos_delete_thread(NULL);
00006c  f7fffffe          BL       mico_rtos_delete_thread
;;;338    }
000070  bd70              POP      {r4-r6,pc}
;;;339    
                          ENDP

000072  0000              DCW      0x0000
                  |L4.116|
                          DCD      pCli
                  |L4.120|
000078  65786974          DCB      "exit",0
00007c  00      
00007d  00                DCB      0
00007e  00                DCB      0
00007f  00                DCB      0
                  |L4.128|
000080  73796e74          DCB      "syntax error\r\n",0
000084  61782065
000088  72726f72
00008c  0d0a00  
00008f  00                DCB      0
                  |L4.144|
000090  0d0a2320          DCB      "\r\n# ",0
000094  00      
000095  00                DCB      0
000096  00                DCB      0
000097  00                DCB      0
                  |L4.152|
000098  434c4920          DCB      "CLI exited\r\n",0
00009c  65786974
0000a0  65640d0a
0000a4  00      
0000a5  00                DCB      0
0000a6  00                DCB      0
0000a7  00                DCB      0

                          AREA ||i.cli_printf||, CODE, READONLY, ALIGN=1

                  cli_printf PROC
;;;656    
;;;657    int cli_printf(const char *msg, ...)
000000  b40f              PUSH     {r0-r3}
;;;658    {
000002  b570              PUSH     {r4-r6,lr}
000004  b0c2              SUB      sp,sp,#0x108
;;;659      va_list ap; 
;;;660      char *pos, message[256]; 
;;;661      int sz; 
;;;662      int nMessageLen = 0;
000006  2600              MOVS     r6,#0
;;;663      
;;;664      memset(message, 0, 256);
000008  f44f7180          MOV      r1,#0x100
00000c  a801              ADD      r0,sp,#4
00000e  f7fffffe          BL       __aeabi_memclr4
;;;665      pos = message;
000012  ac01              ADD      r4,sp,#4
;;;666      
;;;667      sz = 0;
000014  2500              MOVS     r5,#0
;;;668      va_start(ap, msg);
000016  a847              ADD      r0,sp,#0x11c
000018  9041              STR      r0,[sp,#0x104]
;;;669      nMessageLen = vsnprintf(pos, 256 - sz, msg, ap);
00001a  f5c57180          RSB      r1,r5,#0x100
00001e  4620              MOV      r0,r4
000020  9b41              LDR      r3,[sp,#0x104]
000022  9a46              LDR      r2,[sp,#0x118]
000024  f7fffffe          BL       vsnprintf
000028  4606              MOV      r6,r0
;;;670      va_end(ap);
00002a  2000              MOVS     r0,#0
00002c  9041              STR      r0,[sp,#0x104]
;;;671      
;;;672      if( nMessageLen<=0 ) return 0;
00002e  2e00              CMP      r6,#0
000030  dc03              BGT      |L5.58|
                  |L5.50|
;;;673      
;;;674      cli_putstr((const char*)message);
;;;675      return 0;
;;;676    }
000032  b042              ADD      sp,sp,#0x108
000034  bc70              POP      {r4-r6}
000036  f85dfb14          LDR      pc,[sp],#0x14
                  |L5.58|
00003a  a801              ADD      r0,sp,#4              ;674
00003c  f7fffffe          BL       cli_putstr
000040  2000              MOVS     r0,#0                 ;675
000042  e7f6              B        |L5.50|
;;;677    
                          ENDP


                          AREA ||i.cli_putstr||, CODE, READONLY, ALIGN=1

                  cli_putstr PROC
;;;677    
;;;678    int cli_putstr(const char *msg)
000000  b570              PUSH     {r4-r6,lr}
;;;679    {
000002  4604              MOV      r4,r0
;;;680      if (msg[0] != 0)
000004  7820              LDRB     r0,[r4,#0]
000006  b140              CBZ      r0,|L6.26|
;;;681        MicoUartSend( CLI_UART, (const char*)msg, strlen(msg) );
000008  4620              MOV      r0,r4
00000a  f7fffffe          BL       strlen
00000e  4605              MOV      r5,r0
000010  462a              MOV      r2,r5
000012  4621              MOV      r1,r4
000014  2000              MOVS     r0,#0
000016  f7fffffe          BL       MicoUartSend
                  |L6.26|
;;;682      
;;;683      return 0;
00001a  2000              MOVS     r0,#0
;;;684    }
00001c  bd70              POP      {r4-r6,pc}
;;;685    
                          ENDP


                          AREA ||i.cli_register_command||, CODE, READONLY, ALIGN=2

                  cli_register_command PROC
;;;521    
;;;522    int cli_register_command(const struct cli_command *command)
000000  b510              PUSH     {r4,lr}
;;;523    {
000002  4601              MOV      r1,r0
;;;524      int i;
;;;525      if (!command->name || !command->function)
000004  6808              LDR      r0,[r1,#0]
000006  b108              CBZ      r0,|L7.12|
000008  6888              LDR      r0,[r1,#8]
00000a  b908              CBNZ     r0,|L7.16|
                  |L7.12|
;;;526        return 1;
00000c  2001              MOVS     r0,#1
                  |L7.14|
;;;527      
;;;528      if (pCli->num_commands < MAX_COMMANDS) {
;;;529        /* Check if the command has already been registered.
;;;530        * Return 0, if it has been registered.
;;;531        */
;;;532        for (i = 0; i < pCli->num_commands; i++) {
;;;533          if (pCli->commands[i] == command)
;;;534            return 0;
;;;535        }
;;;536        pCli->commands[pCli->num_commands++] = command;
;;;537        return 0;
;;;538      }
;;;539      
;;;540      return 1;
;;;541    }
00000e  bd10              POP      {r4,pc}
                  |L7.16|
000010  4817              LDR      r0,|L7.112|
000012  6800              LDR      r0,[r0,#0]            ;528  ; pCli
000014  f8d00520          LDR      r0,[r0,#0x520]        ;528
000018  2832              CMP      r0,#0x32              ;528
00001a  d227              BCS      |L7.108|
00001c  2200              MOVS     r2,#0                 ;532
00001e  e00a              B        |L7.54|
                  |L7.32|
000020  4813              LDR      r0,|L7.112|
000022  6800              LDR      r0,[r0,#0]            ;533  ; pCli
000024  f500608b          ADD      r0,r0,#0x458          ;533
000028  f8500022          LDR      r0,[r0,r2,LSL #2]     ;533
00002c  4288              CMP      r0,r1                 ;533
00002e  d101              BNE      |L7.52|
000030  2000              MOVS     r0,#0                 ;534
000032  e7ec              B        |L7.14|
                  |L7.52|
000034  1c52              ADDS     r2,r2,#1              ;532
                  |L7.54|
000036  480e              LDR      r0,|L7.112|
000038  6800              LDR      r0,[r0,#0]            ;532  ; pCli
00003a  f8d00520          LDR      r0,[r0,#0x520]        ;532
00003e  4290              CMP      r0,r2                 ;532
000040  d8ee              BHI      |L7.32|
000042  480b              LDR      r0,|L7.112|
000044  6800              LDR      r0,[r0,#0]            ;536  ; pCli
000046  f8d03520          LDR      r3,[r0,#0x520]        ;536
00004a  4809              LDR      r0,|L7.112|
00004c  6800              LDR      r0,[r0,#0]            ;536  ; pCli
00004e  f8d00520          LDR      r0,[r0,#0x520]        ;536
000052  1c40              ADDS     r0,r0,#1              ;536
000054  4c06              LDR      r4,|L7.112|
000056  6824              LDR      r4,[r4,#0]            ;536  ; pCli
000058  f8c40520          STR      r0,[r4,#0x520]        ;536
00005c  4804              LDR      r0,|L7.112|
00005e  6800              LDR      r0,[r0,#0]            ;536  ; pCli
000060  f500608b          ADD      r0,r0,#0x458          ;536
000064  f8401023          STR      r1,[r0,r3,LSL #2]     ;536
000068  2000              MOVS     r0,#0                 ;537
00006a  e7d0              B        |L7.14|
                  |L7.108|
00006c  2001              MOVS     r0,#1                 ;540
00006e  e7ce              B        |L7.14|
;;;542    
                          ENDP

                  |L7.112|
                          DCD      pCli

                          AREA ||i.cli_register_commands||, CODE, READONLY, ALIGN=1

                  cli_register_commands PROC
;;;565    
;;;566    int cli_register_commands(const struct cli_command *commands, int num_commands)
000000  b570              PUSH     {r4-r6,lr}
;;;567    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;568      int i;
;;;569      for (i = 0; i < num_commands; i++)
000006  2600              MOVS     r6,#0
000008  e007              B        |L8.26|
                  |L8.10|
;;;570        if (cli_register_command(commands++))
00000a  4620              MOV      r0,r4
00000c  340c              ADDS     r4,r4,#0xc
00000e  f7fffffe          BL       cli_register_command
000012  b108              CBZ      r0,|L8.24|
;;;571          return 1;
000014  2001              MOVS     r0,#1
                  |L8.22|
;;;572      return 0;
;;;573    }
000016  bd70              POP      {r4-r6,pc}
                  |L8.24|
000018  1c76              ADDS     r6,r6,#1              ;569
                  |L8.26|
00001a  42ae              CMP      r6,r5                 ;569
00001c  dbf5              BLT      |L8.10|
00001e  2000              MOVS     r0,#0                 ;572
000020  e7f9              B        |L8.22|
;;;574    
                          ENDP


                          AREA ||i.cli_unregister_command||, CODE, READONLY, ALIGN=2

                  cli_unregister_command PROC
;;;542    
;;;543    int cli_unregister_command(const struct cli_command *command)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;544    {
000004  4605              MOV      r5,r0
;;;545      int i;
;;;546      if (!command->name || !command->function)
000006  6828              LDR      r0,[r5,#0]
000008  b108              CBZ      r0,|L9.14|
00000a  68a8              LDR      r0,[r5,#8]
00000c  b910              CBNZ     r0,|L9.20|
                  |L9.14|
;;;547        return 1;
00000e  2001              MOVS     r0,#1
                  |L9.16|
;;;548      
;;;549      for (i = 0; i < pCli->num_commands; i++) {
;;;550        if (pCli->commands[i] == command) {
;;;551          pCli->num_commands--;
;;;552          int remaining_cmds = pCli->num_commands - i;
;;;553          if (remaining_cmds > 0) {
;;;554            memmove(&pCli->commands[i], &pCli->commands[i + 1],
;;;555                    (remaining_cmds *
;;;556                     sizeof(struct cli_command *)));
;;;557          }
;;;558          pCli->commands[pCli->num_commands] = NULL;
;;;559          return 0;
;;;560        }
;;;561      }
;;;562      
;;;563      return 1;
;;;564    }
000010  e8bd81f0          POP      {r4-r8,pc}
                  |L9.20|
000014  2400              MOVS     r4,#0                 ;549
000016  e035              B        |L9.132|
                  |L9.24|
000018  481e              LDR      r0,|L9.148|
00001a  6800              LDR      r0,[r0,#0]            ;550  ; pCli
00001c  f500608b          ADD      r0,r0,#0x458          ;550
000020  f8500024          LDR      r0,[r0,r4,LSL #2]     ;550
000024  42a8              CMP      r0,r5                 ;550
000026  d12c              BNE      |L9.130|
000028  481a              LDR      r0,|L9.148|
00002a  6800              LDR      r0,[r0,#0]            ;551  ; pCli
00002c  f8d00520          LDR      r0,[r0,#0x520]        ;551
000030  1e40              SUBS     r0,r0,#1              ;551
000032  4918              LDR      r1,|L9.148|
000034  6809              LDR      r1,[r1,#0]            ;551  ; pCli
000036  f8c10520          STR      r0,[r1,#0x520]        ;551
00003a  4816              LDR      r0,|L9.148|
00003c  6800              LDR      r0,[r0,#0]            ;552  ; pCli
00003e  f8d00520          LDR      r0,[r0,#0x520]        ;552
000042  1b06              SUBS     r6,r0,r4              ;552
000044  2e00              CMP      r6,#0                 ;553
000046  dd0f              BLE      |L9.104|
000048  00b2              LSLS     r2,r6,#2              ;554
00004a  4b12              LDR      r3,|L9.148|
00004c  681b              LDR      r3,[r3,#0]            ;554  ; pCli
00004e  f503638b          ADD      r3,r3,#0x458          ;554
000052  1c67              ADDS     r7,r4,#1              ;554
000054  eb030187          ADD      r1,r3,r7,LSL #2       ;554
000058  4b0e              LDR      r3,|L9.148|
00005a  681b              LDR      r3,[r3,#0]            ;554  ; pCli
00005c  f503638b          ADD      r3,r3,#0x458          ;554
000060  eb030084          ADD      r0,r3,r4,LSL #2       ;554
000064  f7fffffe          BL       __aeabi_memmove4
                  |L9.104|
000068  2100              MOVS     r1,#0                 ;558
00006a  480a              LDR      r0,|L9.148|
00006c  6800              LDR      r0,[r0,#0]            ;558  ; pCli
00006e  f8d02520          LDR      r2,[r0,#0x520]        ;558
000072  4808              LDR      r0,|L9.148|
000074  6800              LDR      r0,[r0,#0]            ;558  ; pCli
000076  f500608b          ADD      r0,r0,#0x458          ;558
00007a  f8401022          STR      r1,[r0,r2,LSL #2]     ;558
00007e  2000              MOVS     r0,#0                 ;559
000080  e7c6              B        |L9.16|
                  |L9.130|
000082  1c64              ADDS     r4,r4,#1              ;549
                  |L9.132|
000084  4803              LDR      r0,|L9.148|
000086  6800              LDR      r0,[r0,#0]            ;549  ; pCli
000088  f8d00520          LDR      r0,[r0,#0x520]        ;549
00008c  42a0              CMP      r0,r4                 ;549
00008e  d8c3              BHI      |L9.24|
000090  2001              MOVS     r0,#1                 ;563
000092  e7bd              B        |L9.16|
;;;565    
                          ENDP

                  |L9.148|
                          DCD      pCli

                          AREA ||i.cli_unregister_commands||, CODE, READONLY, ALIGN=1

                  cli_unregister_commands PROC
;;;574    
;;;575    int cli_unregister_commands(const struct cli_command *commands,
000000  b570              PUSH     {r4-r6,lr}
;;;576    			    int num_commands)
;;;577    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;578      int i;
;;;579      for (i = 0; i < num_commands; i++)
000006  2600              MOVS     r6,#0
000008  e007              B        |L10.26|
                  |L10.10|
;;;580        if (cli_unregister_command(commands++))
00000a  4620              MOV      r0,r4
00000c  340c              ADDS     r4,r4,#0xc
00000e  f7fffffe          BL       cli_unregister_command
000012  b108              CBZ      r0,|L10.24|
;;;581          return 1;
000014  2001              MOVS     r0,#1
                  |L10.22|
;;;582      
;;;583      return 0;
;;;584    }
000016  bd70              POP      {r4-r6,pc}
                  |L10.24|
000018  1c76              ADDS     r6,r6,#1              ;579
                  |L10.26|
00001a  42ae              CMP      r6,r5                 ;579
00001c  dbf5              BLT      |L10.10|
00001e  2000              MOVS     r0,#0                 ;583
000020  e7f9              B        |L10.22|
;;;585    #if (DEBUG)
                          ENDP


                          AREA ||i.echo_cmd_handler||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_percent
                          REQUIRE _printf_s
                          REQUIRE _printf_str
                  echo_cmd_handler PROC
;;;465    
;;;466    static void echo_cmd_handler(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;467    {
000004  4605              MOV      r5,r0
000006  460c              MOV      r4,r1
000008  4617              MOV      r7,r2
00000a  461e              MOV      r6,r3
;;;468      if (argc == 1) {
00000c  2f01              CMP      r7,#1
00000e  d11b              BNE      |L11.72|
;;;469        cmd_printf("Usage: echo on/off. Echo is currently %s\r\n",
000010  bf00              NOP      
000012  2c00              CMP      r4,#0
000014  dd15              BLE      |L11.66|
000016  4829              LDR      r0,|L11.188|
000018  6800              LDR      r0,[r0,#0]  ; pCli
00001a  f8d00524          LDR      r0,[r0,#0x524]
00001e  b108              CBZ      r0,|L11.36|
000020  a027              ADR      r0,|L11.192|
000022  e000              B        |L11.38|
                  |L11.36|
000024  a029              ADR      r0,|L11.204|
                  |L11.38|
000026  4603              MOV      r3,r0
000028  a22a              ADR      r2,|L11.212|
00002a  4621              MOV      r1,r4
00002c  4628              MOV      r0,r5
00002e  f7fffffe          BL       __2snprintf
000032  4628              MOV      r0,r5
000034  f7fffffe          BL       strlen
000038  1a24              SUBS     r4,r4,r0
00003a  4628              MOV      r0,r5
00003c  f7fffffe          BL       strlen
000040  4405              ADD      r5,r5,r0
                  |L11.66|
000042  bf00              NOP      
                  |L11.68|
;;;470                   pCli->echo_disabled ? "Disabled" : "Enabled");
;;;471        return;
;;;472      }
;;;473      
;;;474      if (!strcasecmp(argv[1], "on")) {
;;;475        cmd_printf("Enable echo\r\n");
;;;476        pCli->echo_disabled = 0;
;;;477      } else if (!strcasecmp(argv[1], "off")) {
;;;478        cmd_printf("Disable echo\r\n");
;;;479        pCli->echo_disabled = 1;
;;;480      }
;;;481    }
000044  e8bd81f0          POP      {r4-r8,pc}
                  |L11.72|
000048  a12d              ADR      r1,|L11.256|
00004a  6870              LDR      r0,[r6,#4]            ;474
00004c  f7fffffe          BL       strcasecmp
000050  b9b0              CBNZ     r0,|L11.128|
000052  bf00              NOP                            ;475
000054  2c00              CMP      r4,#0                 ;475
000056  dd0c              BLE      |L11.114|
000058  a22a              ADR      r2,|L11.260|
00005a  4621              MOV      r1,r4                 ;475
00005c  4628              MOV      r0,r5                 ;475
00005e  f7fffffe          BL       __2snprintf
000062  4628              MOV      r0,r5                 ;475
000064  f7fffffe          BL       strlen
000068  1a24              SUBS     r4,r4,r0              ;475
00006a  4628              MOV      r0,r5                 ;475
00006c  f7fffffe          BL       strlen
000070  4405              ADD      r5,r5,r0              ;475
                  |L11.114|
000072  bf00              NOP                            ;475
000074  2000              MOVS     r0,#0                 ;476
000076  4911              LDR      r1,|L11.188|
000078  6809              LDR      r1,[r1,#0]            ;476  ; pCli
00007a  f8c10524          STR      r0,[r1,#0x524]        ;476
00007e  e01a              B        |L11.182|
                  |L11.128|
000080  a124              ADR      r1,|L11.276|
000082  6870              LDR      r0,[r6,#4]            ;477
000084  f7fffffe          BL       strcasecmp
000088  b9a8              CBNZ     r0,|L11.182|
00008a  bf00              NOP                            ;478
00008c  2c00              CMP      r4,#0                 ;478
00008e  dd0c              BLE      |L11.170|
000090  a221              ADR      r2,|L11.280|
000092  4621              MOV      r1,r4                 ;478
000094  4628              MOV      r0,r5                 ;478
000096  f7fffffe          BL       __2snprintf
00009a  4628              MOV      r0,r5                 ;478
00009c  f7fffffe          BL       strlen
0000a0  1a24              SUBS     r4,r4,r0              ;478
0000a2  4628              MOV      r0,r5                 ;478
0000a4  f7fffffe          BL       strlen
0000a8  4405              ADD      r5,r5,r0              ;478
                  |L11.170|
0000aa  bf00              NOP                            ;478
0000ac  2001              MOVS     r0,#1                 ;479
0000ae  4903              LDR      r1,|L11.188|
0000b0  6809              LDR      r1,[r1,#0]            ;479  ; pCli
0000b2  f8c10524          STR      r0,[r1,#0x524]        ;479
                  |L11.182|
0000b6  bf00              NOP      
0000b8  e7c4              B        |L11.68|
;;;482    
                          ENDP

0000ba  0000              DCW      0x0000
                  |L11.188|
                          DCD      pCli
                  |L11.192|
0000c0  44697361          DCB      "Disabled",0
0000c4  626c6564
0000c8  00      
0000c9  00                DCB      0
0000ca  00                DCB      0
0000cb  00                DCB      0
                  |L11.204|
0000cc  456e6162          DCB      "Enabled",0
0000d0  6c656400
                  |L11.212|
0000d4  55736167          DCB      "Usage: echo on/off. Echo is currently %s\r\n",0
0000d8  653a2065
0000dc  63686f20
0000e0  6f6e2f6f
0000e4  66662e20
0000e8  4563686f
0000ec  20697320
0000f0  63757272
0000f4  656e746c
0000f8  79202573
0000fc  0d0a00  
0000ff  00                DCB      0
                  |L11.256|
000100  6f6e00            DCB      "on",0
000103  00                DCB      0
                  |L11.260|
000104  456e6162          DCB      "Enable echo\r\n",0
000108  6c652065
00010c  63686f0d
000110  0a00    
000112  00                DCB      0
000113  00                DCB      0
                  |L11.276|
000114  6f666600          DCB      "off",0
                  |L11.280|
000118  44697361          DCB      "Disable echo\r\n",0
00011c  626c6520
000120  6563686f
000124  0d0a00  
000127  00                DCB      0

                          AREA ||i.get_input||, CODE, READONLY, ALIGN=2

                  get_input PROC
;;;235    * Returns: 1 if there is input, 0 if the line should be ignored. */
;;;236    static int get_input(char *inbuf, unsigned int *bp)
000000  b570              PUSH     {r4-r6,lr}
;;;237    {
000002  4605              MOV      r5,r0
000004  460c              MOV      r4,r1
;;;238      
;;;239      if (inbuf == NULL) {
000006  b90d              CBNZ     r5,|L12.12|
;;;240        return 0;
000008  2000              MOVS     r0,#0
                  |L12.10|
;;;241      }
;;;242      while (cli_getchar(&inbuf[*bp]) == 1) {
;;;243    		if (inbuf[*bp] == RET_CHAR)
;;;244    			continue;
;;;245        if (inbuf[*bp] == END_CHAR) {	/* end of input line */
;;;246          inbuf[*bp] = '\0';
;;;247          *bp = 0;
;;;248          return 1;
;;;249        }
;;;250        
;;;251        if ((inbuf[*bp] == 0x08) ||	/* backspace */
;;;252            (inbuf[*bp] == 0x7f)) {	/* DEL */
;;;253              if (*bp > 0) {
;;;254                (*bp)--;
;;;255                if (!pCli->echo_disabled)
;;;256                  cli_printf("%c %c", 0x08, 0x08);
;;;257              }
;;;258              continue;
;;;259            }
;;;260        
;;;261        if (inbuf[*bp] == '\t') {
;;;262          inbuf[*bp] = '\0';
;;;263          tab_complete(inbuf, bp);
;;;264          continue;
;;;265        }
;;;266        
;;;267        if (!pCli->echo_disabled)
;;;268          cli_printf("%c", inbuf[*bp]);
;;;269        
;;;270        (*bp)++;
;;;271        if (*bp >= INBUF_SIZE) {
;;;272          cli_printf("Error: input buffer overflow\r\n");
;;;273          cli_printf(PROMPT);
;;;274          *bp = 0;
;;;275          return 0;
;;;276        }
;;;277        
;;;278      }
;;;279      
;;;280      return 0;
;;;281    }
00000a  bd70              POP      {r4-r6,pc}
                  |L12.12|
00000c  e04c              B        |L12.168|
                  |L12.14|
00000e  6820              LDR      r0,[r4,#0]            ;243
000010  5c28              LDRB     r0,[r5,r0]            ;243
000012  280a              CMP      r0,#0xa               ;243
000014  d100              BNE      |L12.24|
000016  e047              B        |L12.168|
                  |L12.24|
000018  6820              LDR      r0,[r4,#0]            ;245
00001a  5c28              LDRB     r0,[r5,r0]            ;245
00001c  280d              CMP      r0,#0xd               ;245
00001e  d105              BNE      |L12.44|
000020  2000              MOVS     r0,#0                 ;246
000022  6821              LDR      r1,[r4,#0]            ;246
000024  5468              STRB     r0,[r5,r1]            ;246
000026  6020              STR      r0,[r4,#0]            ;247
000028  2001              MOVS     r0,#1                 ;248
00002a  e7ee              B        |L12.10|
                  |L12.44|
00002c  6820              LDR      r0,[r4,#0]            ;251
00002e  5c28              LDRB     r0,[r5,r0]            ;251
000030  2808              CMP      r0,#8                 ;251
000032  d003              BEQ      |L12.60|
000034  6820              LDR      r0,[r4,#0]            ;252
000036  5c28              LDRB     r0,[r5,r0]            ;252
000038  287f              CMP      r0,#0x7f              ;252
00003a  d10f              BNE      |L12.92|
                  |L12.60|
00003c  6820              LDR      r0,[r4,#0]            ;253
00003e  b160              CBZ      r0,|L12.90|
000040  6820              LDR      r0,[r4,#0]            ;254
000042  1e40              SUBS     r0,r0,#1              ;254
000044  6020              STR      r0,[r4,#0]            ;254
000046  481c              LDR      r0,|L12.184|
000048  6800              LDR      r0,[r0,#0]            ;255  ; pCli
00004a  f8d00524          LDR      r0,[r0,#0x524]        ;255
00004e  b920              CBNZ     r0,|L12.90|
000050  2208              MOVS     r2,#8                 ;256
000052  4611              MOV      r1,r2                 ;256
000054  a019              ADR      r0,|L12.188|
000056  f7fffffe          BL       cli_printf
                  |L12.90|
00005a  e025              B        |L12.168|
                  |L12.92|
00005c  6820              LDR      r0,[r4,#0]            ;261
00005e  5c28              LDRB     r0,[r5,r0]            ;261
000060  2809              CMP      r0,#9                 ;261
000062  d107              BNE      |L12.116|
000064  2000              MOVS     r0,#0                 ;262
000066  6821              LDR      r1,[r4,#0]            ;262
000068  5468              STRB     r0,[r5,r1]            ;262
00006a  4621              MOV      r1,r4                 ;263
00006c  4628              MOV      r0,r5                 ;263
00006e  f7fffffe          BL       tab_complete
000072  e019              B        |L12.168|
                  |L12.116|
000074  4810              LDR      r0,|L12.184|
000076  6800              LDR      r0,[r0,#0]            ;267  ; pCli
000078  f8d00524          LDR      r0,[r0,#0x524]        ;267
00007c  b920              CBNZ     r0,|L12.136|
00007e  6820              LDR      r0,[r4,#0]            ;268
000080  5c29              LDRB     r1,[r5,r0]            ;268
000082  a010              ADR      r0,|L12.196|
000084  f7fffffe          BL       cli_printf
                  |L12.136|
000088  6820              LDR      r0,[r4,#0]            ;270
00008a  1c40              ADDS     r0,r0,#1              ;270
00008c  6020              STR      r0,[r4,#0]            ;270
00008e  6820              LDR      r0,[r4,#0]            ;271
000090  2850              CMP      r0,#0x50              ;271
000092  d308              BCC      |L12.166|
000094  a00c              ADR      r0,|L12.200|
000096  f7fffffe          BL       cli_printf
00009a  a013              ADR      r0,|L12.232|
00009c  f7fffffe          BL       cli_printf
0000a0  2000              MOVS     r0,#0                 ;274
0000a2  6020              STR      r0,[r4,#0]            ;274
0000a4  e7b1              B        |L12.10|
                  |L12.166|
0000a6  bf00              NOP                            ;244
                  |L12.168|
0000a8  6821              LDR      r1,[r4,#0]            ;242
0000aa  1948              ADDS     r0,r1,r5              ;242
0000ac  f7fffffe          BL       cli_getchar
0000b0  2801              CMP      r0,#1                 ;242
0000b2  d0ac              BEQ      |L12.14|
0000b4  2000              MOVS     r0,#0                 ;280
0000b6  e7a8              B        |L12.10|
;;;282    
                          ENDP

                  |L12.184|
                          DCD      pCli
                  |L12.188|
0000bc  25632025          DCB      "%c %c",0
0000c0  6300    
0000c2  00                DCB      0
0000c3  00                DCB      0
                  |L12.196|
0000c4  256300            DCB      "%c",0
0000c7  00                DCB      0
                  |L12.200|
0000c8  4572726f          DCB      "Error: input buffer overflow\r\n",0
0000cc  723a2069
0000d0  6e707574
0000d4  20627566
0000d8  66657220
0000dc  6f766572
0000e0  666c6f77
0000e4  0d0a00  
0000e7  00                DCB      0
                  |L12.232|
0000e8  0d0a2320          DCB      "\r\n# ",0
0000ec  00      
0000ed  00                DCB      0
0000ee  00                DCB      0
0000ef  00                DCB      0

                          AREA ||i.get_version||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_percent
                          REQUIRE _printf_s
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                          REQUIRE _printf_d
                          REQUIRE _printf_int_dec
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                  get_version PROC
;;;435    
;;;436    static void get_version(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d43f0          PUSH     {r4-r9,lr}
;;;437    {
000004  b095              SUB      sp,sp,#0x54
000006  4605              MOV      r5,r0
000008  460c              MOV      r4,r1
00000a  4690              MOV      r8,r2
00000c  4699              MOV      r9,r3
;;;438      char ver[64];
;;;439      uint8_t major, minor, revision;
;;;440      void mico_system_version( uint8_t *major, uint8_t *minor, uint8_t *revision );
;;;441      int ret;
;;;442      
;;;443      cmd_printf( "Product module: %s\r\n", MODEL );
00000e  bf00              NOP      
000010  2c00              CMP      r4,#0
000012  dd0d              BLE      |L13.48|
000014  a367              ADR      r3,|L13.436|
000016  a26a              ADR      r2,|L13.448|
000018  4621              MOV      r1,r4
00001a  4628              MOV      r0,r5
00001c  f7fffffe          BL       __2snprintf
000020  4628              MOV      r0,r5
000022  f7fffffe          BL       strlen
000026  1a24              SUBS     r4,r4,r0
000028  4628              MOV      r0,r5
00002a  f7fffffe          BL       strlen
00002e  4405              ADD      r5,r5,r0
                  |L13.48|
000030  bf00              NOP      
;;;444      cmd_printf( "Hardware version: %s\r\n", HARDWARE_REVISION );
000032  bf00              NOP      
000034  2c00              CMP      r4,#0
000036  dd0d              BLE      |L13.84|
000038  a35e              ADR      r3,|L13.436|
00003a  a267              ADR      r2,|L13.472|
00003c  4621              MOV      r1,r4
00003e  4628              MOV      r0,r5
000040  f7fffffe          BL       __2snprintf
000044  4628              MOV      r0,r5
000046  f7fffffe          BL       strlen
00004a  1a24              SUBS     r4,r4,r0
00004c  4628              MOV      r0,r5
00004e  f7fffffe          BL       strlen
000052  4405              ADD      r5,r5,r0
                  |L13.84|
000054  bf00              NOP      
;;;445      cmd_printf( "Manufacture: %s\r\n", MANUFACTURER );
000056  bf00              NOP      
000058  2c00              CMP      r4,#0
00005a  dd0d              BLE      |L13.120|
00005c  a364              ADR      r3,|L13.496|
00005e  a267              ADR      r2,|L13.508|
000060  4621              MOV      r1,r4
000062  4628              MOV      r0,r5
000064  f7fffffe          BL       __2snprintf
000068  4628              MOV      r0,r5
00006a  f7fffffe          BL       strlen
00006e  1a24              SUBS     r4,r4,r0
000070  4628              MOV      r0,r5
000072  f7fffffe          BL       strlen
000076  4405              ADD      r5,r5,r0
                  |L13.120|
000078  bf00              NOP      
;;;446      cmd_printf( "Kernel version: %s\r\n", MicoGetVer() );
00007a  bf00              NOP      
00007c  2c00              CMP      r4,#0
00007e  dd10              BLE      |L13.162|
000080  f7fffffe          BL       system_lib_version
000084  4607              MOV      r7,r0
000086  463b              MOV      r3,r7
000088  a261              ADR      r2,|L13.528|
00008a  4621              MOV      r1,r4
00008c  4628              MOV      r0,r5
00008e  f7fffffe          BL       __2snprintf
000092  4628              MOV      r0,r5
000094  f7fffffe          BL       strlen
000098  1a24              SUBS     r4,r4,r0
00009a  4628              MOV      r0,r5
00009c  f7fffffe          BL       strlen
0000a0  4405              ADD      r5,r5,r0
                  |L13.162|
0000a2  bf00              NOP      
;;;447      mico_system_version( &major, &minor, &revision );
0000a4  aa02              ADD      r2,sp,#8
0000a6  a903              ADD      r1,sp,#0xc
0000a8  a804              ADD      r0,sp,#0x10
0000aa  f7fffffe          BL       mico_system_version
;;;448      cmd_printf( "MiCO version: %d.%d.%d\r\n", major, minor, revision );
0000ae  bf00              NOP      
0000b0  2c00              CMP      r4,#0
0000b2  dd14              BLE      |L13.222|
0000b4  f89d0008          LDRB     r0,[sp,#8]
0000b8  f89d100c          LDRB     r1,[sp,#0xc]
0000bc  e9cd1000          STRD     r1,r0,[sp,#0]
0000c0  f89d3010          LDRB     r3,[sp,#0x10]
0000c4  a258              ADR      r2,|L13.552|
0000c6  4621              MOV      r1,r4
0000c8  4628              MOV      r0,r5
0000ca  f7fffffe          BL       __2snprintf
0000ce  4628              MOV      r0,r5
0000d0  f7fffffe          BL       strlen
0000d4  1a24              SUBS     r4,r4,r0
0000d6  4628              MOV      r0,r5
0000d8  f7fffffe          BL       strlen
0000dc  4405              ADD      r5,r5,r0
                  |L13.222|
0000de  bf00              NOP      
;;;449      cmd_printf("Firmware version: %s\r\n", FIRMWARE_REVISION );
0000e0  bf00              NOP      
0000e2  2c00              CMP      r4,#0
0000e4  dd0d              BLE      |L13.258|
0000e6  a357              ADR      r3,|L13.580|
0000e8  a25a              ADR      r2,|L13.596|
0000ea  4621              MOV      r1,r4
0000ec  4628              MOV      r0,r5
0000ee  f7fffffe          BL       __2snprintf
0000f2  4628              MOV      r0,r5
0000f4  f7fffffe          BL       strlen
0000f8  1a24              SUBS     r4,r4,r0
0000fa  4628              MOV      r0,r5
0000fc  f7fffffe          BL       strlen
000100  4405              ADD      r5,r5,r0
                  |L13.258|
000102  bf00              NOP      
;;;450      cmd_printf("Application info: %s\r\n", APP_INFO );
000104  bf00              NOP      
000106  2c00              CMP      r4,#0
000108  dd0d              BLE      |L13.294|
00010a  a358              ADR      r3,|L13.620|
00010c  a25b              ADR      r2,|L13.636|
00010e  4621              MOV      r1,r4
000110  4628              MOV      r0,r5
000112  f7fffffe          BL       __2snprintf
000116  4628              MOV      r0,r5
000118  f7fffffe          BL       strlen
00011c  1a24              SUBS     r4,r4,r0
00011e  4628              MOV      r0,r5
000120  f7fffffe          BL       strlen
000124  4405              ADD      r5,r5,r0
                  |L13.294|
000126  bf00              NOP      
;;;451      cmd_printf("Bootloader version: %s\r\n", mico_get_bootloader_ver() );
000128  bf00              NOP      
00012a  2c00              CMP      r4,#0
00012c  dd10              BLE      |L13.336|
00012e  f7fffffe          BL       mico_get_bootloader_ver
000132  4607              MOV      r7,r0
000134  463b              MOV      r3,r7
000136  a257              ADR      r2,|L13.660|
000138  4621              MOV      r1,r4
00013a  4628              MOV      r0,r5
00013c  f7fffffe          BL       __2snprintf
000140  4628              MOV      r0,r5
000142  f7fffffe          BL       strlen
000146  1a24              SUBS     r4,r4,r0
000148  4628              MOV      r0,r5
00014a  f7fffffe          BL       strlen
00014e  4405              ADD      r5,r5,r0
                  |L13.336|
000150  bf00              NOP      
;;;452      
;;;453      memset(ver, 0, sizeof(ver));
000152  2140              MOVS     r1,#0x40
000154  a805              ADD      r0,sp,#0x14
000156  f7fffffe          BL       __aeabi_memclr4
;;;454      ret = MicoGetRfVer(ver, sizeof(ver));
00015a  2140              MOVS     r1,#0x40
00015c  a805              ADD      r0,sp,#0x14
00015e  f7fffffe          BL       wlan_driver_version
000162  4606              MOV      r6,r0
;;;455      if (ret == 0)
000164  b98e              CBNZ     r6,|L13.394|
;;;456        cmd_printf("WIFI version: %s\r\n", ver);
000166  bf00              NOP      
000168  2c00              CMP      r4,#0
00016a  dd0d              BLE      |L13.392|
00016c  ab05              ADD      r3,sp,#0x14
00016e  a250              ADR      r2,|L13.688|
000170  4621              MOV      r1,r4
000172  4628              MOV      r0,r5
000174  f7fffffe          BL       __2snprintf
000178  4628              MOV      r0,r5
00017a  f7fffffe          BL       strlen
00017e  1a24              SUBS     r4,r4,r0
000180  4628              MOV      r0,r5
000182  f7fffffe          BL       strlen
000186  4405              ADD      r5,r5,r0
                  |L13.392|
000188  e011              B        |L13.430|
                  |L13.394|
;;;457      else
;;;458        cmd_printf("Can't get WIFI version, return %d\r\n", ret);
00018a  bf00              NOP      
00018c  2c00              CMP      r4,#0
00018e  dd0d              BLE      |L13.428|
000190  4633              MOV      r3,r6
000192  a24c              ADR      r2,|L13.708|
000194  4621              MOV      r1,r4
000196  4628              MOV      r0,r5
000198  f7fffffe          BL       __2snprintf
00019c  4628              MOV      r0,r5
00019e  f7fffffe          BL       strlen
0001a2  1a24              SUBS     r4,r4,r0
0001a4  4628              MOV      r0,r5
0001a6  f7fffffe          BL       strlen
0001aa  4405              ADD      r5,r5,r0
                  |L13.428|
0001ac  bf00              NOP      
                  |L13.430|
;;;459    }
0001ae  b015              ADD      sp,sp,#0x54
0001b0  e8bd83f0          POP      {r4-r9,pc}
;;;460    
                          ENDP

                  |L13.436|
0001b4  46495245          DCB      "FIRE-F429",0
0001b8  2d463432
0001bc  3900    
0001be  00                DCB      0
0001bf  00                DCB      0
                  |L13.448|
0001c0  50726f64          DCB      "Product module: %s\r\n",0
0001c4  75637420
0001c8  6d6f6475
0001cc  6c653a20
0001d0  25730d0a
0001d4  00      
0001d5  00                DCB      0
0001d6  00                DCB      0
0001d7  00                DCB      0
                  |L13.472|
0001d8  48617264          DCB      "Hardware version: %s\r\n",0
0001dc  77617265
0001e0  20766572
0001e4  73696f6e
0001e8  3a202573
0001ec  0d0a00  
0001ef  00                DCB      0
                  |L13.496|
0001f0  4d584348          DCB      "MXCHIP Inc.",0
0001f4  49502049
0001f8  6e632e00
                  |L13.508|
0001fc  4d616e75          DCB      "Manufacture: %s\r\n",0
000200  66616374
000204  7572653a
000208  2025730d
00020c  0a00    
00020e  00                DCB      0
00020f  00                DCB      0
                  |L13.528|
000210  4b65726e          DCB      "Kernel version: %s\r\n",0
000214  656c2076
000218  65727369
00021c  6f6e3a20
000220  25730d0a
000224  00      
000225  00                DCB      0
000226  00                DCB      0
000227  00                DCB      0
                  |L13.552|
000228  4d69434f          DCB      "MiCO version: %d.%d.%d\r\n",0
00022c  20766572
000230  73696f6e
000234  3a202564
000238  2e25642e
00023c  25640d0a
000240  00      
000241  00                DCB      0
000242  00                DCB      0
000243  00                DCB      0
                  |L13.580|
000244  4d49434f          DCB      "MICO_BASIC_1_0",0
000248  5f424153
00024c  49435f31
000250  5f3000  
000253  00                DCB      0
                  |L13.596|
000254  4669726d          DCB      "Firmware version: %s\r\n",0
000258  77617265
00025c  20766572
000260  73696f6e
000264  3a202573
000268  0d0a00  
00026b  00                DCB      0
                  |L13.620|
00026c  4d69434f          DCB      "MiCO BASIC Demo",0
000270  20424153
000274  49432044
000278  656d6f00
                  |L13.636|
00027c  4170706c          DCB      "Application info: %s\r\n",0
000280  69636174
000284  696f6e20
000288  696e666f
00028c  3a202573
000290  0d0a00  
000293  00                DCB      0
                  |L13.660|
000294  426f6f74          DCB      "Bootloader version: %s\r\n",0
000298  6c6f6164
00029c  65722076
0002a0  65727369
0002a4  6f6e3a20
0002a8  25730d0a
0002ac  00      
0002ad  00                DCB      0
0002ae  00                DCB      0
0002af  00                DCB      0
                  |L13.688|
0002b0  57494649          DCB      "WIFI version: %s\r\n",0
0002b4  20766572
0002b8  73696f6e
0002bc  3a202573
0002c0  0d0a00  
0002c3  00                DCB      0
                  |L13.708|
0002c4  43616e27          DCB      "Can't get WIFI version, return %d\r\n",0
0002c8  74206765
0002cc  74205749
0002d0  46492076
0002d4  65727369
0002d8  6f6e2c20
0002dc  72657475
0002e0  726e2025
0002e4  640d0a00

                          AREA ||i.handle_input||, CODE, READONLY, ALIGN=2

                  handle_input PROC
;;;90     */
;;;91     static int handle_input(char *inbuf)
000000  e92d43f8          PUSH     {r3-r9,lr}
;;;92     {
000004  4605              MOV      r5,r0
;;;93       struct {
;;;94         unsigned inArg:1;
;;;95         unsigned inQuote:1;
;;;96         unsigned done:1;
;;;97       } stat;
;;;98       static char *argv[16];
;;;99       int argc = 0;
000006  2600              MOVS     r6,#0
;;;100      int i = 0;
000008  2400              MOVS     r4,#0
;;;101      const struct cli_command *command = NULL;
00000a  46a0              MOV      r8,r4
;;;102      const char *p;
;;;103      
;;;104      
;;;105      memset((void *)&argv, 0, sizeof(argv));
00000c  2140              MOVS     r1,#0x40
00000e  487b              LDR      r0,|L14.508|
000010  f7fffffe          BL       __aeabi_memclr4
;;;106      memset(&stat, 0, sizeof(stat));
000014  2000              MOVS     r0,#0
000016  9000              STR      r0,[sp,#0]
;;;107      
;;;108      do {
000018  bf00              NOP      
                  |L14.26|
;;;109        switch (inbuf[i]) {
00001a  5d28              LDRB     r0,[r5,r4]
00001c  b120              CBZ      r0,|L14.40|
00001e  2820              CMP      r0,#0x20
000020  d066              BEQ      |L14.240|
000022  2822              CMP      r0,#0x22
000024  d17b              BNE      |L14.286|
000026  e00c              B        |L14.66|
                  |L14.40|
;;;110        case '\0':
;;;111          if (stat.inQuote)
000028  9800              LDR      r0,[sp,#0]
00002a  f3c00040          UBFX     r0,r0,#1,#1
00002e  b110              CBZ      r0,|L14.54|
;;;112            return 2;
000030  2002              MOVS     r0,#2
                  |L14.50|
;;;113          stat.done = 1;
;;;114          break;
;;;115          
;;;116        case '"':
;;;117          if (i > 0 && inbuf[i - 1] == '\\' && stat.inArg) {
;;;118            memcpy(&inbuf[i - 1], &inbuf[i],
;;;119                   strlen(&inbuf[i]) + 1);
;;;120            --i;
;;;121            break;
;;;122          }
;;;123          if (!stat.inQuote && stat.inArg)
;;;124            break;
;;;125          if (stat.inQuote && !stat.inArg)
;;;126            return 2;
;;;127          
;;;128          if (!stat.inQuote && !stat.inArg) {
;;;129            stat.inArg = 1;
;;;130            stat.inQuote = 1;
;;;131            argc++;
;;;132            argv[argc - 1] = &inbuf[i + 1];
;;;133          } else if (stat.inQuote && stat.inArg) {
;;;134            stat.inArg = 0;
;;;135            stat.inQuote = 0;
;;;136            inbuf[i] = '\0';
;;;137          }
;;;138          break;
;;;139          
;;;140        case ' ':
;;;141          if (i > 0 && inbuf[i - 1] == '\\' && stat.inArg) {
;;;142            memcpy(&inbuf[i - 1], &inbuf[i],
;;;143                   strlen(&inbuf[i]) + 1);
;;;144            --i;
;;;145            break;
;;;146          }
;;;147          if (!stat.inQuote && stat.inArg) {
;;;148            stat.inArg = 0;
;;;149            inbuf[i] = '\0';
;;;150          }
;;;151          break;
;;;152          
;;;153        default:
;;;154          if (!stat.inArg) {
;;;155            stat.inArg = 1;
;;;156            argc++;
;;;157            argv[argc - 1] = &inbuf[i];
;;;158          }
;;;159          break;
;;;160        }
;;;161      } while (!stat.done && ++i < INBUF_SIZE);
;;;162      
;;;163      if (stat.inQuote)
;;;164        return 2;
;;;165      
;;;166      if (argc < 1)
;;;167        return 0;
;;;168      
;;;169      if (!pCli->echo_disabled)
;;;170        cli_printf("\r\n");
;;;171      
;;;172      /*
;;;173      * Some comamands can allow extensions like foo.a, foo.b and hence
;;;174      * compare commands before first dot.
;;;175      */
;;;176      i = ((p = strchr(argv[0], '.')) == NULL) ? 0 :
;;;177        (p - argv[0]);
;;;178        command = lookup_command(argv[0], i);
;;;179        if (command == NULL)
;;;180          return 1;
;;;181        
;;;182        memset(pCli->outbuf, 0, OUTBUF_SIZE);
;;;183        cli_putstr("\r\n");
;;;184        command->function(pCli->outbuf, OUTBUF_SIZE, argc, argv);
;;;185        cli_putstr(pCli->outbuf);
;;;186        return 0;
;;;187    }
000032  e8bd83f8          POP      {r3-r9,pc}
                  |L14.54|
000036  9800              LDR      r0,[sp,#0]            ;113
000038  f0200004          BIC      r0,r0,#4              ;113
00003c  1d00              ADDS     r0,r0,#4              ;113
00003e  9000              STR      r0,[sp,#0]            ;113
000040  e08d              B        |L14.350|
                  |L14.66|
000042  2c00              CMP      r4,#0                 ;117
000044  dd14              BLE      |L14.112|
000046  1e60              SUBS     r0,r4,#1              ;117
000048  5c28              LDRB     r0,[r5,r0]            ;117
00004a  285c              CMP      r0,#0x5c              ;117
00004c  d110              BNE      |L14.112|
00004e  9800              LDR      r0,[sp,#0]            ;117
000050  f0000001          AND      r0,r0,#1              ;117
000054  b160              CBZ      r0,|L14.112|
000056  1928              ADDS     r0,r5,r4              ;118
000058  f7fffffe          BL       strlen
00005c  f1000901          ADD      r9,r0,#1              ;118
000060  1929              ADDS     r1,r5,r4              ;118
000062  1e62              SUBS     r2,r4,#1              ;118
000064  1950              ADDS     r0,r2,r5              ;118
000066  464a              MOV      r2,r9                 ;118
000068  f7fffffe          BL       __aeabi_memcpy
00006c  1e64              SUBS     r4,r4,#1              ;120
00006e  e076              B        |L14.350|
                  |L14.112|
000070  9800              LDR      r0,[sp,#0]            ;123
000072  f3c00040          UBFX     r0,r0,#1,#1           ;123
000076  b920              CBNZ     r0,|L14.130|
000078  9800              LDR      r0,[sp,#0]            ;123
00007a  f0000001          AND      r0,r0,#1              ;123
00007e  b100              CBZ      r0,|L14.130|
000080  e06d              B        |L14.350|
                  |L14.130|
000082  9800              LDR      r0,[sp,#0]            ;125
000084  f3c00040          UBFX     r0,r0,#1,#1           ;125
000088  b128              CBZ      r0,|L14.150|
00008a  9800              LDR      r0,[sp,#0]            ;125
00008c  f0000001          AND      r0,r0,#1              ;125
000090  b908              CBNZ     r0,|L14.150|
000092  2002              MOVS     r0,#2                 ;126
000094  e7cd              B        |L14.50|
                  |L14.150|
000096  9800              LDR      r0,[sp,#0]            ;128
000098  f3c00040          UBFX     r0,r0,#1,#1           ;128
00009c  b9a8              CBNZ     r0,|L14.202|
00009e  9800              LDR      r0,[sp,#0]            ;128
0000a0  f0000001          AND      r0,r0,#1              ;128
0000a4  b988              CBNZ     r0,|L14.202|
0000a6  9800              LDR      r0,[sp,#0]            ;129
0000a8  f0200001          BIC      r0,r0,#1              ;129
0000ac  1c40              ADDS     r0,r0,#1              ;129
0000ae  9000              STR      r0,[sp,#0]            ;129
0000b0  9800              LDR      r0,[sp,#0]            ;130
0000b2  f0200002          BIC      r0,r0,#2              ;130
0000b6  1c80              ADDS     r0,r0,#2              ;130
0000b8  9000              STR      r0,[sp,#0]            ;130
0000ba  1c76              ADDS     r6,r6,#1              ;131
0000bc  1c60              ADDS     r0,r4,#1              ;132
0000be  1829              ADDS     r1,r5,r0              ;132
0000c0  1e70              SUBS     r0,r6,#1              ;132
0000c2  4a4e              LDR      r2,|L14.508|
0000c4  f8421020          STR      r1,[r2,r0,LSL #2]     ;132
0000c8  e011              B        |L14.238|
                  |L14.202|
0000ca  9800              LDR      r0,[sp,#0]            ;133
0000cc  f3c00040          UBFX     r0,r0,#1,#1           ;133
0000d0  b168              CBZ      r0,|L14.238|
0000d2  9800              LDR      r0,[sp,#0]            ;133
0000d4  f0000001          AND      r0,r0,#1              ;133
0000d8  b148              CBZ      r0,|L14.238|
0000da  9800              LDR      r0,[sp,#0]            ;134
0000dc  f0200001          BIC      r0,r0,#1              ;134
0000e0  9000              STR      r0,[sp,#0]            ;134
0000e2  9800              LDR      r0,[sp,#0]            ;135
0000e4  f0200002          BIC      r0,r0,#2              ;135
0000e8  9000              STR      r0,[sp,#0]            ;135
0000ea  2000              MOVS     r0,#0                 ;136
0000ec  5528              STRB     r0,[r5,r4]            ;136
                  |L14.238|
0000ee  e036              B        |L14.350|
                  |L14.240|
0000f0  2c00              CMP      r4,#0                 ;141
0000f2  dd15              BLE      |L14.288|
0000f4  1e60              SUBS     r0,r4,#1              ;141
0000f6  5c28              LDRB     r0,[r5,r0]            ;141
0000f8  285c              CMP      r0,#0x5c              ;141
0000fa  d111              BNE      |L14.288|
0000fc  9800              LDR      r0,[sp,#0]            ;141
0000fe  f0000001          AND      r0,r0,#1              ;141
000102  b168              CBZ      r0,|L14.288|
000104  1928              ADDS     r0,r5,r4              ;142
000106  f7fffffe          BL       strlen
00010a  f1000901          ADD      r9,r0,#1              ;142
00010e  1929              ADDS     r1,r5,r4              ;142
000110  1e62              SUBS     r2,r4,#1              ;142
000112  1950              ADDS     r0,r2,r5              ;142
000114  464a              MOV      r2,r9                 ;142
000116  f7fffffe          BL       __aeabi_memcpy
00011a  1e64              SUBS     r4,r4,#1              ;144
00011c  e01f              B        |L14.350|
                  |L14.286|
00011e  e00e              B        |L14.318|
                  |L14.288|
000120  9800              LDR      r0,[sp,#0]            ;147
000122  f3c00040          UBFX     r0,r0,#1,#1           ;147
000126  b948              CBNZ     r0,|L14.316|
000128  9800              LDR      r0,[sp,#0]            ;147
00012a  f0000001          AND      r0,r0,#1              ;147
00012e  b128              CBZ      r0,|L14.316|
000130  9800              LDR      r0,[sp,#0]            ;148
000132  f0200001          BIC      r0,r0,#1              ;148
000136  9000              STR      r0,[sp,#0]            ;148
000138  2000              MOVS     r0,#0                 ;149
00013a  5528              STRB     r0,[r5,r4]            ;149
                  |L14.316|
00013c  e00f              B        |L14.350|
                  |L14.318|
00013e  9800              LDR      r0,[sp,#0]            ;154
000140  f0000001          AND      r0,r0,#1              ;154
000144  b950              CBNZ     r0,|L14.348|
000146  9800              LDR      r0,[sp,#0]            ;155
000148  f0200001          BIC      r0,r0,#1              ;155
00014c  1c40              ADDS     r0,r0,#1              ;155
00014e  9000              STR      r0,[sp,#0]            ;155
000150  1c76              ADDS     r6,r6,#1              ;156
000152  1929              ADDS     r1,r5,r4              ;157
000154  1e70              SUBS     r0,r6,#1              ;157
000156  4a29              LDR      r2,|L14.508|
000158  f8421020          STR      r1,[r2,r0,LSL #2]     ;157
                  |L14.348|
00015c  bf00              NOP                            ;159
                  |L14.350|
00015e  bf00              NOP                            ;114
000160  9800              LDR      r0,[sp,#0]            ;161
000162  f3c00080          UBFX     r0,r0,#2,#1           ;161
000166  b920              CBNZ     r0,|L14.370|
000168  1c60              ADDS     r0,r4,#1              ;161
00016a  4604              MOV      r4,r0                 ;161
00016c  2850              CMP      r0,#0x50              ;161
00016e  f6ffaf54          BLT      |L14.26|
                  |L14.370|
000172  9800              LDR      r0,[sp,#0]            ;163
000174  f3c00040          UBFX     r0,r0,#1,#1           ;163
000178  b108              CBZ      r0,|L14.382|
00017a  2002              MOVS     r0,#2                 ;164
00017c  e759              B        |L14.50|
                  |L14.382|
00017e  2e01              CMP      r6,#1                 ;166
000180  da01              BGE      |L14.390|
000182  2000              MOVS     r0,#0                 ;167
000184  e755              B        |L14.50|
                  |L14.390|
000186  481e              LDR      r0,|L14.512|
000188  6800              LDR      r0,[r0,#0]            ;169  ; pCli
00018a  f8d00524          LDR      r0,[r0,#0x524]        ;169
00018e  b910              CBNZ     r0,|L14.406|
000190  a01c              ADR      r0,|L14.516|
000192  f7fffffe          BL       cli_printf
                  |L14.406|
000196  4919              LDR      r1,|L14.508|
000198  6808              LDR      r0,[r1,#0]            ;176  ; argv
00019a  212e              MOVS     r1,#0x2e              ;176
00019c  f7fffffe          BL       strchr
0001a0  0007              MOVS     r7,r0                 ;176
0001a2  d100              BNE      |L14.422|
0001a4  e002              B        |L14.428|
                  |L14.422|
0001a6  4815              LDR      r0,|L14.508|
0001a8  6800              LDR      r0,[r0,#0]            ;177  ; argv
0001aa  1a38              SUBS     r0,r7,r0              ;177
                  |L14.428|
0001ac  4604              MOV      r4,r0                 ;177
0001ae  4913              LDR      r1,|L14.508|
0001b0  6808              LDR      r0,[r1,#0]            ;178  ; argv
0001b2  4621              MOV      r1,r4                 ;178
0001b4  f7fffffe          BL       lookup_command
0001b8  4680              MOV      r8,r0                 ;178
0001ba  f1b80f00          CMP      r8,#0                 ;179
0001be  d101              BNE      |L14.452|
0001c0  2001              MOVS     r0,#1                 ;180
0001c2  e736              B        |L14.50|
                  |L14.452|
0001c4  f44f6180          MOV      r1,#0x400             ;182
0001c8  480d              LDR      r0,|L14.512|
0001ca  6800              LDR      r0,[r0,#0]            ;182  ; pCli
0001cc  3058              ADDS     r0,r0,#0x58           ;182
0001ce  f7fffffe          BL       __aeabi_memclr4
0001d2  a00c              ADR      r0,|L14.516|
0001d4  f7fffffe          BL       cli_putstr
0001d8  4b08              LDR      r3,|L14.508|
0001da  4632              MOV      r2,r6                 ;184
0001dc  f44f6180          MOV      r1,#0x400             ;184
0001e0  4807              LDR      r0,|L14.512|
0001e2  f8d8c008          LDR      r12,[r8,#8]           ;184
0001e6  6800              LDR      r0,[r0,#0]            ;184  ; pCli
0001e8  3058              ADDS     r0,r0,#0x58           ;184
0001ea  47e0              BLX      r12                   ;184
0001ec  4804              LDR      r0,|L14.512|
0001ee  6800              LDR      r0,[r0,#0]            ;185  ; pCli
0001f0  3058              ADDS     r0,r0,#0x58           ;185
0001f2  f7fffffe          BL       cli_putstr
0001f6  2000              MOVS     r0,#0                 ;186
0001f8  e71b              B        |L14.50|
;;;188    
                          ENDP

0001fa  0000              DCW      0x0000
                  |L14.508|
                          DCD      argv
                  |L14.512|
                          DCD      pCli
                  |L14.516|
000204  0d0a00            DCB      "\r\n",0
000207  00                DCB      0

                          AREA ||i.help_command||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_percent
                          REQUIRE _printf_s
                          REQUIRE _printf_str
                  help_command PROC
;;;420    * text string, if any. */
;;;421    static void help_command(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d43f8          PUSH     {r3-r9,lr}
;;;422    {
000004  4606              MOV      r6,r0
000006  460d              MOV      r5,r1
000008  4690              MOV      r8,r2
00000a  4699              MOV      r9,r3
;;;423      int i, n;
;;;424      
;;;425      cmd_printf("\r\n");
00000c  bf00              NOP      
00000e  2d00              CMP      r5,#0
000010  dd0c              BLE      |L15.44|
000012  a227              ADR      r2,|L15.176|
000014  4629              MOV      r1,r5
000016  4630              MOV      r0,r6
000018  f7fffffe          BL       __2snprintf
00001c  4630              MOV      r0,r6
00001e  f7fffffe          BL       strlen
000022  1a2d              SUBS     r5,r5,r0
000024  4630              MOV      r0,r6
000026  f7fffffe          BL       strlen
00002a  4406              ADD      r6,r6,r0
                  |L15.44|
00002c  bf00              NOP      
;;;426      for (i = 0, n = 0; i < MAX_COMMANDS && n < pCli->num_commands; i++) {
00002e  2400              MOVS     r4,#0
000030  2700              MOVS     r7,#0
000032  e033              B        |L15.156|
                  |L15.52|
;;;427        if (pCli->commands[i]->name) {
000034  481f              LDR      r0,|L15.180|
000036  6800              LDR      r0,[r0,#0]  ; pCli
000038  f500608b          ADD      r0,r0,#0x458
00003c  f8500024          LDR      r0,[r0,r4,LSL #2]
000040  6800              LDR      r0,[r0,#0]
000042  b350              CBZ      r0,|L15.154|
;;;428          cmd_printf("%s: %s\r\n", pCli->commands[i]->name,
000044  bf00              NOP      
000046  2d00              CMP      r5,#0
000048  dd25              BLE      |L15.150|
00004a  481a              LDR      r0,|L15.180|
00004c  6800              LDR      r0,[r0,#0]  ; pCli
00004e  f500608b          ADD      r0,r0,#0x458
000052  f8500024          LDR      r0,[r0,r4,LSL #2]
000056  6840              LDR      r0,[r0,#4]
000058  b138              CBZ      r0,|L15.106|
00005a  4816              LDR      r0,|L15.180|
00005c  6800              LDR      r0,[r0,#0]  ; pCli
00005e  f500608b          ADD      r0,r0,#0x458
000062  f8500024          LDR      r0,[r0,r4,LSL #2]
000066  6840              LDR      r0,[r0,#4]
000068  e000              B        |L15.108|
                  |L15.106|
00006a  a013              ADR      r0,|L15.184|
                  |L15.108|
00006c  9000              STR      r0,[sp,#0]
00006e  4811              LDR      r0,|L15.180|
000070  6800              LDR      r0,[r0,#0]  ; pCli
000072  f500608b          ADD      r0,r0,#0x458
000076  f8500024          LDR      r0,[r0,r4,LSL #2]
00007a  a210              ADR      r2,|L15.188|
00007c  4629              MOV      r1,r5
00007e  6803              LDR      r3,[r0,#0]
000080  4630              MOV      r0,r6
000082  f7fffffe          BL       __2snprintf
000086  4630              MOV      r0,r6
000088  f7fffffe          BL       strlen
00008c  1a2d              SUBS     r5,r5,r0
00008e  4630              MOV      r0,r6
000090  f7fffffe          BL       strlen
000094  4406              ADD      r6,r6,r0
                  |L15.150|
000096  bf00              NOP      
;;;429                     pCli->commands[i]->help ?
;;;430                       pCli->commands[i]->help : "");
;;;431          n++;
000098  1c7f              ADDS     r7,r7,#1
                  |L15.154|
00009a  1c64              ADDS     r4,r4,#1              ;426
                  |L15.156|
00009c  2c32              CMP      r4,#0x32              ;426
00009e  da05              BGE      |L15.172|
0000a0  4804              LDR      r0,|L15.180|
0000a2  6800              LDR      r0,[r0,#0]            ;426  ; pCli
0000a4  f8d00520          LDR      r0,[r0,#0x520]        ;426
0000a8  42b8              CMP      r0,r7                 ;426
0000aa  d8c3              BHI      |L15.52|
                  |L15.172|
;;;432        }
;;;433      }
;;;434    }
0000ac  e8bd83f8          POP      {r3-r9,pc}
;;;435    
                          ENDP

                  |L15.176|
0000b0  0d0a00            DCB      "\r\n",0
0000b3  00                DCB      0
                  |L15.180|
                          DCD      pCli
                  |L15.184|
0000b8  00                DCB      0
0000b9  00                DCB      0
0000ba  00                DCB      0
0000bb  00                DCB      0
                  |L15.188|
0000bc  25733a20          DCB      "%s: %s\r\n",0
0000c0  25730d0a
0000c4  00      
0000c5  00                DCB      0
0000c6  00                DCB      0
0000c7  00                DCB      0

                          AREA ||i.lookup_command||, CODE, READONLY, ALIGN=2

                  lookup_command PROC
;;;54     */
;;;55     static const struct cli_command *lookup_command(char *name, int len)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;56     {
000004  4606              MOV      r6,r0
000006  460d              MOV      r5,r1
;;;57       int i = 0;
000008  2400              MOVS     r4,#0
;;;58       int n = 0;
00000a  2700              MOVS     r7,#0
;;;59       
;;;60       while (i < MAX_COMMANDS && n < pCli->num_commands) {
00000c  e033              B        |L16.118|
                  |L16.14|
;;;61         if (pCli->commands[i]->name == NULL) {
00000e  481f              LDR      r0,|L16.140|
000010  6800              LDR      r0,[r0,#0]  ; pCli
000012  f500608b          ADD      r0,r0,#0x458
000016  f8500024          LDR      r0,[r0,r4,LSL #2]
00001a  6800              LDR      r0,[r0,#0]
00001c  b908              CBNZ     r0,|L16.34|
;;;62           i++;
00001e  1c64              ADDS     r4,r4,#1
;;;63           continue;
000020  e029              B        |L16.118|
                  |L16.34|
;;;64         }
;;;65         /* See if partial or full match is expected */
;;;66         if (len != 0) {
000022  b19d              CBZ      r5,|L16.76|
;;;67           if (!strncmp(pCli->commands[i]->name, name, len))
000024  4919              LDR      r1,|L16.140|
000026  6809              LDR      r1,[r1,#0]  ; pCli
000028  f501618b          ADD      r1,r1,#0x458
00002c  f8511024          LDR      r1,[r1,r4,LSL #2]
000030  462a              MOV      r2,r5
000032  6808              LDR      r0,[r1,#0]
000034  4631              MOV      r1,r6
000036  f7fffffe          BL       strncmp
00003a  b9c8              CBNZ     r0,|L16.112|
;;;68             return pCli->commands[i];
00003c  4813              LDR      r0,|L16.140|
00003e  6800              LDR      r0,[r0,#0]  ; pCli
000040  f500608b          ADD      r0,r0,#0x458
000044  f8500024          LDR      r0,[r0,r4,LSL #2]
                  |L16.72|
;;;69         } else {
;;;70           if (!strcmp(pCli->commands[i]->name, name))
;;;71             return pCli->commands[i];
;;;72         }
;;;73         
;;;74         i++;
;;;75         n++;
;;;76       }
;;;77       
;;;78       return NULL;
;;;79     }
000048  e8bd81f0          POP      {r4-r8,pc}
                  |L16.76|
00004c  490f              LDR      r1,|L16.140|
00004e  6809              LDR      r1,[r1,#0]            ;70  ; pCli
000050  f501618b          ADD      r1,r1,#0x458          ;70
000054  f8511024          LDR      r1,[r1,r4,LSL #2]     ;70
000058  6808              LDR      r0,[r1,#0]            ;70
00005a  4631              MOV      r1,r6                 ;70
00005c  f7fffffe          BL       strcmp
000060  b930              CBNZ     r0,|L16.112|
000062  480a              LDR      r0,|L16.140|
000064  6800              LDR      r0,[r0,#0]            ;71  ; pCli
000066  f500608b          ADD      r0,r0,#0x458          ;71
00006a  f8500024          LDR      r0,[r0,r4,LSL #2]     ;71
00006e  e7eb              B        |L16.72|
                  |L16.112|
000070  1c64              ADDS     r4,r4,#1              ;74
000072  1c7f              ADDS     r7,r7,#1              ;75
000074  bf00              NOP                            ;63
                  |L16.118|
000076  2c32              CMP      r4,#0x32              ;60
000078  da05              BGE      |L16.134|
00007a  4804              LDR      r0,|L16.140|
00007c  6800              LDR      r0,[r0,#0]            ;60  ; pCli
00007e  f8d00520          LDR      r0,[r0,#0x520]        ;60
000082  42b8              CMP      r0,r7                 ;60
000084  d8c3              BHI      |L16.14|
                  |L16.134|
000086  2000              MOVS     r0,#0                 ;78
000088  e7de              B        |L16.72|
;;;80     
                          ENDP

00008a  0000              DCW      0x0000
                  |L16.140|
                          DCD      pCli

                          AREA ||i.micodebug_Command||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_percent
                          REQUIRE _printf_s
                          REQUIRE _printf_str
                  micodebug_Command PROC
;;;586    extern int mico_debug_enabled;
;;;587    static void micodebug_Command(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;588    {
000004  4605              MOV      r5,r0
000006  460c              MOV      r4,r1
000008  4617              MOV      r7,r2
00000a  461e              MOV      r6,r3
;;;589      if (argc == 1) {
00000c  2f01              CMP      r7,#1
00000e  d119              BNE      |L17.68|
;;;590        cmd_printf("Usage: micodebug on/off. MICO debug is currently %s\r\n",
000010  bf00              NOP      
000012  2c00              CMP      r4,#0
000014  dd13              BLE      |L17.62|
000016  4826              LDR      r0,|L17.176|
000018  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
00001a  b108              CBZ      r0,|L17.32|
00001c  a025              ADR      r0,|L17.180|
00001e  e000              B        |L17.34|
                  |L17.32|
000020  a026              ADR      r0,|L17.188|
                  |L17.34|
000022  4603              MOV      r3,r0
000024  a228              ADR      r2,|L17.200|
000026  4621              MOV      r1,r4
000028  4628              MOV      r0,r5
00002a  f7fffffe          BL       __2snprintf
00002e  4628              MOV      r0,r5
000030  f7fffffe          BL       strlen
000034  1a24              SUBS     r4,r4,r0
000036  4628              MOV      r0,r5
000038  f7fffffe          BL       strlen
00003c  4405              ADD      r5,r5,r0
                  |L17.62|
00003e  bf00              NOP      
                  |L17.64|
;;;591                   mico_debug_enabled ? "Enabled" : "Disabled");
;;;592        return;
;;;593      }
;;;594      
;;;595      if (!strcasecmp(argv[1], "on")) {
;;;596        cmd_printf("Enable MICO debug\r\n");
;;;597        mico_debug_enabled = 1;
;;;598      } else if (!strcasecmp(argv[1], "off")) {
;;;599        cmd_printf("Disable MICO debug\r\n");
;;;600        mico_debug_enabled = 0;
;;;601      }
;;;602    }
000040  e8bd81f0          POP      {r4-r8,pc}
                  |L17.68|
000044  a12e              ADR      r1,|L17.256|
000046  6870              LDR      r0,[r6,#4]            ;595
000048  f7fffffe          BL       strcasecmp
00004c  b9a0              CBNZ     r0,|L17.120|
00004e  bf00              NOP                            ;596
000050  2c00              CMP      r4,#0                 ;596
000052  dd0c              BLE      |L17.110|
000054  a22b              ADR      r2,|L17.260|
000056  4621              MOV      r1,r4                 ;596
000058  4628              MOV      r0,r5                 ;596
00005a  f7fffffe          BL       __2snprintf
00005e  4628              MOV      r0,r5                 ;596
000060  f7fffffe          BL       strlen
000064  1a24              SUBS     r4,r4,r0              ;596
000066  4628              MOV      r0,r5                 ;596
000068  f7fffffe          BL       strlen
00006c  4405              ADD      r5,r5,r0              ;596
                  |L17.110|
00006e  bf00              NOP                            ;596
000070  2001              MOVS     r0,#1                 ;597
000072  490f              LDR      r1,|L17.176|
000074  6008              STR      r0,[r1,#0]            ;597  ; mico_debug_enabled
000076  e018              B        |L17.170|
                  |L17.120|
000078  a127              ADR      r1,|L17.280|
00007a  6870              LDR      r0,[r6,#4]            ;598
00007c  f7fffffe          BL       strcasecmp
000080  b998              CBNZ     r0,|L17.170|
000082  bf00              NOP                            ;599
000084  2c00              CMP      r4,#0                 ;599
000086  dd0c              BLE      |L17.162|
000088  a224              ADR      r2,|L17.284|
00008a  4621              MOV      r1,r4                 ;599
00008c  4628              MOV      r0,r5                 ;599
00008e  f7fffffe          BL       __2snprintf
000092  4628              MOV      r0,r5                 ;599
000094  f7fffffe          BL       strlen
000098  1a24              SUBS     r4,r4,r0              ;599
00009a  4628              MOV      r0,r5                 ;599
00009c  f7fffffe          BL       strlen
0000a0  4405              ADD      r5,r5,r0              ;599
                  |L17.162|
0000a2  bf00              NOP                            ;599
0000a4  2000              MOVS     r0,#0                 ;600
0000a6  4902              LDR      r1,|L17.176|
0000a8  6008              STR      r0,[r1,#0]            ;600  ; mico_debug_enabled
                  |L17.170|
0000aa  bf00              NOP      
0000ac  e7c8              B        |L17.64|
;;;603    
                          ENDP

0000ae  0000              DCW      0x0000
                  |L17.176|
                          DCD      mico_debug_enabled
                  |L17.180|
0000b4  456e6162          DCB      "Enabled",0
0000b8  6c656400
                  |L17.188|
0000bc  44697361          DCB      "Disabled",0
0000c0  626c6564
0000c4  00      
0000c5  00                DCB      0
0000c6  00                DCB      0
0000c7  00                DCB      0
                  |L17.200|
0000c8  55736167          DCB      "Usage: micodebug on/off. MICO debug is currently %s\r\n"
0000cc  653a206d
0000d0  69636f64
0000d4  65627567
0000d8  206f6e2f
0000dc  6f66662e
0000e0  204d4943
0000e4  4f206465
0000e8  62756720
0000ec  69732063
0000f0  75727265
0000f4  6e746c79
0000f8  2025730d
0000fc  0a      
0000fd  00                DCB      0
0000fe  00                DCB      0
0000ff  00                DCB      0
                  |L17.256|
000100  6f6e00            DCB      "on",0
000103  00                DCB      0
                  |L17.260|
000104  456e6162          DCB      "Enable MICO debug\r\n",0
000108  6c65204d
00010c  49434f20
000110  64656275
000114  670d0a00
                  |L17.280|
000118  6f666600          DCB      "off",0
                  |L17.284|
00011c  44697361          DCB      "Disable MICO debug\r\n",0
000120  626c6520
000124  4d49434f
000128  20646562
00012c  75670d0a
000130  00      
000131  00                DCB      0
000132  00                DCB      0
000133  00                DCB      0

                          AREA ||i.ota_Command||, CODE, READONLY, ALIGN=1

                  ota_Command PROC
;;;408    
;;;409    static void ota_Command(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;410    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
;;;411    extern void tftp_ota(void);
;;;412        tftp_ota();
00000c  f7fffffe          BL       tftp_ota
;;;413    }
000010  e8bd81f0          POP      {r4-r8,pc}
;;;414    
                          ENDP


                          AREA ||i.partShow_Command||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_pre_padding
                          REQUIRE _printf_percent
                          REQUIRE _printf_flags
                          REQUIRE _printf_widthprec
                          REQUIRE _printf_d
                          REQUIRE _printf_x
                          REQUIRE _printf_s
                          REQUIRE _printf_int_dec
                          REQUIRE _printf_longlong_hex
                          REQUIRE _printf_str
                  partShow_Command PROC
;;;389    
;;;390    static void partShow_Command(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d47ff          PUSH     {r0-r10,lr}
;;;391    {
000004  4607              MOV      r7,r0
000006  460e              MOV      r6,r1
000008  4690              MOV      r8,r2
00000a  4699              MOV      r9,r3
;;;392        mico_partition_t i;
;;;393        mico_logic_partition_t *partition;
;;;394    
;;;395        for( i = MICO_PARTITION_BOOTLOADER; i <= MICO_PARTITION_PARAMETER_2; i++ ){
00000c  2500              MOVS     r5,#0
00000e  e01f              B        |L19.80|
                  |L19.16|
;;;396            partition = MicoFlashGetInfo( i );
000010  4628              MOV      r0,r5
000012  f7fffffe          BL       MicoFlashGetInfo
000016  4604              MOV      r4,r0
;;;397            cmd_printf( "%4d | %11s |  Dev:%d  | 0x%08x | 0x%08x |\r\n", i,
000018  bf00              NOP      
00001a  2e00              CMP      r6,#0
00001c  dd15              BLE      |L19.74|
00001e  7822              LDRB     r2,[r4,#0]
000020  e9d43101          LDRD     r3,r1,[r4,#4]
000024  68e0              LDR      r0,[r4,#0xc]
000026  e9cd3200          STRD     r3,r2,[sp,#0]
00002a  e9cd1002          STRD     r1,r0,[sp,#8]
00002e  462b              MOV      r3,r5
000030  a209              ADR      r2,|L19.88|
000032  4631              MOV      r1,r6
000034  4638              MOV      r0,r7
000036  f7fffffe          BL       __2snprintf
00003a  4638              MOV      r0,r7
00003c  f7fffffe          BL       strlen
000040  1a36              SUBS     r6,r6,r0
000042  4638              MOV      r0,r7
000044  f7fffffe          BL       strlen
000048  4407              ADD      r7,r7,r0
                  |L19.74|
00004a  bf00              NOP      
00004c  1c68              ADDS     r0,r5,#1              ;395
00004e  b245              SXTB     r5,r0                 ;395
                  |L19.80|
000050  2d06              CMP      r5,#6                 ;395
000052  dddd              BLE      |L19.16|
;;;398                partition->partition_description, partition->partition_owner, 
;;;399                partition->partition_start_addr, partition->partition_length);
;;;400        };
;;;401    
;;;402    }
000054  e8bd87ff          POP      {r0-r10,pc}
;;;403    
                          ENDP

                  |L19.88|
000058  25346420          DCB      "%4d | %11s |  Dev:%d  | 0x%08x | 0x%08x |\r\n",0
00005c  7c202531
000060  3173207c
000064  20204465
000068  763a2564
00006c  20207c20
000070  30782530
000074  3878207c
000078  20307825
00007c  30387820
000080  7c0d0a00

                          AREA ||i.print_bad_command||, CODE, READONLY, ALIGN=2

                  print_bad_command PROC
;;;286    */
;;;287    static void print_bad_command(char *cmd_string)
000000  b570              PUSH     {r4-r6,lr}
;;;288    {
000002  4605              MOV      r5,r0
;;;289      if (cmd_string != NULL) {
000004  b1ed              CBZ      r5,|L20.66|
;;;290        char *c = cmd_string;
000006  462c              MOV      r4,r5
;;;291        cli_printf("command '");
000008  a00e              ADR      r0,|L20.68|
00000a  f7fffffe          BL       cli_printf
;;;292        while (*c != '\0') {
00000e  e011              B        |L20.52|
                  |L20.16|
;;;293          if (isprint(*c)) {
000010  f7fffffe          BL       __rt_ctype_table
000014  6800              LDR      r0,[r0,#0]
000016  7821              LDRB     r1,[r4,#0]
000018  5c40              LDRB     r0,[r0,r1]
00001a  f000003e          AND      r0,r0,#0x3e
00001e  b120              CBZ      r0,|L20.42|
;;;294            cli_printf("%c", *c);
000020  7821              LDRB     r1,[r4,#0]
000022  a00b              ADR      r0,|L20.80|
000024  f7fffffe          BL       cli_printf
000028  e003              B        |L20.50|
                  |L20.42|
;;;295          } else {
;;;296            cli_printf("\\0x%x", *c);
00002a  7821              LDRB     r1,[r4,#0]
00002c  a009              ADR      r0,|L20.84|
00002e  f7fffffe          BL       cli_printf
                  |L20.50|
;;;297          }
;;;298          ++c;
000032  1c64              ADDS     r4,r4,#1
                  |L20.52|
000034  7820              LDRB     r0,[r4,#0]            ;292
000036  2800              CMP      r0,#0                 ;292
000038  d1ea              BNE      |L20.16|
;;;299        }
;;;300        cli_printf("' not found\r\n");
00003a  a008              ADR      r0,|L20.92|
00003c  f7fffffe          BL       cli_printf
;;;301      }
000040  bf00              NOP      
                  |L20.66|
;;;302    }
000042  bd70              POP      {r4-r6,pc}
;;;303    
                          ENDP

                  |L20.68|
000044  636f6d6d          DCB      "command '",0
000048  616e6420
00004c  2700    
00004e  00                DCB      0
00004f  00                DCB      0
                  |L20.80|
000050  256300            DCB      "%c",0
000053  00                DCB      0
                  |L20.84|
000054  5c307825          DCB      "\\0x%x",0
000058  7800    
00005a  00                DCB      0
00005b  00                DCB      0
                  |L20.92|
00005c  27206e6f          DCB      "' not found\r\n",0
000060  7420666f
000064  756e640d
000068  0a00    
00006a  00                DCB      0
00006b  00                DCB      0

                          AREA ||i.reboot||, CODE, READONLY, ALIGN=1

                  reboot PROC
;;;460    
;;;461    static void reboot(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;462    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
;;;463      MicoSystemReboot();
00000c  f7fffffe          BL       MicoSystemReboot
;;;464    }
000010  e8bd81f0          POP      {r4-r8,pc}
;;;465    
                          ENDP


                          AREA ||i.tab_complete||, CODE, READONLY, ALIGN=2

                  tab_complete PROC
;;;191    * is assumed to be NULL-terminated. */
;;;192    static void tab_complete(char *inbuf, unsigned int *bp)
000000  e92d47f0          PUSH     {r4-r10,lr}
;;;193    {
000004  4606              MOV      r6,r0
000006  460c              MOV      r4,r1
;;;194      int i, n, m;
;;;195      const char *fm = NULL;
000008  f04f0900          MOV      r9,#0
;;;196      
;;;197      cli_printf("\r\n");
00000c  a039              ADR      r0,|L22.244|
00000e  f7fffffe          BL       cli_printf
;;;198      
;;;199      /* show matching commands */
;;;200      for (i = 0, n = 0, m = 0; i < MAX_COMMANDS && n < pCli->num_commands;
000012  2500              MOVS     r5,#0
000014  2700              MOVS     r7,#0
000016  46a8              MOV      r8,r5
000018  e03c              B        |L22.148|
                  |L22.26|
;;;201      i++) {
;;;202        if (pCli->commands[i]->name != NULL) {
00001a  4837              LDR      r0,|L22.248|
00001c  6800              LDR      r0,[r0,#0]  ; pCli
00001e  f500608b          ADD      r0,r0,#0x458
000022  f8500025          LDR      r0,[r0,r5,LSL #2]
000026  6800              LDR      r0,[r0,#0]
000028  b398              CBZ      r0,|L22.146|
;;;203          if (!strncmp(inbuf, pCli->commands[i]->name, *bp)) {
00002a  4833              LDR      r0,|L22.248|
00002c  6822              LDR      r2,[r4,#0]
00002e  6800              LDR      r0,[r0,#0]  ; pCli
000030  f500608b          ADD      r0,r0,#0x458
000034  f8500025          LDR      r0,[r0,r5,LSL #2]
000038  6801              LDR      r1,[r0,#0]
00003a  4630              MOV      r0,r6
00003c  f7fffffe          BL       strncmp
000040  bb30              CBNZ     r0,|L22.144|
;;;204            m++;
000042  f1080801          ADD      r8,r8,#1
;;;205            if (m == 1)
000046  f1b80f01          CMP      r8,#1
00004a  d108              BNE      |L22.94|
;;;206              fm = pCli->commands[i]->name;
00004c  482a              LDR      r0,|L22.248|
00004e  6800              LDR      r0,[r0,#0]  ; pCli
000050  f500608b          ADD      r0,r0,#0x458
000054  f8500025          LDR      r0,[r0,r5,LSL #2]
000058  f8d09000          LDR      r9,[r0,#0]
00005c  e018              B        |L22.144|
                  |L22.94|
;;;207            else if (m == 2)
00005e  f1b80f02          CMP      r8,#2
000062  d10b              BNE      |L22.124|
;;;208              cli_printf("%s %s ", fm,
000064  4824              LDR      r0,|L22.248|
000066  6800              LDR      r0,[r0,#0]  ; pCli
000068  f500608b          ADD      r0,r0,#0x458
00006c  f8500025          LDR      r0,[r0,r5,LSL #2]
000070  4649              MOV      r1,r9
000072  6802              LDR      r2,[r0,#0]
000074  a021              ADR      r0,|L22.252|
000076  f7fffffe          BL       cli_printf
00007a  e009              B        |L22.144|
                  |L22.124|
;;;209                         pCli->commands[i]->name);
;;;210            else
;;;211              cli_printf("%s ",
00007c  481e              LDR      r0,|L22.248|
00007e  6800              LDR      r0,[r0,#0]  ; pCli
000080  f500608b          ADD      r0,r0,#0x458
000084  f8500025          LDR      r0,[r0,r5,LSL #2]
000088  6801              LDR      r1,[r0,#0]
00008a  a01e              ADR      r0,|L22.260|
00008c  f7fffffe          BL       cli_printf
                  |L22.144|
;;;212                         pCli->commands[i]->name);
;;;213          }
;;;214          n++;
000090  1c7f              ADDS     r7,r7,#1
                  |L22.146|
000092  1c6d              ADDS     r5,r5,#1              ;201
                  |L22.148|
000094  2d32              CMP      r5,#0x32              ;200
000096  da05              BGE      |L22.164|
000098  4817              LDR      r0,|L22.248|
00009a  6800              LDR      r0,[r0,#0]            ;200  ; pCli
00009c  f8d00520          LDR      r0,[r0,#0x520]        ;200
0000a0  42b8              CMP      r0,r7                 ;200
0000a2  d8ba              BHI      |L22.26|
                  |L22.164|
;;;215        }
;;;216      }
;;;217      
;;;218      /* there's only one match, so complete the line */
;;;219      if (m == 1 && fm) {
0000a4  f1b80f01          CMP      r8,#1
0000a8  d11d              BNE      |L22.230|
0000aa  f1b90f00          CMP      r9,#0
0000ae  d01a              BEQ      |L22.230|
;;;220        n = strlen(fm) - *bp;
0000b0  4648              MOV      r0,r9
0000b2  f7fffffe          BL       strlen
0000b6  6821              LDR      r1,[r4,#0]
0000b8  1a47              SUBS     r7,r0,r1
;;;221        if (*bp + n < INBUF_SIZE) {
0000ba  6820              LDR      r0,[r4,#0]
0000bc  4438              ADD      r0,r0,r7
0000be  2850              CMP      r0,#0x50
0000c0  d211              BCS      |L22.230|
;;;222          memcpy(inbuf + *bp, fm + *bp, n);
0000c2  6822              LDR      r2,[r4,#0]
0000c4  eb020109          ADD      r1,r2,r9
0000c8  1990              ADDS     r0,r2,r6
0000ca  463a              MOV      r2,r7
0000cc  f7fffffe          BL       __aeabi_memcpy
;;;223          *bp += n;
0000d0  6820              LDR      r0,[r4,#0]
0000d2  4438              ADD      r0,r0,r7
0000d4  6020              STR      r0,[r4,#0]
;;;224          inbuf[(*bp)++] = ' ';
0000d6  2120              MOVS     r1,#0x20
0000d8  6822              LDR      r2,[r4,#0]
0000da  1c50              ADDS     r0,r2,#1
0000dc  6020              STR      r0,[r4,#0]
0000de  54b1              STRB     r1,[r6,r2]
;;;225          inbuf[*bp] = '\0';
0000e0  2000              MOVS     r0,#0
0000e2  6821              LDR      r1,[r4,#0]
0000e4  5470              STRB     r0,[r6,r1]
                  |L22.230|
;;;226        }
;;;227      }
;;;228      
;;;229      /* just redraw input line */
;;;230      cli_printf("%s%s", PROMPT, inbuf);
0000e6  4632              MOV      r2,r6
0000e8  a107              ADR      r1,|L22.264|
0000ea  a009              ADR      r0,|L22.272|
0000ec  f7fffffe          BL       cli_printf
;;;231    }
0000f0  e8bd87f0          POP      {r4-r10,pc}
;;;232    
                          ENDP

                  |L22.244|
0000f4  0d0a00            DCB      "\r\n",0
0000f7  00                DCB      0
                  |L22.248|
                          DCD      pCli
                  |L22.252|
0000fc  25732025          DCB      "%s %s ",0
000100  732000  
000103  00                DCB      0
                  |L22.260|
000104  25732000          DCB      "%s ",0
                  |L22.264|
000108  0d0a2320          DCB      "\r\n# ",0
00010c  00      
00010d  00                DCB      0
00010e  00                DCB      0
00010f  00                DCB      0
                  |L22.272|
000110  25732573          DCB      "%s%s",0
000114  00      
000115  00                DCB      0
000116  00                DCB      0
000117  00                DCB      0

                          AREA ||i.tftp_Command||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_percent
                          REQUIRE _printf_d
                          REQUIRE _printf_x
                          REQUIRE _printf_s
                          REQUIRE _printf_int_dec
                          REQUIRE _printf_longlong_hex
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                  tftp_Command PROC
;;;339    
;;;340    static void tftp_Command(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d4ff0          PUSH     {r4-r11,lr}
;;;341    {
000004  b08f              SUB      sp,sp,#0x3c
000006  4607              MOV      r7,r0
000008  460d              MOV      r5,r1
00000a  4692              MOV      r10,r2
00000c  461c              MOV      r4,r3
;;;342        tftp_file_info_t cmdinfo;
;;;343        int tftpcmd;
;;;344        uint32_t ip;
;;;345        mico_partition_t parttype;
;;;346        mico_logic_partition_t *partition;
;;;347        
;;;348        if (argc != 7) {
00000e  f1ba0f07          CMP      r10,#7
000012  d000              BEQ      |L23.22|
;;;349            goto WRONGCMD;
000014  e076              B        |L23.260|
                  |L23.22|
;;;350        }
;;;351        if (strcmp(argv[2], "put")==0) {
000016  a145              ADR      r1,|L23.300|
000018  68a0              LDR      r0,[r4,#8]
00001a  f7fffffe          BL       strcmp
00001e  b910              CBNZ     r0,|L23.38|
;;;352            tftpcmd = 0;
000020  f04f0800          MOV      r8,#0
000024  e008              B        |L23.56|
                  |L23.38|
;;;353        } else if (strcmp(argv[2], "get") == 0) {
000026  a142              ADR      r1,|L23.304|
000028  68a0              LDR      r0,[r4,#8]
00002a  f7fffffe          BL       strcmp
00002e  b910              CBNZ     r0,|L23.54|
;;;354            tftpcmd = 1;
000030  f04f0801          MOV      r8,#1
000034  e000              B        |L23.56|
                  |L23.54|
;;;355        } else {
;;;356            goto WRONGCMD;
000036  e065              B        |L23.260|
                  |L23.56|
;;;357        }
;;;358    
;;;359        ip = inet_addr(argv[1]);
000038  6860              LDR      r0,[r4,#4]
00003a  f7fffffe          BL       inet_addr
00003e  4683              MOV      r11,r0
;;;360        parttype = (mico_partition_t)atoi(argv[4]);
000040  6920              LDR      r0,[r4,#0x10]
000042  f7fffffe          BL       atoi
000046  fa4ff980          SXTB     r9,r0
;;;361    
;;;362        partition = MicoFlashGetInfo( parttype );
00004a  4648              MOV      r0,r9
00004c  f7fffffe          BL       MicoFlashGetInfo
000050  4606              MOV      r6,r0
;;;363        if (partition) {
000052  b116              CBZ      r6,|L23.90|
;;;364            cmdinfo.flashtype = parttype;
000054  f8cd9038          STR      r9,[sp,#0x38]
000058  e000              B        |L23.92|
                  |L23.90|
;;;365        } else {
;;;366            goto WRONGCMD;
00005a  e053              B        |L23.260|
                  |L23.92|
;;;367        }
;;;368    
;;;369        cmdinfo.flashaddr = strtoul(argv[5], NULL, 0);
00005c  2200              MOVS     r2,#0
00005e  4611              MOV      r1,r2
000060  6960              LDR      r0,[r4,#0x14]
000062  f7fffffe          BL       strtoul
000066  900d              STR      r0,[sp,#0x34]
;;;370        strncpy(cmdinfo.filename, argv[3], 32);
000068  2220              MOVS     r2,#0x20
00006a  a804              ADD      r0,sp,#0x10
00006c  68e1              LDR      r1,[r4,#0xc]
00006e  f7fffffe          BL       strncpy
;;;371    
;;;372        cmdinfo.filelen= strtoul(argv[6], NULL, 0);
000072  2200              MOVS     r2,#0
000074  4611              MOV      r1,r2
000076  69a0              LDR      r0,[r4,#0x18]
000078  f7fffffe          BL       strtoul
00007c  900c              STR      r0,[sp,#0x30]
;;;373        if (tftpcmd == 0) { // put
00007e  f1b80f00          CMP      r8,#0
000082  d11e              BNE      |L23.194|
;;;374            cmd_printf("tftp put to %s, filenmae %s. from %s flash, address 0x%x, len %d\r\n", argv[1], cmdinfo.filename,
000084  bf00              NOP      
000086  2d00              CMP      r5,#0
000088  dd15              BLE      |L23.182|
00008a  e9dd010c          LDRD     r0,r1,[sp,#0x30]
00008e  ab04              ADD      r3,sp,#0x10
000090  6872              LDR      r2,[r6,#4]
000092  e9cd3200          STRD     r3,r2,[sp,#0]
000096  e9cd1002          STRD     r1,r0,[sp,#8]
00009a  4a26              LDR      r2,|L23.308|
00009c  4629              MOV      r1,r5
00009e  4638              MOV      r0,r7
0000a0  6863              LDR      r3,[r4,#4]
0000a2  f7fffffe          BL       __2snprintf
0000a6  4638              MOV      r0,r7
0000a8  f7fffffe          BL       strlen
0000ac  1a2d              SUBS     r5,r5,r0
0000ae  4638              MOV      r0,r7
0000b0  f7fffffe          BL       strlen
0000b4  4407              ADD      r7,r7,r0
                  |L23.182|
0000b6  bf00              NOP      
;;;375                partition->partition_description, cmdinfo.flashaddr, cmdinfo.filelen);
;;;376            tsend(&cmdinfo, ip);
0000b8  4659              MOV      r1,r11
0000ba  a804              ADD      r0,sp,#0x10
0000bc  f7fffffe          BL       tsend
0000c0  e01d              B        |L23.254|
                  |L23.194|
;;;377        } else { // get
;;;378            cmd_printf("tftp get from %s, filenmae %s. to %s flash, address 0x%x, len %d\r\n", argv[1], cmdinfo.filename,
0000c2  bf00              NOP      
0000c4  2d00              CMP      r5,#0
0000c6  dd15              BLE      |L23.244|
0000c8  e9dd010c          LDRD     r0,r1,[sp,#0x30]
0000cc  ab04              ADD      r3,sp,#0x10
0000ce  6872              LDR      r2,[r6,#4]
0000d0  e9cd3200          STRD     r3,r2,[sp,#0]
0000d4  e9cd1002          STRD     r1,r0,[sp,#8]
0000d8  4a17              LDR      r2,|L23.312|
0000da  4629              MOV      r1,r5
0000dc  4638              MOV      r0,r7
0000de  6863              LDR      r3,[r4,#4]
0000e0  f7fffffe          BL       __2snprintf
0000e4  4638              MOV      r0,r7
0000e6  f7fffffe          BL       strlen
0000ea  1a2d              SUBS     r5,r5,r0
0000ec  4638              MOV      r0,r7
0000ee  f7fffffe          BL       strlen
0000f2  4407              ADD      r7,r7,r0
                  |L23.244|
0000f4  bf00              NOP      
;;;379                partition->partition_description, cmdinfo.flashaddr, cmdinfo.filelen);
;;;380            tget(&cmdinfo, ip);
0000f6  4659              MOV      r1,r11
0000f8  a804              ADD      r0,sp,#0x10
0000fa  f7fffffe          BL       tget
                  |L23.254|
;;;381        }
;;;382        return;
;;;383        
;;;384    WRONGCMD:
;;;385        cmd_printf("Usage: tftp <ip> put <filename> <partition type> <flashaddr> <flashlen>\r\n"
;;;386                   "       tftp <ip> get <filenmae> <partition type> <flashaddr> <flashlen>\r\n"
;;;387                  );
;;;388    }
0000fe  b00f              ADD      sp,sp,#0x3c
000100  e8bd8ff0          POP      {r4-r11,pc}
                  |L23.260|
000104  bf00              NOP                            ;385
000106  2d00              CMP      r5,#0                 ;385
000108  dd0c              BLE      |L23.292|
00010a  4a0c              LDR      r2,|L23.316|
00010c  4629              MOV      r1,r5                 ;385
00010e  4638              MOV      r0,r7                 ;385
000110  f7fffffe          BL       __2snprintf
000114  4638              MOV      r0,r7                 ;385
000116  f7fffffe          BL       strlen
00011a  1a2d              SUBS     r5,r5,r0              ;385
00011c  4638              MOV      r0,r7                 ;385
00011e  f7fffffe          BL       strlen
000122  4407              ADD      r7,r7,r0              ;385
                  |L23.292|
000124  bf00              NOP                            ;385
000126  bf00              NOP      
000128  e7e9              B        |L23.254|
;;;389    
                          ENDP

00012a  0000              DCW      0x0000
                  |L23.300|
00012c  70757400          DCB      "put",0
                  |L23.304|
000130  67657400          DCB      "get",0
                  |L23.308|
                          DCD      ||.conststring||+0x24c
                  |L23.312|
                          DCD      ||.conststring||+0x290
                  |L23.316|
                          DCD      ||.conststring||+0x2d4

                          AREA ||i.uptime_Command||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_percent
                          REQUIRE _printf_d
                          REQUIRE _printf_int_dec
                  uptime_Command PROC
;;;403    
;;;404    static void uptime_Command(char *pcWriteBuffer, int xWriteBufferLen,int argc, char **argv)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;405    {
000004  4605              MOV      r5,r0
000006  460c              MOV      r4,r1
000008  4617              MOV      r7,r2
00000a  4698              MOV      r8,r3
;;;406        cmd_printf("UP time %dms\r\n", mico_get_time());
00000c  bf00              NOP      
00000e  2c00              CMP      r4,#0
000010  dd10              BLE      |L24.52|
000012  f7fffffe          BL       mico_get_time
000016  4606              MOV      r6,r0
000018  4633              MOV      r3,r6
00001a  a208              ADR      r2,|L24.60|
00001c  4621              MOV      r1,r4
00001e  4628              MOV      r0,r5
000020  f7fffffe          BL       __2snprintf
000024  4628              MOV      r0,r5
000026  f7fffffe          BL       strlen
00002a  1a24              SUBS     r4,r4,r0
00002c  4628              MOV      r0,r5
00002e  f7fffffe          BL       strlen
000032  4405              ADD      r5,r5,r0
                  |L24.52|
000034  bf00              NOP      
;;;407    }
000036  e8bd81f0          POP      {r4-r8,pc}
;;;408    
                          ENDP

00003a  0000              DCW      0x0000
                  |L24.60|
00003c  55502074          DCB      "UP time %dms\r\n",0
000040  696d6520
000044  25646d73
000048  0d0a00  
00004b  00                DCB      0

                          AREA ||.bss||, DATA, NOINIT, ALIGN=2

                  cli_rx_buffer
                          %        16
                  argv
                          %        64

                          AREA ||.constdata||, DATA, READONLY, ALIGN=2

                  cli_uart_config
                          DCD      0x0001c200
000004  03000000          DCB      0x03,0x00,0x00,0x00
000008  00000000          DCB      0x00,0x00,0x00,0x00
                  built_ins
                          DCD      ||.conststring||
                          DCD      0x00000000
                          DCD      help_command
                          DCD      ||.conststring||+0x8
                          DCD      0x00000000
                          DCD      get_version
                          DCD      ||.conststring||+0x10
                          DCD      0x00000000
                          DCD      echo_cmd_handler
                          DCD      ||.conststring||+0x18
                          DCD      ||.conststring||+0x20
                          DCD      cli_exit_handler
                          DCD      ||.conststring||+0x2c
                          DCD      ||.conststring||+0x34
                          DCD      wifiscan_Command
                          DCD      ||.conststring||+0x3c
                          DCD      ||.conststring||+0x48
                          DCD      wifistate_Command
                          DCD      ||.conststring||+0x58
                          DCD      ||.conststring||+0x64
                          DCD      wifidebug_Command
                          DCD      ||.conststring||+0x78
                          DCD      ||.conststring||+0x84
                          DCD      ifconfig_Command
                          DCD      ||.conststring||+0x94
                          DCD      ||.conststring||+0x98
                          DCD      arp_Command
                          DCD      ||.conststring||+0xa8
                          DCD      ||.conststring||+0xb0
                          DCD      ping_Command
                          DCD      ||.conststring||+0xbc
                          DCD      ||.conststring||+0xc0
                          DCD      dns_Command
                          DCD      ||.conststring||+0xd4
                          DCD      ||.conststring||+0xe0
                          DCD      socket_show_Command
                          DCD      ||.conststring||+0xf4
                          DCD      ||.conststring||+0x100
                          DCD      task_Command
                          DCD      ||.conststring||+0x11c
                          DCD      ||.conststring||+0x124
                          DCD      memory_show_Command
                          DCD      ||.conststring||+0x140
                          DCD      ||.conststring||+0x148
                          DCD      memory_dump_Command
                          DCD      ||.conststring||+0x158
                          DCD      ||.conststring||+0x160
                          DCD      memory_set_Command
                          DCD      ||.conststring||+0x18c
                          DCD      ||.conststring||+0x194
                          DCD      memp_dump_Command
                          DCD      ||.conststring||+0x1a4
                          DCD      ||.conststring||+0x1b0
                          DCD      driver_state_Command
                          DCD      ||.conststring||+0x1c8
                          DCD      ||.conststring||+0x1d0
                          DCD      reboot
                          DCD      ||.conststring||+0x1e4
                          DCD      ||.conststring||+0x1e4
                          DCD      tftp_Command
                          DCD      ||.conststring||+0x1ec
                          DCD      ||.conststring||+0x1f4
                          DCD      uptime_Command
                          DCD      ||.conststring||+0x200
                          DCD      ||.conststring||+0x204
                          DCD      ota_Command
                          DCD      ||.conststring||+0x210
                          DCD      ||.conststring||+0x218
                          DCD      partShow_Command
                  user_clis
                          DCD      ||.conststring||+0x22c
                          DCD      ||.conststring||+0x238
                          DCD      micodebug_Command

                          AREA ||.conststring||, DATA, READONLY, MERGE=1, STRINGS, ALIGN=2

000000  68656c70          DCB      "help",0
000004  00      
000005  00                DCB      0
000006  00                DCB      0
000007  00                DCB      0
000008  76657273          DCB      "version",0
00000c  696f6e00
000010  6563686f          DCB      "echo",0
000014  00      
000015  00                DCB      0
000016  00                DCB      0
000017  00                DCB      0
000018  65786974          DCB      "exit",0
00001c  00      
00001d  00                DCB      0
00001e  00                DCB      0
00001f  00                DCB      0
000020  434c4920          DCB      "CLI exit",0
000024  65786974
000028  00      
000029  00                DCB      0
00002a  00                DCB      0
00002b  00                DCB      0
00002c  7363616e          DCB      "scan",0
000030  00      
000031  00                DCB      0
000032  00                DCB      0
000033  00                DCB      0
000034  7363616e          DCB      "scan ap",0
000038  20617000
00003c  77696669          DCB      "wifistate",0
000040  73746174
000044  6500    
000046  00                DCB      0
000047  00                DCB      0
000048  53686f77          DCB      "Show wifi state",0
00004c  20776966
000050  69207374
000054  61746500
000058  77696669          DCB      "wifidebug",0
00005c  64656275
000060  6700    
000062  00                DCB      0
000063  00                DCB      0
000064  77696669          DCB      "wifidebug on/off",0
000068  64656275
00006c  67206f6e
000070  2f6f6666
000074  00      
000075  00                DCB      0
000076  00                DCB      0
000077  00                DCB      0
000078  6966636f          DCB      "ifconfig",0
00007c  6e666967
000080  00      
000081  00                DCB      0
000082  00                DCB      0
000083  00                DCB      0
000084  53686f77          DCB      "Show IP address",0
000088  20495020
00008c  61646472
000090  65737300
000094  61727000          DCB      "arp",0
000098  61727020          DCB      "arp show/clean",0
00009c  73686f77
0000a0  2f636c65
0000a4  616e00  
0000a7  00                DCB      0
0000a8  70696e67          DCB      "ping",0
0000ac  00      
0000ad  00                DCB      0
0000ae  00                DCB      0
0000af  00                DCB      0
0000b0  70696e67          DCB      "ping <ip>",0
0000b4  203c6970
0000b8  3e00    
0000ba  00                DCB      0
0000bb  00                DCB      0
0000bc  646e7300          DCB      "dns",0
0000c0  73686f77          DCB      "show/clean/<domain>",0
0000c4  2f636c65
0000c8  616e2f3c
0000cc  646f6d61
0000d0  696e3e00
0000d4  736f636b          DCB      "sockshow",0
0000d8  73686f77
0000dc  00      
0000dd  00                DCB      0
0000de  00                DCB      0
0000df  00                DCB      0
0000e0  53686f77          DCB      "Show all sockets",0
0000e4  20616c6c
0000e8  20736f63
0000ec  6b657473
0000f0  00      
0000f1  00                DCB      0
0000f2  00                DCB      0
0000f3  00                DCB      0
0000f4  7461736b          DCB      "tasklist",0
0000f8  6c697374
0000fc  00      
0000fd  00                DCB      0
0000fe  00                DCB      0
0000ff  00                DCB      0
000100  6c697374          DCB      "list all thread name status",0
000104  20616c6c
000108  20746872
00010c  65616420
000110  6e616d65
000114  20737461
000118  74757300
00011c  6d656d73          DCB      "memshow",0
000120  686f7700
000124  7072696e          DCB      "print memory information",0
000128  74206d65
00012c  6d6f7279
000130  20696e66
000134  6f726d61
000138  74696f6e
00013c  00      
00013d  00                DCB      0
00013e  00                DCB      0
00013f  00                DCB      0
000140  6d656d64          DCB      "memdump",0
000144  756d7000
000148  3c616464          DCB      "<addr> <length>",0
00014c  723e203c
000150  6c656e67
000154  74683e00
000158  6d656d73          DCB      "memset",0
00015c  657400  
00015f  00                DCB      0
000160  3c616464          DCB      "<addr> <value 1> [<value 2> ... <value n>]",0
000164  723e203c
000168  76616c75
00016c  6520313e
000170  205b3c76
000174  616c7565
000178  20323e20
00017c  2e2e2e20
000180  3c76616c
000184  7565206e
000188  3e5d00  
00018b  00                DCB      0
00018c  6d656d70          DCB      "memp",0
000190  00      
000191  00                DCB      0
000192  00                DCB      0
000193  00                DCB      0
000194  7072696e          DCB      "print memp list",0
000198  74206d65
00019c  6d70206c
0001a0  69737400
0001a4  77696669          DCB      "wifidriver",0
0001a8  64726976
0001ac  657200  
0001af  00                DCB      0
0001b0  73686f77          DCB      "show wifi driver status",0
0001b4  20776966
0001b8  69206472
0001bc  69766572
0001c0  20737461
0001c4  74757300
0001c8  7265626f          DCB      "reboot",0
0001cc  6f7400  
0001cf  00                DCB      0
0001d0  7265626f          DCB      "reboot MiCO system",0
0001d4  6f74204d
0001d8  69434f20
0001dc  73797374
0001e0  656d00  
0001e3  00                DCB      0
0001e4  74667470          DCB      "tftp",0
0001e8  00      
0001e9  00                DCB      0
0001ea  00                DCB      0
0001eb  00                DCB      0
0001ec  74696d65          DCB      "time",0
0001f0  00      
0001f1  00                DCB      0
0001f2  00                DCB      0
0001f3  00                DCB      0
0001f4  73797374          DCB      "system time",0
0001f8  656d2074
0001fc  696d6500
000200  6f746100          DCB      "ota",0
000204  73797374          DCB      "system ota",0
000208  656d206f
00020c  746100  
00020f  00                DCB      0
000210  666c6173          DCB      "flash",0
000214  6800    
000216  00                DCB      0
000217  00                DCB      0
000218  466c6173          DCB      "Flash memory map",0
00021c  68206d65
000220  6d6f7279
000224  206d6170
000228  00      
000229  00                DCB      0
00022a  00                DCB      0
00022b  00                DCB      0
00022c  6d69636f          DCB      "micodebug",0
000230  64656275
000234  6700    
000236  00                DCB      0
000237  00                DCB      0
000238  6d69636f          DCB      "micodebug on/off",0
00023c  64656275
000240  67206f6e
000244  2f6f6666
000248  00      
000249  00                DCB      0
00024a  00                DCB      0
00024b  00                DCB      0
00024c  74667470          DCB      "tftp put to %s, filenmae %s. from %s flash, address 0x%"
000250  20707574
000254  20746f20
000258  25732c20
00025c  66696c65
000260  6e6d6165
000264  2025732e
000268  2066726f
00026c  6d202573
000270  20666c61
000274  73682c20
000278  61646472
00027c  65737320
000280  307825  
000283  782c206c          DCB      "x, len %d\r\n",0
000287  656e2025
00028b  640d0a00
00028f  00                DCB      0
000290  74667470          DCB      "tftp get from %s, filenmae %s. to %s flash, address 0x%"
000294  20676574
000298  2066726f
00029c  6d202573
0002a0  2c206669
0002a4  6c656e6d
0002a8  61652025
0002ac  732e2074
0002b0  6f202573
0002b4  20666c61
0002b8  73682c20
0002bc  61646472
0002c0  65737320
0002c4  307825  
0002c7  782c206c          DCB      "x, len %d\r\n",0
0002cb  656e2025
0002cf  640d0a00
0002d3  00                DCB      0
0002d4  55736167          DCB      "Usage: tftp <ip> put <filename> <partition type> <flash"
0002d8  653a2074
0002dc  66747020
0002e0  3c69703e
0002e4  20707574
0002e8  203c6669
0002ec  6c656e61
0002f0  6d653e20
0002f4  3c706172
0002f8  74697469
0002fc  6f6e2074
000300  7970653e
000304  203c666c
000308  617368  
00030b  61646472          DCB      "addr> <flashlen>\r\n       tftp <ip> get <filenmae> <pa"
00030f  3e203c66
000313  6c617368
000317  6c656e3e
00031b  0d0a2020
00031f  20202020
000323  20746674
000327  70203c69
00032b  703e2067
00032f  6574203c
000333  66696c65
000337  6e6d6165
00033b  3e203c70
00033f  61      
000340  72746974          DCB      "rtition type> <flashaddr> <flashlen>\r\n",0
000344  696f6e20
000348  74797065
00034c  3e203c66
000350  6c617368
000354  61646472
000358  3e203c66
00035c  6c617368
000360  6c656e3e
000364  0d0a00  

                          AREA ||.data||, DATA, ALIGN=2

                  pCli
                          DCD      0x00000000
                  cli_rx_data
                          DCD      0x00000000

;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\MICO\\system\\command_console\\mico_cli.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___10_mico_cli_c_b57da97f____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___10_mico_cli_c_b57da97f____REV16| PROC
#line 115

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___10_mico_cli_c_b57da97f____REVSH|
#line 128
|__asm___10_mico_cli_c_b57da97f____REVSH| PROC
#line 129

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
