; 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\platform_init.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\platform_init.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\platform_init.crf ..\..\..\..\Platform\MCU\STM32F4xx\platform_init.c]
                          THUMB

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

                  SysTick_Handler PROC
;;;296    
;;;297    void SysTick_Handler(void)
000000  4802              LDR      r0,|L1.12|
;;;298    {
;;;299      no_os_tick ++;
000002  6801              LDR      r1,[r0,#0]  ; no_os_tick
000004  1c49              ADDS     r1,r1,#1
000006  6001              STR      r1,[r0,#0]  ; no_os_tick
;;;300      platform_watchdog_kick( );
000008  f7ffbffe          B.W      platform_watchdog_kick
;;;301    }
;;;302    
                          ENDP

                  |L1.12|
                          DCD      ||.data||

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

                  init_architecture PROC
;;;219    
;;;220    void init_architecture( void )
000000  b510              PUSH     {r4,lr}
;;;221    {
;;;222      uint8_t i;
;;;223      
;;;224      RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
000002  2101              MOVS     r1,#1
000004  0708              LSLS     r0,r1,#28
000006  f7fffffe          BL       RCC_APB1PeriphClockCmd
;;;225      
;;;226       /*STM32 wakeup by watchdog in standby mode, re-enter standby mode in this situation*/
;;;227      if ( (PWR_GetFlagStatus(PWR_FLAG_SB) != RESET) && RCC_GetFlagStatus(RCC_FLAG_IWDGRST) != RESET){
00000a  2002              MOVS     r0,#2
00000c  f7fffffe          BL       PWR_GetFlagStatus
000010  b138              CBZ      r0,|L2.34|
000012  207d              MOVS     r0,#0x7d
000014  f7fffffe          BL       RCC_GetFlagStatus
000018  b118              CBZ      r0,|L2.34|
;;;228         RCC_ClearFlag();
00001a  f7fffffe          BL       RCC_ClearFlag
;;;229         PWR_EnterSTANDBYMode();
00001e  f7fffffe          BL       PWR_EnterSTANDBYMode
                  |L2.34|
;;;230       }
;;;231      PWR_ClearFlag(PWR_FLAG_SB);
000022  2002              MOVS     r0,#2
000024  f7fffffe          BL       PWR_ClearFlag
;;;232      
;;;233      /* Initialise the interrupt priorities to a priority lower than 0 so that the BASEPRI register can mask them */
;;;234      for ( i = 0; i < 81; i++ )
000028  2000              MOVS     r0,#0
;;;235      {
;;;236        NVIC ->IP[i] = 0xff;
00002a  21ff              MOVS     r1,#0xff
                  |L2.44|
00002c  f10022e0          ADD      r2,r0,#0xe000e000
000030  f8821400          STRB     r1,[r2,#0x400]
000034  1c40              ADDS     r0,r0,#1
000036  b2c0              UXTB     r0,r0                 ;234
000038  2851              CMP      r0,#0x51              ;234
00003a  d3f7              BCC      |L2.44|
;;;237      }
;;;238      
;;;239      NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 );
00003c  f44f7040          MOV      r0,#0x300
000040  f7fffffe          BL       NVIC_PriorityGroupConfig
;;;240    
;;;241      platform_init_peripheral_irq_priorities();
000044  f7fffffe          BL       platform_init_peripheral_irq_priorities
;;;242    
;;;243      /* Initialise GPIO IRQ manager */
;;;244      platform_gpio_irq_manager_init();
000048  f7fffffe          BL       platform_gpio_irq_manager_init
;;;245      
;;;246    #ifndef MICO_DISABLE_STDIO
;;;247    #ifndef NO_MICO_RTOS
;;;248      mico_rtos_init_mutex( &stdio_tx_mutex );
;;;249      mico_rtos_unlock_mutex ( &stdio_tx_mutex );
;;;250      mico_rtos_init_mutex( &stdio_rx_mutex );
;;;251      mico_rtos_unlock_mutex ( &stdio_rx_mutex );
;;;252    #endif
;;;253    
;;;254      ring_buffer_init  ( (ring_buffer_t*)&stdio_rx_buffer, (uint8_t*)stdio_rx_data, STDIO_BUFFER_SIZE );
00004c  4908              LDR      r1,|L2.112|
00004e  2240              MOVS     r2,#0x40
000050  f1a10010          SUB      r0,r1,#0x10
000054  f7fffffe          BL       ring_buffer_init
;;;255      platform_uart_init( &platform_uart_drivers[STDIO_UART], &platform_uart_peripherals[STDIO_UART], &stdio_uart_config, (ring_buffer_t*)&stdio_rx_buffer );
000058  4b05              LDR      r3,|L2.112|
00005a  4a06              LDR      r2,|L2.116|
00005c  3b10              SUBS     r3,r3,#0x10
00005e  4906              LDR      r1,|L2.120|
000060  4806              LDR      r0,|L2.124|
000062  f7fffffe          BL       platform_uart_init
;;;256    #endif
;;;257    
;;;258      /* Ensure 802.11 device is in reset. */
;;;259      host_platform_init( );
000066  e8bd4010          POP      {r4,lr}
00006a  f7ffbffe          B.W      host_platform_init
;;;260    
;;;261    #ifdef BOOTLOADER
;;;262      return;
;;;263    #endif
;;;264      
;;;265      /* Initialise RTC */
;;;266      platform_rtc_init( );
;;;267      
;;;268    #ifndef MICO_DISABLE_MCU_POWERSAVE
;;;269      /* Initialise MCU powersave */
;;;270      platform_mcu_powersave_init( );
;;;271    #endif /* ifndef MICO_DISABLE_MCU_POWERSAVE */
;;;272    
;;;273      platform_mcu_powersave_disable( );
;;;274    }
;;;275    
                          ENDP

00006e  0000              DCW      0x0000
                  |L2.112|
                          DCD      ||.bss||+0x10
                  |L2.116|
                          DCD      ||.constdata||
                  |L2.120|
                          DCD      platform_uart_peripherals
                  |L2.124|
                          DCD      platform_uart_drivers

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

                  init_clocks PROC
;;;176    */
;;;177    void init_clocks( void )
000000  b508              PUSH     {r3,lr}
;;;178    {
;;;179      //RCC_DeInit( ); /* if not commented then the LSE PA8 output will be disabled and never comes up again */
;;;180      
;;;181      /* Configure Clocks */
;;;182      RCC_HSEConfig( HSE_SOURCE );
000002  2001              MOVS     r0,#1
000004  f7fffffe          BL       RCC_HSEConfig
;;;183      RCC_WaitForHSEStartUp( );
000008  f7fffffe          BL       RCC_WaitForHSEStartUp
;;;184      
;;;185      RCC_HCLKConfig( AHB_CLOCK_DIVIDER );
00000c  2000              MOVS     r0,#0
00000e  f7fffffe          BL       RCC_HCLKConfig
;;;186      RCC_PCLK2Config( APB2_CLOCK_DIVIDER );
000012  f44f5080          MOV      r0,#0x1000
000016  f7fffffe          BL       RCC_PCLK2Config
;;;187      RCC_PCLK1Config( APB1_CLOCK_DIVIDER );
00001a  f44f50a0          MOV      r0,#0x1400
00001e  f7fffffe          BL       RCC_PCLK1Config
;;;188      
;;;189      /* Enable the PLL */
;;;190      FLASH_SetLatency( INT_FLASH_WAIT_STATE );
000022  2005              MOVS     r0,#5
000024  f7fffffe          BL       FLASH_SetLatency
;;;191      FLASH_PrefetchBufferCmd( ENABLE );
000028  2001              MOVS     r0,#1
00002a  f7fffffe          BL       FLASH_PrefetchBufferCmd
;;;192      
;;;193      /* Use the clock configuration utility from ST to calculate these values
;;;194      * http://www.st.com/st-web-ui/static/active/en/st_prod_software_internet/resource/technical/software/utility/stsw-stm32090.zip
;;;195      */
;;;196      RCC_PLLConfig( PLL_SOURCE, PLL_M_CONSTANT, PLL_N_CONSTANT, PLL_P_CONSTANT, PPL_Q_CONSTANT ); /* NOTE: The CPU Clock Frequency is independently defined in <MiCO-SDK>/MiCO/Platform/<platform>/<platform>.mk */
00002e  2008              MOVS     r0,#8
000030  9000              STR      r0,[sp,#0]
000032  2302              MOVS     r3,#2
000034  f44f72b4          MOV      r2,#0x168
000038  2119              MOVS     r1,#0x19
00003a  04c0              LSLS     r0,r0,#19
00003c  f7fffffe          BL       RCC_PLLConfig
;;;197      RCC_PLLCmd( ENABLE );
000040  2001              MOVS     r0,#1
000042  f7fffffe          BL       RCC_PLLCmd
                  |L3.70|
;;;198      
;;;199      while ( RCC_GetFlagStatus( RCC_FLAG_PLLRDY ) == RESET )
000046  2039              MOVS     r0,#0x39
000048  f7fffffe          BL       RCC_GetFlagStatus
00004c  2800              CMP      r0,#0
00004e  d0fa              BEQ      |L3.70|
;;;200      {
;;;201      }
;;;202      RCC_SYSCLKConfig( SYSTEM_CLOCK_SOURCE );
000050  2002              MOVS     r0,#2
000052  f7fffffe          BL       RCC_SYSCLKConfig
                  |L3.86|
;;;203      
;;;204      while ( RCC_GetSYSCLKSource( ) != 0x08 )
000056  f7fffffe          BL       RCC_GetSYSCLKSource
00005a  2808              CMP      r0,#8
00005c  d1fb              BNE      |L3.86|
;;;205      {
;;;206      }
;;;207      
;;;208      /* Configure HCLK clock as SysTick clock source. */
;;;209      SysTick_CLKSourceConfig( SYSTICK_CLOCK_SOURCE );
00005e  2004              MOVS     r0,#4
000060  f7fffffe          BL       SysTick_CLKSourceConfig
;;;210    #ifdef NO_MICO_RTOS  
;;;211      SysTick_Config( SystemCoreClock / 1000 );
000064  480b              LDR      r0,|L3.148|
000066  f44f717a          MOV      r1,#0x3e8
00006a  6800              LDR      r0,[r0,#0]  ; SystemCoreClock
00006c  fbb0f0f1          UDIV     r0,r0,r1
000070  f1b07f80          CMP      r0,#0x1000000
000074  d20d              BCS      |L3.146|
000076  f020417f          BIC      r1,r0,#0xff000000
00007a  f04f20e0          MOV      r0,#0xe000e000
00007e  1e49              SUBS     r1,r1,#1
000080  6141              STR      r1,[r0,#0x14]
000082  4a05              LDR      r2,|L3.152|
000084  21f0              MOVS     r1,#0xf0
000086  f8821d14          STRB     r1,[r2,#0xd14]
00008a  2100              MOVS     r1,#0
00008c  6181              STR      r1,[r0,#0x18]
00008e  2107              MOVS     r1,#7
000090  6101              STR      r1,[r0,#0x10]
                  |L3.146|
;;;212    #endif
;;;213    }
000092  bd08              POP      {r3,pc}
;;;214    
                          ENDP

                  |L3.148|
                          DCD      SystemCoreClock
                  |L3.152|
                          DCD      0xe000e00f

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

                  init_memory PROC
;;;214    
;;;215    WEAK void init_memory( void )
000000  4770              BX       lr
;;;216    {
;;;217      
;;;218    }
;;;219    
                          ENDP


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

                  mico_get_time_no_os PROC
;;;302    
;;;303    uint32_t mico_get_time_no_os(void)
000000  4801              LDR      r0,|L5.8|
;;;304    {
;;;305      return no_os_tick;
000002  6800              LDR      r0,[r0,#0]  ; no_os_tick
;;;306    }
000004  4770              BX       lr
;;;307    
                          ENDP

000006  0000              DCW      0x0000
                  |L5.8|
                          DCD      ||.data||

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

                  mico_thread_msleep_no_os PROC
;;;307    
;;;308    void mico_thread_msleep_no_os(uint32_t milliseconds)
000000  4903              LDR      r1,|L6.16|
000002  680a              LDR      r2,[r1,#0]  ; no_os_tick
;;;309    {
;;;310      int tick_delay_start = mico_get_time_no_os();
;;;311      while(mico_get_time_no_os() < tick_delay_start+milliseconds);  
000004  4410              ADD      r0,r0,r2
                  |L6.6|
000006  680a              LDR      r2,[r1,#0]  ; no_os_tick
000008  4282              CMP      r2,r0
00000a  d3fc              BCC      |L6.6|
;;;312    }
00000c  4770              BX       lr
;;;313    #endif
                          ENDP

00000e  0000              DCW      0x0000
                  |L6.16|
                          DCD      ||.data||

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

                  platform_mcu_reset PROC
;;;167    
;;;168    void platform_mcu_reset( void )
000000  f3bf8f4f          DSB      
000004  4804              LDR      r0,|L7.24|
000006  6801              LDR      r1,[r0,#0]
000008  4a04              LDR      r2,|L7.28|
00000a  f40161e0          AND      r1,r1,#0x700
00000e  4311              ORRS     r1,r1,r2
000010  6001              STR      r1,[r0,#0]
000012  f3bf8f4f          DSB      
                  |L7.22|
000016  e7fe              B        |L7.22|
;;;169    {
;;;170      NVIC_SystemReset();
;;;171    }
;;;172    
                          ENDP

                  |L7.24|
                          DCD      0xe000ed0c
                  |L7.28|
                          DCD      0x05fa0004

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

                  startApplication PROC
;;;132    
;;;133    void startApplication( uint32_t app_addr )
000000  6802              LDR      r2,[r0,#0]
;;;134    {
;;;135      uint32_t* stack_ptr;
;;;136      uint32_t* start_ptr;
;;;137      
;;;138      if (((*(volatile uint32_t*)app_addr) & 0x2FFE0000 ) != 0x20000000)
000002  4912              LDR      r1,|L8.76|
000004  f04f5300          MOV      r3,#0x20000000
000008  400a              ANDS     r2,r2,r1
00000a  429a              CMP      r2,r3
00000c  d001              BEQ      |L8.18|
00000e  f5007000          ADD      r0,r0,#0x200          ;134
                  |L8.18|
;;;139      app_addr += 0x200;
;;;140      /* Test if user code is programmed starting from address "ApplicationAddress" */
;;;141      if (((*(volatile uint32_t*)app_addr) & 0x2FFE0000 ) == 0x20000000)
000012  6802              LDR      r2,[r0,#0]
000014  400a              ANDS     r2,r2,r1
000016  429a              CMP      r2,r3
000018  d116              BNE      |L8.72|
;;;142      { 
;;;143        SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
00001a  f04f21e0          MOV      r1,#0xe000e000
00001e  690a              LDR      r2,[r1,#0x10]
000020  f0220201          BIC      r2,r2,#1
000024  610a              STR      r2,[r1,#0x10]
;;;144    
;;;145        /* Clear all interrupt enabled by bootloader */
;;;146        for (int i = 0; i < 8; i++ )
000026  2100              MOVS     r1,#0
;;;147            NVIC->ICER[i] = 0xFFFFFFFF;
000028  1e4a              SUBS     r2,r1,#1
                  |L8.42|
00002a  008b              LSLS     r3,r1,#2
00002c  f10323e0          ADD      r3,r3,#0xe000e000
000030  f8c32180          STR      r2,[r3,#0x180]
000034  1c49              ADDS     r1,r1,#1
000036  2908              CMP      r1,#8                 ;146
000038  dbf7              BLT      |L8.42|
;;;148        
;;;149        stack_ptr = (uint32_t*) app_addr;  /* Initial stack pointer is first 4 bytes of vector table */
;;;150        start_ptr = ( stack_ptr + 1 );  /* Reset vector is second 4 bytes of vector table */
00003a  1d01              ADDS     r1,r0,#4
;;;151    
;;;152        #if defined ( __ICCARM__)
;;;153        __ASM( "MOV LR,        #0xFFFFFFFF" );
;;;154        __ASM( "MOV R1,        #0x01000000" );
;;;155        __ASM( "MSR APSR_nzcvq,     R1" );
;;;156        __ASM( "MOV R1,        #0x00000000" );
;;;157        __ASM( "MSR PRIMASK,   R1" );
;;;158        __ASM( "MSR FAULTMASK, R1" );
;;;159        __ASM( "MSR BASEPRI,   R1" );
;;;160        __ASM( "MSR CONTROL,   R1" );
;;;161        #endif
;;;162        
;;;163        __set_MSP( *stack_ptr );
00003c  6800              LDR      r0,[r0,#0]
00003e  f3808808          MSR      MSP,r0
;;;164        __jump_to( *start_ptr );
000042  6808              LDR      r0,[r1,#0]
000044  f7ffbffe          B.W      __asm___15_platform_init_c_33430d90____jump_to
                  |L8.72|
;;;165      }  
;;;166    }
000048  4770              BX       lr
;;;167    
                          ENDP

00004a  0000              DCW      0x0000
                  |L8.76|
                          DCD      0x2ffe0000

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

                  stdio_hardfault PROC
;;;275    
;;;276    OSStatus stdio_hardfault( char* data, uint32_t size )
000000  b530              PUSH     {r4,r5,lr}
;;;277    {
;;;278    #ifndef MICO_DISABLE_STDIO
;;;279      uint32_t idx;
;;;280      for(idx = 0; idx < size; idx++){
000002  2200              MOVS     r2,#0
;;;281        while ( ( platform_uart_peripherals[ STDIO_UART ].port->SR & USART_SR_TXE ) == 0 );
000004  4d06              LDR      r5,|L9.32|
000006  e006              B        |L9.22|
                  |L9.8|
000008  682b              LDR      r3,[r5,#0]
                  |L9.10|
00000a  881c              LDRH     r4,[r3,#0]
00000c  0624              LSLS     r4,r4,#24
00000e  d5fc              BPL      |L9.10|
;;;282        platform_uart_peripherals[ STDIO_UART ].port->DR = (data[idx] & (uint16_t)0x01FF);
000010  5c84              LDRB     r4,[r0,r2]
000012  809c              STRH     r4,[r3,#4]
000014  1c52              ADDS     r2,r2,#1
                  |L9.22|
000016  428a              CMP      r2,r1                 ;280
000018  d3f6              BCC      |L9.8|
;;;283        
;;;284      }
;;;285    #endif
;;;286      return kNoErr;
00001a  2000              MOVS     r0,#0
;;;287    }
00001c  bd30              POP      {r4,r5,pc}
;;;288    
                          ENDP

00001e  0000              DCW      0x0000
                  |L9.32|
                          DCD      platform_uart_peripherals

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

                  stdio_rx_buffer
                          %        16
                  stdio_rx_data
                          %        64

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

                  stdio_uart_config
                          DCD      0x000e1000
000004  03000000          DCB      0x03,0x00,0x00,0x00
000008  00000000          DCB      0x00,0x00,0x00,0x00

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

                  no_os_tick
                          DCD      0x00000000

                          AREA ||area_number.15||, DATA, ALIGN=2

                          EXPORTAS ||area_number.15||, ||.data||
                  stdio_rx_mutex
                          DCD      0x00000000

                          AREA ||area_number.16||, DATA, ALIGN=2

                          EXPORTAS ||area_number.16||, ||.data||
                  stdio_tx_mutex
                          DCD      0x00000000

;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\Platform\\MCU\\STM32F4xx\\platform_init.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___15_platform_init_c_33430d90____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___15_platform_init_c_33430d90____REV16| PROC
#line 115

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

 revsh r0, r0
 bx lr
	ENDP
	AREA ||.emb_text||, CODE
	THUMB
	EXPORT |__asm___15_platform_init_c_33430d90____jump_to|
#line 122 "..\\..\\..\\..\\Platform\\MCU\\STM32F4xx\\platform_init.c"
|__asm___15_platform_init_c_33430d90____jump_to| PROC
#line 123

 

 
 MOV R1, #0x00000001
 ORR R0, R0, R1  
 BLX R0
	ENDP

;*** End   embedded assembler ***
