; 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\bootloader\mico-fire_f429\obj_rvmdk\menu.o --asm_dir=..\..\..\..\Build\Bootloader\MICO-Fire_F429\list_RVMDK\ --list_dir=..\..\..\..\Build\Bootloader\MICO-Fire_F429\list_RVMDK\ --depend=..\..\..\..\build\bootloader\mico-fire_f429\obj_rvmdk\menu.d --cpu=Cortex-M4.fp --apcs=interwork --diag_suppress=9931,1,1293 -I..\..\..\..\Bootloader -I..\..\..\..\Board\fire_F429 -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 -IG:\GIT_OSC\F429_OV2640_MICO_SDRAM\Projects\STM32F429\bootloader\RVMDK\RTE -ID:\work\keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -ID:\work\keil5\ARM\CMSIS\Include -ID:\work\keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0 -D__MICROLIB -D__UVISION_VERSION=516 -DSTM32F429xx -DUSE_STDPERIPH_DRIVER -DBOOTLOADER -DNO_MICO_RTOS -DHSE_VALUE=25000000 --omf_browse=..\..\..\..\build\bootloader\mico-fire_f429\obj_rvmdk\menu.crf ..\..\..\..\Bootloader\menu.c]
                          THUMB

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

                          REQUIRE _printf_percent
                          REQUIRE _printf_d
                          REQUIRE _printf_x
                          REQUIRE _printf_int_dec
                          REQUIRE _printf_longlong_hex
                          REQUIRE _printf_pre_padding
                          REQUIRE _printf_flags
                          REQUIRE _printf_widthprec
                          REQUIRE _printf_s
                          REQUIRE _printf_str
                  Main_Menu PROC
