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

                          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,|L1.34|
000012  207d              MOVS     r0,#0x7d
000014  f7fffffe          BL       RCC_GetFlagStatus
000018  b118              CBZ      r0,|L1.34|
;;;228         RCC_ClearFlag();
00001a  f7fffffe          BL       RCC_ClearFlag
;;;229         PWR_EnterSTANDBYMode();
00001e  f7fffffe          BL       PWR_EnterSTANDBYMode
                  |L1.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  2400              MOVS     r4,#0
00002a  e004              B        |L1.54|
                  |L1.44|
;;;235      {
;;;236        NVIC ->IP[i] = 0xff;
00002c  21ff              MOVS     r1,#0xff
00002e  4817              LDR      r0,|L1.140|
000030  5501              STRB     r1,[r0,r4]
000032  1c60              ADDS     r0,r4,#1              ;234
000034  b2c4              UXTB     r4,r0                 ;234
                  |L1.54|
000036  2c51              CMP      r4,#0x51              ;234
000038  dbf8              BLT      |L1.44|
;;;237      }
;;;238      
;;;239      NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 );
00003a  f44f7040          MOV      r0,#0x300
00003e  f7fffffe          BL       NVIC_PriorityGroupConfig
;;;240    
;;;241      platform_init_peripheral_irq_priorities();
000042  f7fffffe          BL       platform_init_peripheral_irq_priorities
;;;242    
;;;243      /* Initialise GPIO IRQ manager */
;;;244      platform_gpio_irq_manager_init();
000046  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 );
00004a  4811              LDR      r0,|L1.144|
00004c  f7fffffe          BL       mico_rtos_init_mutex
;;;249      mico_rtos_unlock_mutex ( &stdio_tx_mutex );
000050  480f              LDR      r0,|L1.144|
000052  f7fffffe          BL       mico_rtos_unlock_mutex
;;;250      mico_rtos_init_mutex( &stdio_rx_mutex );
000056  480f              LDR      r0,|L1.148|
000058  f7fffffe          BL       mico_rtos_init_mutex
;;;251      mico_rtos_unlock_mutex ( &stdio_rx_mutex );
00005c  480d              LDR      r0,|L1.148|
00005e  f7fffffe          BL       mico_rtos_unlock_mutex
;;;252    #endif
;;;253    
;;;254      ring_buffer_init  ( (ring_buffer_t*)&stdio_rx_buffer, (uint8_t*)stdio_rx_data, STDIO_BUFFER_SIZE );
000062  2240              MOVS     r2,#0x40
000064  490c              LDR      r1,|L1.152|
000066  480d              LDR      r0,|L1.156|
000068  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 );
00006c  4b0b              LDR      r3,|L1.156|
00006e  4a0c              LDR      r2,|L1.160|
000070  490c              LDR      r1,|L1.164|
000072  480d              LDR      r0,|L1.168|
000074  f7fffffe          BL       platform_uart_init
;;;256    #endif
;;;257    
;;;258      /* Ensure 802.11 device is in reset. */
;;;259      host_platform_init( );
000078  f7fffffe          BL       host_platform_init
;;;260    
;;;261    #ifdef BOOTLOADER
;;;262      return;
;;;263    #endif
;;;264      
;;;265      /* Initialise RTC */
;;;266      platform_rtc_init( );
00007c  f7fffffe          BL       platform_rtc_init
;;;267      
;;;268    #ifndef MICO_DISABLE_MCU_POWERSAVE
;;;269      /* Initialise MCU powersave */
;;;270      platform_mcu_powersave_init( );
000080  f7fffffe          BL       platform_mcu_powersave_init
;;;271    #endif /* ifndef MICO_DISABLE_MCU_POWERSAVE */
;;;272    
;;;273      platform_mcu_powersave_disable( );
000084  f7fffffe          BL       platform_mcu_powersave_disable
;;;274    }
000088  bd10              POP      {r4,pc}
;;;275    
                          ENDP

00008a  0000              DCW      0x0000
                  |L1.140|
                          DCD      0xe000e400
                  |L1.144|
                          DCD      stdio_tx_mutex
                  |L1.148|
                          DCD      stdio_rx_mutex
                  |L1.152|
                          DCD      stdio_rx_data
                  |L1.156|
                          DCD      stdio_rx_buffer
                  |L1.160|
                          DCD      stdio_uart_config
                  |L1.164|
                          DCD      platform_uart_peripherals
                  |L1.168|
                          DCD      platform_uart_drivers

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

                  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  2302              MOVS     r3,#2
000032  f44f72b4          MOV      r2,#0x168
000036  2119              MOVS     r1,#0x19
000038  9000              STR      r0,[sp,#0]
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
;;;198      
;;;199      while ( RCC_GetFlagStatus( RCC_FLAG_PLLRDY ) == RESET )
000046  bf00              NOP      
                  |L2.72|
000048  2039              MOVS     r0,#0x39
00004a  f7fffffe          BL       RCC_GetFlagStatus
00004e  2800              CMP      r0,#0
000050  d0fa              BEQ      |L2.72|
;;;200      {
;;;201      }
;;;202      RCC_SYSCLKConfig( SYSTEM_CLOCK_SOURCE );
000052  2002              MOVS     r0,#2
000054  f7fffffe          BL       RCC_SYSCLKConfig
;;;203      
;;;204      while ( RCC_GetSYSCLKSource( ) != 0x08 )
000058  bf00              NOP      
                  |L2.90|
00005a  f7fffffe          BL       RCC_GetSYSCLKSource
00005e  2808              CMP      r0,#8
000060  d1fb              BNE      |L2.90|
;;;205      {
;;;206      }
;;;207      
;;;208      /* Configure HCLK clock as SysTick clock source. */
;;;209      SysTick_CLKSourceConfig( SYSTICK_CLOCK_SOURCE );
000062  2004              MOVS     r0,#4
000064  f7fffffe          BL       SysTick_CLKSourceConfig
;;;210    #ifdef NO_MICO_RTOS  
;;;211      SysTick_Config( SystemCoreClock / 1000 );
;;;212    #endif
;;;213    }
000068  bd08              POP      {r3,pc}
;;;214    
                          ENDP


                          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.platform_mcu_reset||, CODE, READONLY, ALIGN=2

                  platform_mcu_reset PROC