;;;191    */
;;;192    void Main_Menu(void)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;193    {
000004  b0b0              SUB      sp,sp,#0xc0
;;;194      char cmdbuf [CMD_STRING_SIZE] = {0}, cmdname[15] = {0};     /* command input buffer        */
000006  2180              MOVS     r1,#0x80
000008  a801              ADD      r0,sp,#4
00000a  f7fffffe          BL       __aeabi_memclr4
00000e  2700              MOVS     r7,#0
;;;195      int i, j;                                       /* index for command buffer    */
;;;196      char startAddressStr[10], endAddressStr[10], flash_dev_str[4];
;;;197      int32_t startAddress, endAddress;
;;;198      bool inputFlashArea = false;
;;;199      mico_logic_partition_t *partition;
;;;200      mico_flash_t flash_dev;
;;;201      OSStatus err = kNoErr;
;;;202      
;;;203      while (1)  {                                    /* loop forever                */
;;;204        printf ("\n\rMXCHIP> ");
;;;205        getline (&cmdbuf[0], sizeof (cmdbuf));        /* input command line          */
;;;206        
;;;207        for (i = 0; cmdbuf[i] == ' '; i++);           /* skip blanks on head         */
;;;208        for (; cmdbuf[i] != 0; i++)  {                /* convert to upper characters */
;;;209          cmdbuf[i] = toupper(cmdbuf[i]);
;;;210        }
;;;211        
;;;212        for (i = 0; cmdbuf[i] == ' '; i++);        /* skip blanks on head         */
;;;213        for(j=0; cmdbuf[i] != ' '&&cmdbuf[i] != 0; i++,j++)  {         /* find command name       */
;;;214          cmdname[j] = cmdbuf[i];
;;;215        }
;;;216        cmdname[j] = '\0';
;;;217        
;;;218        /***************** Command "0" or "BOOTUPDATE": Update the application  *************************/
;;;219        if(strcmp(cmdname, "BOOTUPDATE") == 0 || strcmp(cmdname, "0") == 0) {
;;;220          partition = MicoFlashGetInfo( MICO_PARTITION_BOOTLOADER );
;;;221          if (findCommandPara(cmdbuf, "r", NULL, 0) != -1){
;;;222            printf ("\n\rRead Bootloader...\n\r");
;;;223            SerialUpload( partition->partition_owner, partition->partition_start_addr, "BootLoaderImage.bin", partition->partition_length );
;;;224            continue;
;;;225          }
;;;226          printf ("\n\rUpdating Bootloader...\n\r");
;;;227          err = MicoFlashDisableSecurity( MICO_PARTITION_BOOTLOADER, 0x0, partition->partition_length );
;;;228          require_noerr( err, exit);
;;;229    
;;;230          SerialDownload( partition->partition_owner, partition->partition_start_addr, partition->partition_length );
;;;231        }
;;;232        
;;;233        /***************** Command "1" or "FWUPDATE": Update the MICO application  *************************/
;;;234        else if(strcmp(cmdname, "FWUPDATE") == 0 || strcmp(cmdname, "1") == 0)	{
;;;235          partition = MicoFlashGetInfo( MICO_PARTITION_APPLICATION );
;;;236          if (findCommandPara(cmdbuf, "r", NULL, 0) != -1){
;;;237            printf ("\n\rRead application...\n\r");
;;;238            SerialUpload( partition->partition_owner, partition->partition_start_addr, "ApplicationImage.bin", partition->partition_length );
;;;239            continue;
;;;240          }
;;;241          printf ("\n\rUpdating application...\n\r");
;;;242          err = MicoFlashDisableSecurity( MICO_PARTITION_APPLICATION, 0x0, partition->partition_length );
;;;243          require_noerr( err, exit);
;;;244          SerialDownload( partition->partition_owner, partition->partition_start_addr, partition->partition_length ); 							   	
;;;245        }
;;;246        
;;;247        /***************** Command "2" or "DRIVERUPDATE": Update the RF driver  *************************/
;;;248        else if(strcmp(cmdname, "DRIVERUPDATE") == 0 || strcmp(cmdname, "2") == 0) {
;;;249          partition = MicoFlashGetInfo( MICO_PARTITION_RF_FIRMWARE );
;;;250          if( partition == NULL ){
;;;251            printf ("\n\rNo flash memory for RF firmware, exiting...\n\r");
;;;252            continue;
;;;253          }
;;;254          
;;;255          if (findCommandPara(cmdbuf, "r", NULL, 0) != -1){
;;;256            printf ("\n\rRead RF firmware...\n\r");
;;;257            SerialUpload( partition->partition_owner, partition->partition_start_addr, "DriverImage.bin", partition->partition_length );
;;;258            continue;
;;;259          }
;;;260          printf ("\n\rUpdating RF driver...\n\r");
;;;261          err = MicoFlashDisableSecurity( MICO_PARTITION_RF_FIRMWARE, 0x0, partition->partition_length );
;;;262          require_noerr( err, exit);
;;;263          SerialDownload( partition->partition_owner, partition->partition_start_addr, partition->partition_length );    
;;;264        }
;;;265        
;;;266        /***************** Command "3" or "PARAUPDATE": Update the application  *************************/
;;;267        else if(strcmp(cmdname, "PARAUPDATE") == 0 || strcmp(cmdname, "3") == 0)  {
;;;268          partition = MicoFlashGetInfo( MICO_PARTITION_PARAMETER_1 );
;;;269    
;;;270          if (findCommandPara(cmdbuf, "e", NULL, 0) != -1){
;;;271            printf ("\n\rErasing settings...\n\r");
;;;272    
;;;273            err = MicoFlashDisableSecurity( MICO_PARTITION_PARAMETER_1, 0x0, partition->partition_length );
;;;274            require_noerr( err, exit);
;;;275            MicoFlashErase( MICO_PARTITION_PARAMETER_1, 0x0, partition->partition_length );
;;;276            continue;
;;;277          }
;;;278          if (findCommandPara(cmdbuf, "r", NULL, 0) != -1){
;;;279            printf ("\n\rRead settings...\n\r");
;;;280            SerialUpload( partition->partition_owner, partition->partition_start_addr, "DriverImage.bin", partition->partition_length );
;;;281            continue;
;;;282          }
;;;283          printf ("\n\rUpdating settings...\n\r");
;;;284          err = MicoFlashDisableSecurity( MICO_PARTITION_PARAMETER_1, 0x0, partition->partition_length );
;;;285          require_noerr( err, exit);
;;;286          SerialDownload( partition->partition_owner, partition->partition_start_addr, partition->partition_length );                        
;;;287        }
;;;288        
;;;289        /***************** Command "4" or "FLASHUPDATE": : Update the Flash  *************************/
;;;290        else if(strcmp(cmdname, "FLASHUPDATE") == 0 || strcmp(cmdname, "4") == 0) {
;;;291          if (findCommandPara(cmdbuf, "dev", flash_dev_str, 1) == -1  ){
;;;292            printf ("\n\rUnkown target type! Exiting...\n\r");
;;;293            continue;
;;;294          }
;;;295          
;;;296          if(Str2Int((uint8_t *)flash_dev_str, (int32_t *)&flash_dev)==0){ 
;;;297            printf ("\n\rDevice Number Err! Exiting...\n\r");
;;;298            continue;
;;;299          }
;;;300          if( flash_dev >= MICO_FLASH_MAX ){
;;;301            printf ("\n\rDevice Err! Exiting...\n\r");
;;;302            continue;
;;;303          }
;;;304          
;;;305          inputFlashArea = false;
;;;306          
;;;307          if (findCommandPara(cmdbuf, "start", startAddressStr, 10) != -1){
;;;308            if(Str2Int((uint8_t *)startAddressStr, &startAddress)==0){ //Found Flash start address
;;;309              printf ("\n\rIllegal start address.\n\r");
;;;310              continue;
;;;311            }else{
;;;312              if (findCommandPara(cmdbuf, "end", endAddressStr, 10) != -1){ //Found Flash end address
;;;313                if(Str2Int((uint8_t *)endAddressStr, &endAddress)==0){
;;;314                  printf ("\n\rIllegal end address.\n\r");
;;;315                  continue;
;;;316                }else{
;;;317                  inputFlashArea = true;
;;;318                }
;;;319              }else{
;;;320                printf ("\n\rFlash end address not found.\n\r");
;;;321                continue;
;;;322              }
;;;323            }
;;;324          }
;;;325          
;;;326          if(endAddress<startAddress && inputFlashArea == true) {
;;;327            printf ("\n\rIllegal address.\n\r");
;;;328            continue;
;;;329          }
;;;330          
;;;331          if(inputFlashArea != true){
;;;332            startAddress = platform_flash_peripherals[ flash_dev ].flash_start_addr ;
000010  4ef8              LDR      r6,|L1.1012|
000012  9721              STR      r7,[sp,#0x84]         ;194
000014  9722              STR      r7,[sp,#0x88]         ;194
000016  9723              STR      r7,[sp,#0x8c]         ;194
000018  ad01              ADD      r5,sp,#4              ;194
00001a  f10d0884          ADD      r8,sp,#0x84           ;194
00001e  9724              STR      r7,[sp,#0x90]
                  |L1.32|
000020  a0f5              ADR      r0,|L1.1016|
000022  f7fffffe          BL       __2printf
000026  2180              MOVS     r1,#0x80              ;205
000028  a801              ADD      r0,sp,#4              ;205
00002a  f7fffffe          BL       getline
00002e  2400              MOVS     r4,#0                 ;207
000030  e000              B        |L1.52|
                  |L1.50|
000032  1c64              ADDS     r4,r4,#1              ;207
                  |L1.52|
000034  5d28              LDRB     r0,[r5,r4]            ;207
000036  2820              CMP      r0,#0x20              ;207
000038  d0fb              BEQ      |L1.50|
00003a  e003              B        |L1.68|
                  |L1.60|
00003c  f7fffffe          BL       toupper
000040  5528              STRB     r0,[r5,r4]            ;209
000042  1c64              ADDS     r4,r4,#1              ;209
                  |L1.68|
000044  5d28              LDRB     r0,[r5,r4]            ;208
000046  2800              CMP      r0,#0                 ;208
000048  d1f8              BNE      |L1.60|
00004a  e000              B        |L1.78|
                  |L1.76|
00004c  1c40              ADDS     r0,r0,#1              ;208
                  |L1.78|
00004e  5c29              LDRB     r1,[r5,r0]            ;212
000050  2920              CMP      r1,#0x20              ;212
000052  d0fb              BEQ      |L1.76|
000054  2100              MOVS     r1,#0                 ;213
000056  4643              MOV      r3,r8                 ;194
000058  e005              B        |L1.102|
                  |L1.90|
00005a  1c40              ADDS     r0,r0,#1              ;214
00005c  545a              STRB     r2,[r3,r1]            ;214
00005e  5c2a              LDRB     r2,[r5,r0]            ;213
000060  1c49              ADDS     r1,r1,#1              ;213
000062  2a20              CMP      r2,#0x20              ;213
000064  d002              BEQ      |L1.108|
                  |L1.102|
000066  5c2a              LDRB     r2,[r5,r0]            ;213
000068  2a00              CMP      r2,#0                 ;213
00006a  d1f6              BNE      |L1.90|
                  |L1.108|
00006c  f8087001          STRB     r7,[r8,r1]            ;216
000070  a1e4              ADR      r1,|L1.1028|
000072  a821              ADD      r0,sp,#0x84           ;219
000074  f7fffffe          BL       strcmp
000078  2800              CMP      r0,#0                 ;219
00007a  d074              BEQ      |L1.358|
00007c  a1e4              ADR      r1,|L1.1040|
00007e  a821              ADD      r0,sp,#0x84           ;219
000080  f7fffffe          BL       strcmp
000084  2800              CMP      r0,#0                 ;219
000086  d06e              BEQ      |L1.358|
000088  a1e2              ADR      r1,|L1.1044|
00008a  a821              ADD      r0,sp,#0x84           ;234
00008c  f7fffffe          BL       strcmp
000090  2800              CMP      r0,#0                 ;234
                  |L1.146|
000092  d067              BEQ      |L1.356|
000094  a1e2              ADR      r1,|L1.1056|
000096  a821              ADD      r0,sp,#0x84           ;234
000098  f7fffffe          BL       strcmp
00009c  2800              CMP      r0,#0                 ;234
00009e  d0f8              BEQ      |L1.146|
0000a0  a1e0              ADR      r1,|L1.1060|
0000a2  a821              ADD      r0,sp,#0x84           ;248
0000a4  f7fffffe          BL       strcmp
0000a8  2800              CMP      r0,#0                 ;248
                  |L1.170|
0000aa  d070              BEQ      |L1.398|
0000ac  a1e1              ADR      r1,|L1.1076|
0000ae  a821              ADD      r0,sp,#0x84           ;248
0000b0  f7fffffe          BL       strcmp
0000b4  2800              CMP      r0,#0                 ;248
0000b6  d0f8              BEQ      |L1.170|
0000b8  a1df              ADR      r1,|L1.1080|
0000ba  a821              ADD      r0,sp,#0x84           ;267
0000bc  f7fffffe          BL       strcmp
0000c0  2800              CMP      r0,#0                 ;267
                  |L1.194|
0000c2  d070              BEQ      |L1.422|
0000c4  a1df              ADR      r1,|L1.1092|
0000c6  a821              ADD      r0,sp,#0x84           ;267
0000c8  f7fffffe          BL       strcmp
0000cc  2800              CMP      r0,#0                 ;267
0000ce  d0f8              BEQ      |L1.194|
0000d0  a1dd              ADR      r1,|L1.1096|
0000d2  a821              ADD      r0,sp,#0x84           ;290
0000d4  f7fffffe          BL       strcmp
0000d8  2800              CMP      r0,#0                 ;290
                  |L1.218|
0000da  d078              BEQ      |L1.462|
0000dc  a1dd              ADR      r1,|L1.1108|
0000de  a821              ADD      r0,sp,#0x84           ;290
0000e0  f7fffffe          BL       strcmp
0000e4  2800              CMP      r0,#0                 ;290
0000e6  d0f8              BEQ      |L1.218|
;;;333            endAddress = platform_flash_peripherals[ flash_dev ].flash_start_addr 
;;;334              + platform_flash_peripherals[ flash_dev ].flash_length - 1;
;;;335          }
;;;336          
;;;337          if (findCommandPara(cmdbuf, "e", NULL, 0) != -1){
;;;338            printf ("\n\rErasing dev%d content From 0x%x to 0x%x\n\r", flash_dev, startAddress, endAddress);
;;;339            platform_flash_init( &platform_flash_peripherals[ flash_dev ] );
;;;340            platform_flash_disable_protect( &platform_flash_peripherals[ flash_dev ], startAddress, endAddress );
;;;341            platform_flash_erase( &platform_flash_peripherals[ flash_dev ], startAddress, endAddress );
;;;342            continue;
;;;343          }
;;;344          
;;;345          if (findCommandPara(cmdbuf, "r", NULL, 0) != -1){
;;;346            printf ("\n\rRead dev%d content From 0x%x to 0x%x\n\r", flash_dev, startAddress, endAddress);
;;;347            SerialUpload(flash_dev, startAddress, "FlashImage.bin", endAddress-startAddress+1);
;;;348            continue;
;;;349          }
;;;350          
;;;351          printf ("\n\rUpdating dev%d content From 0x%x to 0x%x\n\r", flash_dev, startAddress, endAddress);
;;;352          platform_flash_disable_protect( &platform_flash_peripherals[ flash_dev ], startAddress, endAddress );
;;;353          SerialDownload(flash_dev, startAddress, endAddress-startAddress+1);                           
;;;354        }
;;;355        
;;;356        
;;;357        /***************** Command: MEMORYMAP *************************/
;;;358        else if(strcmp(cmdname, "MEMORYMAP") == 0 || strcmp(cmdname, "5") == 0)  {
0000e8  a1db              ADR      r1,|L1.1112|
0000ea  a821              ADD      r0,sp,#0x84
0000ec  f7fffffe          BL       strcmp
0000f0  2800              CMP      r0,#0
                  |L1.242|
0000f2  d06d              BEQ      |L1.464|
0000f4  a1db              ADR      r1,|L1.1124|
0000f6  a821              ADD      r0,sp,#0x84
0000f8  f7fffffe          BL       strcmp
0000fc  2800              CMP      r0,#0
0000fe  d0f8              BEQ      |L1.242|
;;;359          printf("\r");
;;;360          for( i = 0; i <= MICO_PARTITION_PARAMETER_2; i++ ){
;;;361            partition = MicoFlashGetInfo( (mico_partition_t)i );
;;;362            if (partition->partition_owner == MICO_FLASH_NONE)
;;;363                continue;
;;;364            printf( "| %11s |  Dev:%d  | 0x%08x | 0x%08x |\r\n", partition->partition_description, partition->partition_owner, 
;;;365                   partition->partition_start_addr, partition->partition_length);
;;;366          }
;;;367        }
;;;368        /***************** Command: Excute the application *************************/
;;;369        else if(strcmp(cmdname, "BOOT") == 0 || strcmp(cmdname, "6") == 0)	{
000100  a1d9              ADR      r1,|L1.1128|
000102  a821              ADD      r0,sp,#0x84
000104  f7fffffe          BL       strcmp
000108  2800              CMP      r0,#0
                  |L1.266|
00010a  d07c              BEQ      |L1.518|
00010c  a1d8              ADR      r1,|L1.1136|
00010e  a821              ADD      r0,sp,#0x84
000110  f7fffffe          BL       strcmp
000114  2800              CMP      r0,#0
000116  d0f8              BEQ      |L1.266|
;;;370          printf ("\n\rBooting.......\n\r");
;;;371          partition = MicoFlashGetInfo( MICO_PARTITION_APPLICATION );
;;;372          bootloader_start_app( partition->partition_start_addr );
;;;373        }
;;;374        
;;;375        /***************** Command: Reboot *************************/
;;;376        else if(strcmp(cmdname, "REBOOT") == 0 || strcmp(cmdname, "7") == 0)  {
000118  a1d6              ADR      r1,|L1.1140|
00011a  a821              ADD      r0,sp,#0x84
00011c  f7fffffe          BL       strcmp
000120  2800              CMP      r0,#0
                  |L1.290|
000122  d071              BEQ      |L1.520|
000124  a1d5              ADR      r1,|L1.1148|
000126  a821              ADD      r0,sp,#0x84
000128  f7fffffe          BL       strcmp
00012c  2800              CMP      r0,#0
00012e  d0f8              BEQ      |L1.290|
;;;377          printf ("\n\rReBooting.......\n\r");
;;;378          MicoSystemReboot();
;;;379          break;                              
;;;380        }
;;;381        
;;;382        else if(strcmp(cmdname, "HELP") == 0 || strcmp(cmdname, "?") == 0)	{
000130  a1d3              ADR      r1,|L1.1152|
000132  a821              ADD      r0,sp,#0x84
000134  f7fffffe          BL       strcmp
000138  2800              CMP      r0,#0
                  |L1.314|
00013a  d06f              BEQ      |L1.540|
00013c  a1d2              ADR      r1,|L1.1160|
00013e  a821              ADD      r0,sp,#0x84
000140  f7fffffe          BL       strcmp
000144  2800              CMP      r0,#0
000146  d0f8              BEQ      |L1.314|
;;;383            printf ( menu, MODEL, Bootloader_REVISION, HARDWARE_REVISION );  /* display command menu        */
;;;384          break;
;;;385        }
;;;386        
;;;387        else if(strcmp(cmdname, "") == 0 )	{                         
000148  a1b4              ADR      r1,|L1.1052|
00014a  a821              ADD      r0,sp,#0x84
00014c  f7fffffe          BL       strcmp
000150  2800              CMP      r0,#0
000152  d003              BEQ      |L1.348|
;;;388          break;
;;;389        }
;;;390        else{
;;;391          printf (ERROR_STR, "UNKNOWN COMMAND");
000154  a1cd              ADR      r1,|L1.1164|
000156  48d1              LDR      r0,|L1.1180|
000158  f7fffffe          BL       printf
                  |L1.348|
;;;392          break;
;;;393        }
;;;394    
;;;395    exit:
;;;396        continue;
;;;397      }
;;;398    }
00015c  b030              ADD      sp,sp,#0xc0
00015e  e8bd81f0          POP      {r4-r8,pc}
000162  e000              B        |L1.358|
                  |L1.356|
000164  e020              B        |L1.424|
                  |L1.358|
000166  2000              MOVS     r0,#0                 ;220
000168  f7fffffe          BL       MicoFlashGetInfo
00016c  4604              MOV      r4,r0                 ;220
00016e  2300              MOVS     r3,#0                 ;221
000170  461a              MOV      r2,r3                 ;221
000172  a1cb              ADR      r1,|L1.1184|
000174  a801              ADD      r0,sp,#4              ;221
000176  f7fffffe          BL       findCommandPara
00017a  1c40              ADDS     r0,r0,#1              ;221
00017c  d008              BEQ      |L1.400|
00017e  a0c9              ADR      r0,|L1.1188|
000180  f7fffffe          BL       __2printf
000184  e9d41302          LDRD     r1,r3,[r4,#8]         ;222
000188  7820              LDRB     r0,[r4,#0]            ;223
00018a  a2cc              ADR      r2,|L1.1212|
00018c  e022              B        |L1.468|
                  |L1.398|
00018e  e02b              B        |L1.488|
                  |L1.400|
000190  a0cf              ADR      r0,|L1.1232|
000192  f7fffffe          BL       __2printf
000196  2100              MOVS     r1,#0                 ;227
000198  4608              MOV      r0,r1                 ;227
00019a  68e2              LDR      r2,[r4,#0xc]          ;228
00019c  e071              B        |L1.642|
                  |L1.414|
00019e  e9d41202          LDRD     r1,r2,[r4,#8]         ;228
0001a2  7820              LDRB     r0,[r4,#0]            ;230
0001a4  e112              B        |L1.972|
                  |L1.422|
0001a6  e03a              B        |L1.542|
                  |L1.424|
0001a8  2001              MOVS     r0,#1                 ;235
0001aa  f7fffffe          BL       MicoFlashGetInfo
0001ae  4604              MOV      r4,r0                 ;235
0001b0  2300              MOVS     r3,#0                 ;236
0001b2  461a              MOV      r2,r3                 ;236
0001b4  a1ba              ADR      r1,|L1.1184|
0001b6  a801              ADD      r0,sp,#4              ;236
0001b8  f7fffffe          BL       findCommandPara
0001bc  1c40              ADDS     r0,r0,#1              ;236
0001be  d00c              BEQ      |L1.474|
0001c0  a0ca              ADR      r0,|L1.1260|
0001c2  f7fffffe          BL       __2printf
0001c6  e9d41302          LDRD     r1,r3,[r4,#8]         ;237
0001ca  7820              LDRB     r0,[r4,#0]            ;238
0001cc  e001              B        |L1.466|
                  |L1.462|
0001ce  e05d              B        |L1.652|
                  |L1.464|
0001d0  e0ff              B        |L1.978|
                  |L1.466|
0001d2  a2cc              ADR      r2,|L1.1284|
                  |L1.468|
0001d4  f7fffffe          BL       SerialUpload
                  |L1.472|
0001d8  e722              B        |L1.32|
                  |L1.474|
0001da  a0d0              ADR      r0,|L1.1308|
0001dc  f7fffffe          BL       __2printf
0001e0  2100              MOVS     r1,#0                 ;242
0001e2  2001              MOVS     r0,#1                 ;242
0001e4  68e2              LDR      r2,[r4,#0xc]          ;243
0001e6  e04c              B        |L1.642|
                  |L1.488|
0001e8  2004              MOVS     r0,#4                 ;249
0001ea  f7fffffe          BL       MicoFlashGetInfo
0001ee  0004              MOVS     r4,r0                 ;249
0001f0  d00b              BEQ      |L1.522|
0001f2  2300              MOVS     r3,#0                 ;255
0001f4  461a              MOV      r2,r3                 ;255
0001f6  a1aa              ADR      r1,|L1.1184|
0001f8  a801              ADD      r0,sp,#4              ;255
0001fa  f7fffffe          BL       findCommandPara
0001fe  1c40              ADDS     r0,r0,#1              ;255
000200  d005              BEQ      |L1.526|
000202  a0cd              ADR      r0,|L1.1336|
000204  e030              B        |L1.616|
                  |L1.518|
000206  e2c1              B        |L1.1932|
                  |L1.520|
000208  e2ca              B        |L1.1952|
                  |L1.522|
00020a  a0d1              ADR      r0,|L1.1360|
00020c  e052              B        |L1.692|
                  |L1.526|
00020e  a0dc              ADR      r0,|L1.1408|
000210  f7fffffe          BL       __2printf
000214  2100              MOVS     r1,#0                 ;261
000216  2004              MOVS     r0,#4                 ;261
000218  68e2              LDR      r2,[r4,#0xc]          ;262
00021a  e032              B        |L1.642|
                  |L1.540|
00021c  e2c6              B        |L1.1964|
                  |L1.542|
00021e  2005              MOVS     r0,#5                 ;268
000220  f7fffffe          BL       MicoFlashGetInfo
000224  4604              MOV      r4,r0                 ;268
000226  2300              MOVS     r3,#0                 ;270
000228  461a              MOV      r2,r3                 ;270
00022a  a1dc              ADR      r1,|L1.1436|
00022c  a801              ADD      r0,sp,#4              ;270
00022e  f7fffffe          BL       findCommandPara
000232  1c40              ADDS     r0,r0,#1              ;270
000234  d00f              BEQ      |L1.598|
000236  a0da              ADR      r0,|L1.1440|
000238  f7fffffe          BL       __2printf
00023c  2100              MOVS     r1,#0                 ;273
00023e  2005              MOVS     r0,#5                 ;273
000240  68e2              LDR      r2,[r4,#0xc]          ;273
000242  f7fffffe          BL       MicoFlashDisableSecurity
000246  2800              CMP      r0,#0                 ;274
000248  d1c6              BNE      |L1.472|
00024a  2100              MOVS     r1,#0                 ;275
00024c  2005              MOVS     r0,#5                 ;275
00024e  68e2              LDR      r2,[r4,#0xc]          ;275
000250  f7fffffe          BL       MicoFlashErase
000254  e6e4              B        |L1.32|
                  |L1.598|
000256  2300              MOVS     r3,#0                 ;278
000258  461a              MOV      r2,r3                 ;278
00025a  a191              ADR      r1,|L1.1184|
00025c  a801              ADD      r0,sp,#4              ;278
00025e  f7fffffe          BL       findCommandPara
000262  1c40              ADDS     r0,r0,#1              ;278
000264  d007              BEQ      |L1.630|
000266  a0d4              ADR      r0,|L1.1464|
                  |L1.616|
000268  f7fffffe          BL       __2printf
00026c  e9d41302          LDRD     r1,r3,[r4,#8]         ;279
000270  7820              LDRB     r0,[r4,#0]            ;280
000272  a2d7              ADR      r2,|L1.1488|
000274  e7ae              B        |L1.468|
                  |L1.630|
000276  a0da              ADR      r0,|L1.1504|
000278  f7fffffe          BL       __2printf
00027c  2100              MOVS     r1,#0                 ;284
00027e  2005              MOVS     r0,#5                 ;284
000280  68e2              LDR      r2,[r4,#0xc]          ;284
                  |L1.642|
000282  f7fffffe          BL       MicoFlashDisableSecurity
000286  2800              CMP      r0,#0                 ;284
000288  d1a6              BNE      |L1.472|
00028a  e788              B        |L1.414|
                  |L1.652|
00028c  2301              MOVS     r3,#1                 ;291
00028e  aa2e              ADD      r2,sp,#0xb8           ;291
000290  a1da              ADR      r1,|L1.1532|
000292  a801              ADD      r0,sp,#4              ;291
000294  f7fffffe          BL       findCommandPara
000298  1c40              ADDS     r0,r0,#1              ;291
00029a  d00a              BEQ      |L1.690|
00029c  a925              ADD      r1,sp,#0x94           ;296
00029e  a82e              ADD      r0,sp,#0xb8           ;296
0002a0  f7fffffe          BL       Str2Int
0002a4  b148              CBZ      r0,|L1.698|
0002a6  f89d0094          LDRB     r0,[sp,#0x94]         ;300
0002aa  2802              CMP      r0,#2                 ;300
0002ac  d307              BCC      |L1.702|
0002ae  a0d4              ADR      r0,|L1.1536|
0002b0  e000              B        |L1.692|
                  |L1.690|
0002b2  a0da              ADR      r0,|L1.1564|
                  |L1.692|
0002b4  f7fffffe          BL       __2printf
0002b8  e6b2              B        |L1.32|
                  |L1.698|
0002ba  a0e1              ADR      r0,|L1.1600|
0002bc  e7fa              B        |L1.692|
                  |L1.702|
0002be  2400              MOVS     r4,#0                 ;305
0002c0  230a              MOVS     r3,#0xa               ;307
0002c2  aa28              ADD      r2,sp,#0xa0           ;307
0002c4  a1e7              ADR      r1,|L1.1636|
0002c6  a801              ADD      r0,sp,#4              ;307
0002c8  f7fffffe          BL       findCommandPara
0002cc  1c40              ADDS     r0,r0,#1              ;307
0002ce  d012              BEQ      |L1.758|
0002d0  a926              ADD      r1,sp,#0x98           ;308
0002d2  a828              ADD      r0,sp,#0xa0           ;308
0002d4  f7fffffe          BL       Str2Int
0002d8  b1a0              CBZ      r0,|L1.772|
0002da  230a              MOVS     r3,#0xa               ;312
0002dc  aa2b              ADD      r2,sp,#0xac           ;312
0002de  a1e3              ADR      r1,|L1.1644|
0002e0  a801              ADD      r0,sp,#4              ;312
0002e2  f7fffffe          BL       findCommandPara
0002e6  1c40              ADDS     r0,r0,#1              ;312
0002e8  d010              BEQ      |L1.780|
0002ea  a927              ADD      r1,sp,#0x9c           ;313
0002ec  a82b              ADD      r0,sp,#0xac           ;313
0002ee  f7fffffe          BL       Str2Int
0002f2  b148              CBZ      r0,|L1.776|
0002f4  2401              MOVS     r4,#1                 ;317
                  |L1.758|
0002f6  e9dd0126          LDRD     r0,r1,[sp,#0x98]      ;317
0002fa  4281              CMP      r1,r0                 ;326
0002fc  da08              BGE      |L1.784|
0002fe  b144              CBZ      r4,|L1.786|
000300  a0db              ADR      r0,|L1.1648|
000302  e7d7              B        |L1.692|
                  |L1.772|
000304  a0e0              ADR      r0,|L1.1672|
000306  e7d5              B        |L1.692|
                  |L1.776|
000308  a0e6              ADR      r0,|L1.1700|
00030a  e7d3              B        |L1.692|
                  |L1.780|
00030c  a0ec              ADR      r0,|L1.1728|
00030e  e7d1              B        |L1.692|
                  |L1.784|
000310  b974              CBNZ     r4,|L1.816|
                  |L1.786|
000312  f89d0094          LDRB     r0,[sp,#0x94]         ;332
000316  eb061000          ADD      r0,r6,r0,LSL #4       ;332
00031a  6840              LDR      r0,[r0,#4]            ;332
00031c  9026              STR      r0,[sp,#0x98]         ;333
00031e  f89d0094          LDRB     r0,[sp,#0x94]         ;333
000322  eb061000          ADD      r0,r6,r0,LSL #4       ;333
000326  e9d01001          LDRD     r1,r0,[r0,#4]         ;333
00032a  4408              ADD      r0,r0,r1              ;333
00032c  1e40              SUBS     r0,r0,#1              ;333
00032e  9027              STR      r0,[sp,#0x9c]         ;333
                  |L1.816|
000330  2300              MOVS     r3,#0                 ;337
000332  461a              MOV      r2,r3                 ;337
000334  a199              ADR      r1,|L1.1436|
000336  a801              ADD      r0,sp,#4              ;337
000338  f7fffffe          BL       findCommandPara
00033c  1c40              ADDS     r0,r0,#1              ;337
00033e  d01d              BEQ      |L1.892|
000340  e9dd2326          LDRD     r2,r3,[sp,#0x98]      ;337
000344  f89d1094          LDRB     r1,[sp,#0x94]         ;338
000348  a0e6              ADR      r0,|L1.1764|
00034a  f7fffffe          BL       __2printf
00034e  f89d0094          LDRB     r0,[sp,#0x94]         ;339
000352  eb061000          ADD      r0,r6,r0,LSL #4       ;339
000356  f7fffffe          BL       platform_flash_init
00035a  f89d0094          LDRB     r0,[sp,#0x94]         ;340
00035e  e9dd1226          LDRD     r1,r2,[sp,#0x98]      ;340
000362  eb061000          ADD      r0,r6,r0,LSL #4       ;340
000366  f7fffffe          BL       platform_flash_disable_protect
00036a  f89d0094          LDRB     r0,[sp,#0x94]         ;341
00036e  e9dd1226          LDRD     r1,r2,[sp,#0x98]      ;341
000372  eb061000          ADD      r0,r6,r0,LSL #4       ;341
000376  f7fffffe          BL       platform_flash_erase
00037a  e651              B        |L1.32|
                  |L1.892|
00037c  2300              MOVS     r3,#0                 ;345
00037e  461a              MOV      r2,r3                 ;345
000380  a147              ADR      r1,|L1.1184|
000382  a801              ADD      r0,sp,#4              ;345
000384  f7fffffe          BL       findCommandPara
000388  e9dd2326          LDRD     r2,r3,[sp,#0x98]      ;345
00038c  f89d1094          LDRB     r1,[sp,#0x94]         ;351
000390  1c40              ADDS     r0,r0,#1              ;345
000392  d00a              BEQ      |L1.938|
000394  a0de              ADR      r0,|L1.1808|
000396  f7fffffe          BL       __2printf
00039a  e9dd1026          LDRD     r1,r0,[sp,#0x98]      ;346
00039e  1a43              SUBS     r3,r0,r1              ;347
0003a0  a2e6              ADR      r2,|L1.1852|
0003a2  f89d0094          LDRB     r0,[sp,#0x94]         ;347
0003a6  1c5b              ADDS     r3,r3,#1              ;347
0003a8  e714              B        |L1.468|
                  |L1.938|
0003aa  a0e8              ADR      r0,|L1.1868|
0003ac  f7fffffe          BL       __2printf
0003b0  f89d0094          LDRB     r0,[sp,#0x94]         ;352
0003b4  e9dd1226          LDRD     r1,r2,[sp,#0x98]      ;352
0003b8  eb061000          ADD      r0,r6,r0,LSL #4       ;352
0003bc  f7fffffe          BL       platform_flash_disable_protect
0003c0  e9dd1026          LDRD     r1,r0,[sp,#0x98]      ;352
0003c4  1a42              SUBS     r2,r0,r1              ;353
0003c6  f89d0094          LDRB     r0,[sp,#0x94]         ;353
0003ca  1c52              ADDS     r2,r2,#1              ;353
                  |L1.972|
0003cc  f7fffffe          BL       SerialDownload
0003d0  e626              B        |L1.32|
                  |L1.978|
0003d2  a071              ADR      r0,|L1.1432|
0003d4  f7fffffe          BL       __2printf
0003d8  2400              MOVS     r4,#0                 ;360
                  |L1.986|
0003da  b260              SXTB     r0,r4                 ;361
0003dc  f7fffffe          BL       MicoFlashGetInfo
0003e0  7802              LDRB     r2,[r0,#0]            ;362
0003e2  2a03              CMP      r2,#3                 ;362
0003e4  d004              BEQ      |L1.1008|
0003e6  68c1              LDR      r1,[r0,#0xc]          ;364
0003e8  9100              STR      r1,[sp,#0]            ;364
0003ea  e9d01301          LDRD     r1,r3,[r0,#4]         ;364
0003ee  e1c5              B        |L1.1916|
                  |L1.1008|
0003f0  e1c7              B        |L1.1922|
0003f2  0000              DCW      0x0000
                  |L1.1012|
                          DCD      platform_flash_peripherals
                  |L1.1016|
0003f8  0a0d4d58          DCB      "\n\rMXCHIP> ",0
0003fc  43484950
000400  3e2000  
000403  00                DCB      0
                  |L1.1028|
000404  424f4f54          DCB      "BOOTUPDATE",0
000408  55504441
00040c  544500  
00040f  00                DCB      0
                  |L1.1040|
000410  3000              DCB      "0",0
000412  00                DCB      0
000413  00                DCB      0
                  |L1.1044|
000414  46575550          DCB      "FWUPDATE"
000418  44415445
                  |L1.1052|
00041c  00                DCB      0
00041d  00                DCB      0
00041e  00                DCB      0
00041f  00                DCB      0
                  |L1.1056|
000420  3100              DCB      "1",0
000422  00                DCB      0
000423  00                DCB      0
                  |L1.1060|
000424  44524956          DCB      "DRIVERUPDATE",0
000428  45525550
00042c  44415445
000430  00      
000431  00                DCB      0
000432  00                DCB      0
000433  00                DCB      0
                  |L1.1076|
000434  3200              DCB      "2",0
000436  00                DCB      0
000437  00                DCB      0
                  |L1.1080|
000438  50415241          DCB      "PARAUPDATE",0
00043c  55504441
000440  544500  
000443  00                DCB      0
                  |L1.1092|
000444  3300              DCB      "3",0
000446  00                DCB      0
000447  00                DCB      0
                  |L1.1096|
000448  464c4153          DCB      "FLASHUPDATE",0
00044c  48555044
000450  41544500
                  |L1.1108|
000454  3400              DCB      "4",0
000456  00                DCB      0
000457  00                DCB      0
                  |L1.1112|
000458  4d454d4f          DCB      "MEMORYMAP",0
00045c  52594d41
000460  5000    
000462  00                DCB      0
000463  00                DCB      0
                  |L1.1124|
000464  3500              DCB      "5",0
000466  00                DCB      0
000467  00                DCB      0
                  |L1.1128|
000468  424f4f54          DCB      "BOOT",0
00046c  00      
00046d  00                DCB      0
00046e  00                DCB      0
00046f  00                DCB      0
                  |L1.1136|
000470  3600              DCB      "6",0
000472  00                DCB      0
000473  00                DCB      0
                  |L1.1140|
000474  5245424f          DCB      "REBOOT",0
000478  4f5400  
00047b  00                DCB      0
                  |L1.1148|
00047c  3700              DCB      "7",0
00047e  00                DCB      0
00047f  00                DCB      0
                  |L1.1152|
000480  48454c50          DCB      "HELP",0
000484  00      
000485  00                DCB      0
000486  00                DCB      0
000487  00                DCB      0
                  |L1.1160|
000488  3f00              DCB      "?",0
00048a  00                DCB      0
00048b  00                DCB      0
                  |L1.1164|
00048c  554e4b4e          DCB      "UNKNOWN COMMAND",0
000490  4f574e20
000494  434f4d4d
000498  414e4400
                  |L1.1180|
                          DCD      ||.data||
                  |L1.1184|
0004a0  7200              DCB      "r",0
0004a2  00                DCB      0
0004a3  00                DCB      0
                  |L1.1188|
0004a4  0a0d5265          DCB      "\n\rRead Bootloader...\n\r",0
0004a8  61642042
0004ac  6f6f746c
0004b0  6f616465
0004b4  722e2e2e
0004b8  0a0d00  
0004bb  00                DCB      0
                  |L1.1212|
0004bc  426f6f74          DCB      "BootLoaderImage.bin",0
0004c0  4c6f6164
0004c4  6572496d
0004c8  6167652e
0004cc  62696e00
                  |L1.1232|
0004d0  0a0d5570          DCB      "\n\rUpdating Bootloader...\n\r",0
0004d4  64617469
0004d8  6e672042
0004dc  6f6f746c
0004e0  6f616465
0004e4  722e2e2e
0004e8  0a0d00  
0004eb  00                DCB      0
                  |L1.1260|
0004ec  0a0d5265          DCB      "\n\rRead application...\n\r",0
0004f0  61642061
0004f4  70706c69
0004f8  63617469
0004fc  6f6e2e2e
000500  2e0a0d00
                  |L1.1284|
000504  4170706c          DCB      "ApplicationImage.bin",0
000508  69636174
00050c  696f6e49
000510  6d616765
000514  2e62696e
000518  00      
000519  00                DCB      0
00051a  00                DCB      0
00051b  00                DCB      0
                  |L1.1308|
00051c  0a0d5570          DCB      "\n\rUpdating application...\n\r",0
000520  64617469
000524  6e672061
000528  70706c69
00052c  63617469
000530  6f6e2e2e
000534  2e0a0d00
                  |L1.1336|
000538  0a0d5265          DCB      "\n\rRead RF firmware...\n\r",0
00053c  61642052
000540  46206669
000544  726d7761
000548  72652e2e
00054c  2e0a0d00
                  |L1.1360|
000550  0a0d4e6f          DCB      "\n\rNo flash memory for RF firmware, exiting...\n\r",0
000554  20666c61
000558  7368206d
00055c  656d6f72
000560  7920666f
000564  72205246
000568  20666972
00056c  6d776172
000570  652c2065
000574  78697469
000578  6e672e2e
00057c  2e0a0d00
                  |L1.1408|
000580  0a0d5570          DCB      "\n\rUpdating RF driver...\n"
000584  64617469
000588  6e672052
00058c  46206472
000590  69766572
000594  2e2e2e0a
                  |L1.1432|
000598  0d00              DCB      "\r",0
00059a  00                DCB      0
00059b  00                DCB      0
                  |L1.1436|
00059c  6500              DCB      "e",0
00059e  00                DCB      0
00059f  00                DCB      0
                  |L1.1440|
0005a0  0a0d4572          DCB      "\n\rErasing settings...\n\r",0
0005a4  6173696e
0005a8  67207365
0005ac  7474696e
0005b0  67732e2e
0005b4  2e0a0d00
                  |L1.1464|
0005b8  0a0d5265          DCB      "\n\rRead settings...\n\r",0
0005bc  61642073
0005c0  65747469
0005c4  6e67732e
0005c8  2e2e0a0d
0005cc  00      
0005cd  00                DCB      0
0005ce  00                DCB      0
0005cf  00                DCB      0
                  |L1.1488|
0005d0  44726976          DCB      "DriverImage.bin",0
0005d4  6572496d
0005d8  6167652e
0005dc  62696e00
                  |L1.1504|
0005e0  0a0d5570          DCB      "\n\rUpdating settings...\n\r",0
0005e4  64617469
0005e8  6e672073
0005ec  65747469
0005f0  6e67732e
0005f4  2e2e0a0d
0005f8  00      
0005f9  00                DCB      0
0005fa  00                DCB      0
0005fb  00                DCB      0
                  |L1.1532|
0005fc  64657600          DCB      "dev",0
                  |L1.1536|
000600  0a0d4465          DCB      "\n\rDevice Err! Exiting...\n\r",0
000604  76696365
000608  20457272
00060c  21204578
000610  6974696e
000614  672e2e2e
000618  0a0d00  
00061b  00                DCB      0
                  |L1.1564|
00061c  0a0d556e          DCB      "\n\rUnkown target type! Exiting...\n\r",0
000620  6b6f776e
000624  20746172
000628  67657420
00062c  74797065
000630  21204578
000634  6974696e
000638  672e2e2e
00063c  0a0d00  
00063f  00                DCB      0
                  |L1.1600|
000640  0a0d4465          DCB      "\n\rDevice Number Err! Exiting...\n\r",0
000644  76696365
000648  204e756d
00064c  62657220
000650  45727221
000654  20457869
000658  74696e67
00065c  2e2e2e0a
000660  0d00    
000662  00                DCB      0
000663  00                DCB      0
                  |L1.1636|
000664  73746172          DCB      "start",0
000668  7400    
00066a  00                DCB      0
00066b  00                DCB      0
                  |L1.1644|
00066c  656e6400          DCB      "end",0
                  |L1.1648|
000670  0a0d496c          DCB      "\n\rIllegal address.\n\r",0
000674  6c656761
000678  6c206164
00067c  64726573
000680  732e0a0d
000684  00      
000685  00                DCB      0
000686  00                DCB      0
000687  00                DCB      0
                  |L1.1672|
000688  0a0d496c          DCB      "\n\rIllegal start address.\n\r",0
00068c  6c656761
000690  6c207374
000694  61727420
000698  61646472
00069c  6573732e
0006a0  0a0d00  
0006a3  00                DCB      0
                  |L1.1700|
0006a4  0a0d496c          DCB      "\n\rIllegal end address.\n\r",0
0006a8  6c656761
0006ac  6c20656e
0006b0  64206164
0006b4  64726573
0006b8  732e0a0d
0006bc  00      
0006bd  00                DCB      0
0006be  00                DCB      0
0006bf  00                DCB      0
                  |L1.1728|
0006c0  0a0d466c          DCB      "\n\rFlash end address not found.\n\r",0
0006c4  61736820
0006c8  656e6420
0006cc  61646472
0006d0  65737320
0006d4  6e6f7420
0006d8  666f756e
0006dc  642e0a0d
0006e0  00      
0006e1  00                DCB      0
0006e2  00                DCB      0
0006e3  00                DCB      0
                  |L1.1764|
0006e4  0a0d4572          DCB      "\n\rErasing dev%d content From 0x%x to 0x%x\n\r",0
0006e8  6173696e
0006ec  67206465
0006f0  76256420
0006f4  636f6e74
0006f8  656e7420
0006fc  46726f6d
000700  20307825
000704  7820746f
000708  20307825
00070c  780a0d00
                  |L1.1808|
000710  0a0d5265          DCB      "\n\rRead dev%d content From 0x%x to 0x%x\n\r",0
000714  61642064
000718  65762564
00071c  20636f6e
000720  74656e74
000724  2046726f
000728  6d203078
00072c  25782074
000730  6f203078
000734  25780a0d
000738  00      
000739  00                DCB      0
00073a  00                DCB      0
00073b  00                DCB      0
                  |L1.1852|
00073c  466c6173          DCB      "FlashImage.bin",0
000740  68496d61
000744  67652e62
000748  696e00  
00074b  00                DCB      0
                  |L1.1868|
00074c  0a0d5570          DCB      "\n\rUpdating dev%d content From 0x%x to 0x%x\n\r",0
000750  64617469
000754  6e672064
000758  65762564
00075c  20636f6e
000760  74656e74
000764  2046726f
000768  6d203078
00076c  25782074
000770  6f203078
000774  25780a0d
000778  00      
000779  00                DCB      0
00077a  00                DCB      0
00077b  00                DCB      0
                  |L1.1916|
00077c  a00f              ADR      r0,|L1.1980|
00077e  f7fffffe          BL       __2printf
                  |L1.1922|
000782  1c64              ADDS     r4,r4,#1              ;364
000784  2c06              CMP      r4,#6                 ;360
000786  f77fae28          BLE      |L1.986|
00078a  e449              B        |L1.32|
                  |L1.1932|
00078c  a015              ADR      r0,|L1.2020|
00078e  f7fffffe          BL       __2printf
000792  2001              MOVS     r0,#1                 ;371
000794  f7fffffe          BL       MicoFlashGetInfo
000798  6880              LDR      r0,[r0,#8]            ;372
00079a  f7fffffe          BL       bootloader_start_app
00079e  e43f              B        |L1.32|
                  |L1.1952|
0007a0  a015              ADR      r0,|L1.2040|
0007a2  f7fffffe          BL       __2printf
0007a6  f7fffffe          BL       MicoSystemReboot
0007aa  e4d7              B        |L1.348|
                  |L1.1964|
0007ac  a318              ADR      r3,|L1.2064|
0007ae  a21b              ADR      r2,|L1.2076|
0007b0  a117              ADR      r1,|L1.2064|
0007b2  481c              LDR      r0,|L1.2084|
0007b4  f7fffffe          BL       printf
0007b8  e4d0              B        |L1.348|
                          ENDP

0007ba  0000              DCW      0x0000
                  |L1.1980|
0007bc  7c202531          DCB      "| %11s |  Dev:%d  | 0x%08x | 0x%08x |\r\n",0
0007c0  3173207c
0007c4  20204465
0007c8  763a2564
0007cc  20207c20
0007d0  30782530
0007d4  3878207c
0007d8  20307825
0007dc  30387820
0007e0  7c0d0a00
                  |L1.2020|
0007e4  0a0d426f          DCB      "\n\rBooting.......\n\r",0
0007e8  6f74696e
0007ec  672e2e2e
0007f0  2e2e2e2e
0007f4  0a0d00  
0007f7  00                DCB      0
                  |L1.2040|
0007f8  0a0d5265          DCB      "\n\rReBooting.......\n\r",0
0007fc  426f6f74
000800  696e672e
000804  2e2e2e2e
000808  2e2e0a0d
00080c  00      
00080d  00                DCB      0
00080e  00                DCB      0
00080f  00                DCB      0
                  |L1.2064|
000810  46495245          DCB      "FIRE-F429",0
000814  2d463432
000818  3900    
00081a  00                DCB      0
00081b  00                DCB      0
                  |L1.2076|
00081c  76322e31          DCB      "v2.1",0
000820  00      
000821  00                DCB      0
000822  00                DCB      0
000823  00                DCB      0
                  |L1.2084|
                          DCD      menu

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

                          REQUIRE _printf_percent
                          REQUIRE _printf_s
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                  SerialDownload PROC
;;;125    */
;;;126    void SerialDownload(mico_flash_t flash, uint32_t flashdestination, int32_t maxRecvSize)
000000  b5fe              PUSH     {r1-r7,lr}
;;;127    {
000002  460d              MOV      r5,r1
;;;128      char Number[10] = "          ";
000004  a116              ADR      r1,|L2.96|
000006  4614              MOV      r4,r2                 ;127
000008  4606              MOV      r6,r0                 ;127
00000a  c907              LDM      r1,{r0-r2}
00000c  e88d0007          STM      sp,{r0-r2}
;;;129      int32_t Size = 0;
;;;130      
;;;131      printf("Waiting for the file to be sent ... (press 'a' to abort)\n\r");
000010  a016              ADR      r0,|L2.108|
000012  f7fffffe          BL       __2printf
;;;132      Size = Ymodem_Receive( &tab_1024[0], flash, flashdestination, maxRecvSize );
000016  4623              MOV      r3,r4
000018  462a              MOV      r2,r5
00001a  4631              MOV      r1,r6
00001c  4822              LDR      r0,|L2.168|
00001e  f7fffffe          BL       Ymodem_Receive
000022  1e04              SUBS     r4,r0,#0
;;;133      if (Size > 0)
000024  dd0c              BLE      |L2.64|
;;;134      {
;;;135        printf("\n\n\r Successfully!\n\r\r\n Name: %s", FileName);
000026  4921              LDR      r1,|L2.172|
000028  a021              ADR      r0,|L2.176|
00002a  f7fffffe          BL       __2printf
;;;136        
;;;137        Int2Str((uint8_t *)Number, Size);
00002e  4621              MOV      r1,r4
000030  4668              MOV      r0,sp
000032  f7fffffe          BL       Int2Str
;;;138        printf("\n\r Size: %s Bytes\r\n", Number);
000036  4669              MOV      r1,sp
000038  a025              ADR      r0,|L2.208|
00003a  f7fffffe          BL       __2printf
;;;139      }
;;;140      else if (Size == -1)
;;;141      {
;;;142        printf("\n\n\rImage size is higher than memory!\n\r");
;;;143      }
;;;144      else if (Size == -2)
;;;145      {
;;;146        printf("\n\n\rVerification failed!\n\r");
;;;147      }
;;;148      else if (Size == -3)
;;;149      {
;;;150        printf("\r\n\nAborted.\n\r");
;;;151      }
;;;152      else
;;;153      {
;;;154        printf("\n\rReceive failed!\n\r");
;;;155      }
;;;156    }
00003e  bdfe              POP      {r1-r7,pc}
                  |L2.64|
000040  1c60              ADDS     r0,r4,#1              ;140
000042  d005              BEQ      |L2.80|
000044  1ca0              ADDS     r0,r4,#2              ;144
000046  d005              BEQ      |L2.84|
000048  1ce4              ADDS     r4,r4,#3              ;144
00004a  d007              BEQ      |L2.92|
00004c  a025              ADR      r0,|L2.228|
00004e  e002              B        |L2.86|
                  |L2.80|
000050  a029              ADR      r0,|L2.248|
000052  e000              B        |L2.86|
                  |L2.84|
000054  a032              ADR      r0,|L2.288|
                  |L2.86|
000056  f7fffffe          BL       __2printf
00005a  bdfe              POP      {r1-r7,pc}
                  |L2.92|
00005c  a037              ADR      r0,|L2.316|
00005e  e7fa              B        |L2.86|
;;;157    
                          ENDP

                  |L2.96|
000060  20202020          DCB      "          ",0
000064  20202020
000068  202000  
00006b  00                DCB      0
                  |L2.108|
00006c  57616974          DCB      "Waiting for the file to be sent ... (press 'a' to abort"
000070  696e6720
000074  666f7220
000078  74686520
00007c  66696c65
000080  20746f20
000084  62652073
000088  656e7420
00008c  2e2e2e20
000090  28707265
000094  73732027
000098  61272074
00009c  6f206162
0000a0  6f7274  
0000a3  290a0d00          DCB      ")\n\r",0
0000a7  00                DCB      0
                  |L2.168|
                          DCD      ||.bss||
                  |L2.172|
                          DCD      ||.bss||+0x400
                  |L2.176|
0000b0  0a0a0d20          DCB      "\n\n\r Successfully!\n\r\r\n Name: %s",0
0000b4  53756363
0000b8  65737366
0000bc  756c6c79
0000c0  210a0d0d
0000c4  0a204e61
0000c8  6d653a20
0000cc  257300  
0000cf  00                DCB      0
                  |L2.208|
0000d0  0a0d2053          DCB      "\n\r Size: %s Bytes\r\n",0
0000d4  697a653a
0000d8  20257320
0000dc  42797465
0000e0  730d0a00
                  |L2.228|
0000e4  0a0d5265          DCB      "\n\rReceive failed!\n\r",0
0000e8  63656976
0000ec  65206661
0000f0  696c6564
0000f4  210a0d00
                  |L2.248|
0000f8  0a0a0d49          DCB      "\n\n\rImage size is higher than memory!\n\r",0
0000fc  6d616765
000100  2073697a
000104  65206973
000108  20686967
00010c  68657220
000110  7468616e
000114  206d656d
000118  6f727921
00011c  0a0d00  
00011f  00                DCB      0
                  |L2.288|
000120  0a0a0d56          DCB      "\n\n\rVerification failed!\n\r",0
000124  65726966
000128  69636174
00012c  696f6e20
000130  6661696c
000134  6564210a
000138  0d00    
00013a  00                DCB      0
00013b  00                DCB      0
                  |L2.316|
00013c  0d0a0a41          DCB      "\r\n\nAborted.\n\r",0
000140  626f7274
000144  65642e0a
000148  0d00    
00014a  00                DCB      0
00014b  00                DCB      0

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

                  SerialUpload PROC
;;;162    */
;;;163    void SerialUpload(mico_flash_t flash, uint32_t flashdestination, char * fileName, int32_t maxRecvSize)
000000  b5f8              PUSH     {r3-r7,lr}
;;;164    {
000002  4607              MOV      r7,r0
000004  461c              MOV      r4,r3
000006  4615              MOV      r5,r2
000008  460e              MOV      r6,r1
;;;165      uint8_t status = 0;
;;;166      uint8_t key;
;;;167      
;;;168      printf("Select Receive File\n\r");
00000a  a00d              ADR      r0,|L3.64|
00000c  f7fffffe          BL       __2printf
;;;169      MicoUartRecv( STDIO_UART, &key, 1, MICO_NEVER_TIMEOUT );
000010  f04f33ff          MOV      r3,#0xffffffff
000014  2201              MOVS     r2,#1
000016  4669              MOV      r1,sp
000018  2000              MOVS     r0,#0
00001a  f7fffffe          BL       MicoUartRecv
;;;170      
;;;171      if (key == CRC16)
00001e  f89d0000          LDRB     r0,[sp,#0]
000022  2843              CMP      r0,#0x43
000024  d10b              BNE      |L3.62|
;;;172      {
;;;173        /* Transmit the flash image through ymodem protocol */
;;;174        status = Ymodem_Transmit(flash, flashdestination, (uint8_t *)fileName, maxRecvSize);
000026  4623              MOV      r3,r4
000028  462a              MOV      r2,r5
00002a  4631              MOV      r1,r6
00002c  4638              MOV      r0,r7
00002e  f7fffffe          BL       Ymodem_Transmit
;;;175        
;;;176        if (status != 0)
000032  b108              CBZ      r0,|L3.56|
;;;177        {
;;;178          printf("\n\rError while Transmitting\n\r");
000034  a008              ADR      r0,|L3.88|
000036  e000              B        |L3.58|
                  |L3.56|
;;;179        }
;;;180        else
;;;181        {
;;;182          printf("\n\rSuccessfully\n\r");
000038  a00f              ADR      r0,|L3.120|
                  |L3.58|
00003a  f7fffffe          BL       __2printf
                  |L3.62|
;;;183        }
;;;184      }
;;;185    }
00003e  bdf8              POP      {r3-r7,pc}
;;;186    
                          ENDP

                  |L3.64|
000040  53656c65          DCB      "Select Receive File\n\r",0
000044  63742052
000048  65636569
00004c  76652046
000050  696c650a
000054  0d00    
000056  00                DCB      0
000057  00                DCB      0
                  |L3.88|
000058  0a0d4572          DCB      "\n\rError while Transmitting\n\r",0
00005c  726f7220
000060  7768696c
000064  65205472
000068  616e736d
00006c  69747469
000070  6e670a0d
000074  00      
000075  00                DCB      0
000076  00                DCB      0
000077  00                DCB      0
                  |L3.120|
000078  0a0d5375          DCB      "\n\rSuccessfully\n\r",0
00007c  63636573
000080  7366756c
000084  6c790a0d
000088  00      
000089  00                DCB      0
00008a  00                DCB      0
00008b  00                DCB      0

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

                  findCommandPara PROC
;;;76     */
;;;77     int findCommandPara(char *commandBody, char *para, char *paraBody, int paraBodyLength)
000000  e92d47f0          PUSH     {r4-r10,lr}
;;;78     {
000004  b09a              SUB      sp,sp,#0x68
000006  4616              MOV      r6,r2
000008  4604              MOV      r4,r0
;;;79       int i = 0;
00000a  2700              MOVS     r7,#0
00000c  4699              MOV      r9,r3                 ;78
00000e  468a              MOV      r10,r1                ;78
;;;80       int k, j;
;;;81       int retval = -1;
000010  1e7d              SUBS     r5,r7,#1
;;;82       char para_in_ram[100];
;;;83       strncpy(para_in_ram, para, 100);
000012  2264              MOVS     r2,#0x64
000014  4668              MOV      r0,sp
000016  f7fffffe          BL       strncpy
00001a  46e8              MOV      r8,sp                 ;82
;;;84       
;;;85       for (i = 0; para_in_ram[i] != 0; i++)  {                /* convert to upper characters */
00001c  e004              B        |L4.40|
                  |L4.30|
;;;86         para_in_ram[i] = toupper(para_in_ram[i]);
00001e  f7fffffe          BL       toupper
000022  f8080007          STRB     r0,[r8,r7]
000026  1c7f              ADDS     r7,r7,#1
                  |L4.40|
000028  46c4              MOV      r12,r8                ;85
00002a  f8180007          LDRB     r0,[r8,r7]            ;85
00002e  2800              CMP      r0,#0                 ;85
000030  d1f5              BNE      |L4.30|
000032  e015              B        |L4.96|
                  |L4.52|
;;;87       }
;;;88       
;;;89       i = 0;
;;;90       while(commandBody[i] != 0) {
;;;91         if(commandBody[i] == '-' ){
000034  292d              CMP      r1,#0x2d
000036  d112              BNE      |L4.94|
;;;92           for(j=i+1, k=0; *(para_in_ram+k)!=0x0; j++, k++ ){
000038  1c41              ADDS     r1,r0,#1
00003a  2200              MOVS     r2,#0
00003c  e004              B        |L4.72|
                  |L4.62|
;;;93             if(commandBody[j] != *(para_in_ram+k)){
00003e  5c67              LDRB     r7,[r4,r1]
000040  429f              CMP      r7,r3
000042  d105              BNE      |L4.80|
000044  1c49              ADDS     r1,r1,#1
000046  1c52              ADDS     r2,r2,#1
                  |L4.72|
000048  f81c3002          LDRB     r3,[r12,r2]           ;92
00004c  2b00              CMP      r3,#0                 ;92
00004e  d1f6              BNE      |L4.62|
                  |L4.80|
;;;94               break;
;;;95             } 
;;;96           }
;;;97           
;;;98           if(*(para+k)!=0x0 || (commandBody[j]!=' '&& commandBody[j]!=0x0)){   /* para not found!             */
000050  f81a2002          LDRB     r2,[r10,r2]
000054  b91a              CBNZ     r2,|L4.94|
000056  5c62              LDRB     r2,[r4,r1]
000058  2a20              CMP      r2,#0x20
00005a  d00b              BEQ      |L4.116|
00005c  b152              CBZ      r2,|L4.116|
                  |L4.94|
00005e  1c40              ADDS     r0,r0,#1
                  |L4.96|
000060  5c21              LDRB     r1,[r4,r0]            ;90
000062  2900              CMP      r1,#0                 ;90
000064  d1e6              BNE      |L4.52|
                  |L4.102|
;;;99             i++;
;;;100            continue;
;;;101          }
;;;102          
;;;103          retval = 0;
;;;104          for (k = j+1; commandBody[k] == ' '; k++);      /* skip blanks                 */
;;;105          for(j = 0; commandBody[k] != ' ' && commandBody[k] != 0 && commandBody[k] != '-'; j++, k++){   /* para body found!             */
;;;106            if(paraBody) paraBody[j] = commandBody[k];
;;;107            retval ++;
;;;108            if( retval == paraBodyLength) goto exit;
;;;109          }
;;;110          goto exit;
;;;111        }
;;;112        i++;
;;;113      }
;;;114      
;;;115    exit:
;;;116      if(paraBody) paraBody[retval] = 0x0;
000066  b10e              CBZ      r6,|L4.108|
000068  2000              MOVS     r0,#0
00006a  5570              STRB     r0,[r6,r5]
                  |L4.108|
;;;117      return retval;
;;;118    }
00006c  b01a              ADD      sp,sp,#0x68
00006e  4628              MOV      r0,r5                 ;117
000070  e8bd87f0          POP      {r4-r10,pc}
                  |L4.116|
000074  2500              MOVS     r5,#0                 ;103
                  |L4.118|
000076  1c49              ADDS     r1,r1,#1              ;103
000078  5c60              LDRB     r0,[r4,r1]            ;104
00007a  2820              CMP      r0,#0x20              ;104
00007c  d0fb              BEQ      |L4.118|
00007e  2000              MOVS     r0,#0                 ;105
000080  e009              B        |L4.150|
                  |L4.130|
000082  b106              CBZ      r6,|L4.134|
000084  5432              STRB     r2,[r6,r0]            ;106
                  |L4.134|
000086  1c6d              ADDS     r5,r5,#1              ;106
000088  454d              CMP      r5,r9                 ;108
00008a  d0ec              BEQ      |L4.102|
00008c  1c49              ADDS     r1,r1,#1              ;108
00008e  1c40              ADDS     r0,r0,#1              ;105
000090  5c62              LDRB     r2,[r4,r1]            ;105
000092  2a20              CMP      r2,#0x20              ;105
000094  d0e7              BEQ      |L4.102|
                  |L4.150|
000096  5c62              LDRB     r2,[r4,r1]            ;105
000098  2a00              CMP      r2,#0                 ;105
00009a  d0e4              BEQ      |L4.102|
00009c  2a2d              CMP      r2,#0x2d              ;105
00009e  d1f0              BNE      |L4.130|
0000a0  e7e1              B        |L4.102|
;;;119    
                          ENDP


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

                  tab_1024
                          %        1024
                  FileName
                          %        256

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

                  ERROR_STR
000000  0a0d2a2a          DCB      0x0a,0x0d,0x2a,0x2a
000004  2a204552          DCB      0x2a,0x20,0x45,0x52
000008  524f523a          DCB      0x52,0x4f,0x52,0x3a
00000c  2025730a          DCB      0x20,0x25,0x73,0x0a
000010  0d00              DCB      0x0d,0x00

;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\Bootloader\\menu.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___6_menu_c_tab_1024____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___6_menu_c_tab_1024____REV16| PROC
#line 115

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