;;;167    
;;;168    void platform_mcu_reset( void )
000000  bf00              NOP      
000002  f3bf8f4f          DSB      
000006  4807              LDR      r0,|L4.36|
000008  6800              LDR      r0,[r0,#0]
00000a  f40060e0          AND      r0,r0,#0x700
00000e  4906              LDR      r1,|L4.40|
000010  4308              ORRS     r0,r0,r1
000012  1d00              ADDS     r0,r0,#4
000014  4903              LDR      r1,|L4.36|
000016  6008              STR      r0,[r1,#0]
000018  f3bf8f4f          DSB      
00001c  bf00              NOP      
00001e  bf00              NOP      
                  |L4.32|
000020  e7fe              B        |L4.32|
;;;169    {
;;;170      NVIC_SystemReset();
;;;171    }
;;;172    
                          ENDP

000022  0000              DCW      0x0000
                  |L4.36|
                          DCD      0xe000ed0c
                  |L4.40|
                          DCD      0x05fa0000

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

                  startApplication PROC
;;;132    
;;;133    void startApplication( uint32_t app_addr )
000000  b570              PUSH     {r4-r6,lr}
;;;134    {
000002  4604              MOV      r4,r0
;;;135      uint32_t* stack_ptr;
;;;136      uint32_t* start_ptr;
;;;137      
;;;138      if (((*(volatile uint32_t*)app_addr) & 0x2FFE0000 ) != 0x20000000)
000004  6820              LDR      r0,[r4,#0]
000006  4915              LDR      r1,|L5.92|
000008  4008              ANDS     r0,r0,r1
00000a  f1b05f00          CMP      r0,#0x20000000
00000e  d001              BEQ      |L5.20|
;;;139      app_addr += 0x200;
000010  f5047400          ADD      r4,r4,#0x200
                  |L5.20|
;;;140      /* Test if user code is programmed starting from address "ApplicationAddress" */
;;;141      if (((*(volatile uint32_t*)app_addr) & 0x2FFE0000 ) == 0x20000000)
000014  6820              LDR      r0,[r4,#0]
000016  4911              LDR      r1,|L5.92|
000018  4008              ANDS     r0,r0,r1
00001a  f1b05f00          CMP      r0,#0x20000000
00001e  d11b              BNE      |L5.88|
;;;142      { 
;;;143        SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
000020  f04f20e0          MOV      r0,#0xe000e000
000024  6900              LDR      r0,[r0,#0x10]
000026  f0200001          BIC      r0,r0,#1
00002a  f04f21e0          MOV      r1,#0xe000e000
00002e  6108              STR      r0,[r1,#0x10]
;;;144    
;;;145        /* Clear all interrupt enabled by bootloader */
;;;146        for (int i = 0; i < 8; i++ )
000030  2000              MOVS     r0,#0
000032  e005              B        |L5.64|
                  |L5.52|
;;;147            NVIC->ICER[i] = 0xFFFFFFFF;
000034  f04f32ff          MOV      r2,#0xffffffff
000038  4909              LDR      r1,|L5.96|
00003a  f8412020          STR      r2,[r1,r0,LSL #2]
00003e  1c40              ADDS     r0,r0,#1              ;146
                  |L5.64|
000040  2808              CMP      r0,#8                 ;146
000042  dbf7              BLT      |L5.52|
;;;148        
;;;149        stack_ptr = (uint32_t*) app_addr;  /* Initial stack pointer is first 4 bytes of vector table */
000044  4625              MOV      r5,r4
;;;150        start_ptr = ( stack_ptr + 1 );  /* Reset vector is second 4 bytes of vector table */
000046  462c              MOV      r4,r5
000048  1d2e              ADDS     r6,r5,#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 );
00004a  6828              LDR      r0,[r5,#0]
00004c  f3808808          MSR      MSP,r0
000050  bf00              NOP      
;;;164        __jump_to( *start_ptr );
000052  6830              LDR      r0,[r6,#0]
000054  f7fffffe          BL       __asm___15_platform_init_c_33430d90____jump_to
                  |L5.88|
;;;165      }  
;;;166    }
000058  bd70              POP      {r4-r6,pc}
;;;167    
                          ENDP

00005a  0000              DCW      0x0000
                  |L5.92|
                          DCD      0x2ffe0000
                  |L5.96|
                          DCD      0xe000e180

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

                  stdio_hardfault PROC
;;;275    
;;;276    OSStatus stdio_hardfault( char* data, uint32_t size )
000000  b510              PUSH     {r4,lr}
;;;277    {
000002  4602              MOV      r2,r0
000004  460b              MOV      r3,r1
;;;278    #ifndef MICO_DISABLE_STDIO
;;;279      uint32_t idx;
;;;280      for(idx = 0; idx < size; idx++){
000006  2100              MOVS     r1,#0
000008  e00c              B        |L6.36|
                  |L6.10|
;;;281        while ( ( platform_uart_peripherals[ STDIO_UART ].port->SR & USART_SR_TXE ) == 0 );
00000a  bf00              NOP      
                  |L6.12|
00000c  4807              LDR      r0,|L6.44|
00000e  6800              LDR      r0,[r0,#0]  ; platform_uart_peripherals
000010  8800              LDRH     r0,[r0,#0]
000012  f0000080          AND      r0,r0,#0x80
000016  2800              CMP      r0,#0
000018  d0f8              BEQ      |L6.12|
;;;282        platform_uart_peripherals[ STDIO_UART ].port->DR = (data[idx] & (uint16_t)0x01FF);
00001a  5c50              LDRB     r0,[r2,r1]
00001c  4c03              LDR      r4,|L6.44|
00001e  6824              LDR      r4,[r4,#0]  ; platform_uart_peripherals
000020  80a0              STRH     r0,[r4,#4]
000022  1c49              ADDS     r1,r1,#1              ;280
                  |L6.36|
000024  4299              CMP      r1,r3                 ;280
000026  d3f0              BCC      |L6.10|
;;;283        
;;;284      }
;;;285    #endif
;;;286      return kNoErr;
000028  2000              MOVS     r0,#0
;;;287    }
00002a  bd10              POP      {r4,pc}
;;;288    
                          ENDP

                  |L6.44|
                          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      0x0001c200
000004  03000000          DCB      0x03,0x00,0x00,0x00
000008  00000000          DCB      0x00,0x00,0x00,0x00

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

                  stdio_rx_mutex
                          DCD      0x00000000
                  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 ***
