123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- DATA_IN_ExtSRAM EQU 0
- Stack_Size EQU 0x00000400
- AREA STACK, NOINIT, READWRITE, ALIGN=3
- Stack_Mem SPACE Stack_Size
- __initial_sp
-
- Heap_Size EQU 0x00000400
- AREA HEAP, NOINIT, READWRITE, ALIGN=3
- __heap_base
- Heap_Mem SPACE Heap_Size
- __heap_limit
-
- THUMB
- PRESERVE8
-
- IMPORT NMIException
- IMPORT HardFaultException
- IMPORT MemManageException
- IMPORT BusFaultException
- IMPORT UsageFaultException
- IMPORT SVCHandler
- IMPORT DebugMonitor
- IMPORT PendSVC
- IMPORT SysTickHandler
- IMPORT WWDG_IRQHandler
- IMPORT PVD_IRQHandler
- IMPORT TAMPER_IRQHandler
- IMPORT RTC_IRQHandler
- IMPORT FLASH_IRQHandler
- IMPORT RCC_IRQHandler
- IMPORT EXTI0_IRQHandler
- IMPORT EXTI1_IRQHandler
- IMPORT EXTI2_IRQHandler
- IMPORT EXTI3_IRQHandler
- IMPORT EXTI4_IRQHandler
- IMPORT DMA1_Channel1_IRQHandler
- IMPORT DMA1_Channel2_IRQHandler
- IMPORT DMA1_Channel3_IRQHandler
- IMPORT DMA1_Channel4_IRQHandler
- IMPORT DMA1_Channel5_IRQHandler
- IMPORT DMA1_Channel6_IRQHandler
- IMPORT DMA1_Channel7_IRQHandler
- IMPORT ADC1_2_IRQHandler
- IMPORT USB_HP_CAN_TX_IRQHandler
- IMPORT USB_LP_CAN_RX0_IRQHandler
- IMPORT CAN_RX1_IRQHandler
- IMPORT CAN_SCE_IRQHandler
- IMPORT EXTI9_5_IRQHandler
- IMPORT TIM1_BRK_IRQHandler
- IMPORT TIM1_UP_IRQHandler
- IMPORT TIM1_TRG_COM_IRQHandler
- IMPORT TIM1_CC_IRQHandler
- IMPORT TIM2_IRQHandler
- IMPORT TIM3_IRQHandler
- IMPORT TIM4_IRQHandler
- IMPORT I2C1_EV_IRQHandler
- IMPORT I2C1_ER_IRQHandler
- IMPORT I2C2_EV_IRQHandler
- IMPORT I2C2_ER_IRQHandler
- IMPORT SPI1_IRQHandler
- IMPORT SPI2_IRQHandler
- IMPORT USART1_IRQHandler
- IMPORT USART2_IRQHandler
- IMPORT USART3_IRQHandler
- IMPORT EXTI15_10_IRQHandler
- IMPORT RTCAlarm_IRQHandler
- IMPORT USBWakeUp_IRQHandler
- IMPORT TIM8_BRK_IRQHandler
- IMPORT TIM8_UP_IRQHandler
- IMPORT TIM8_TRG_COM_IRQHandler
- IMPORT TIM8_CC_IRQHandler
- IMPORT ADC3_IRQHandler
- IMPORT FSMC_IRQHandler
- IMPORT SDIO_IRQHandler
- IMPORT TIM5_IRQHandler
- IMPORT SPI3_IRQHandler
- IMPORT UART4_IRQHandler
- IMPORT UART5_IRQHandler
- IMPORT TIM6_IRQHandler
- IMPORT TIM7_IRQHandler
- IMPORT DMA2_Channel1_IRQHandler
- IMPORT DMA2_Channel2_IRQHandler
- IMPORT DMA2_Channel3_IRQHandler
- IMPORT DMA2_Channel4_5_IRQHandler
-
- AREA RESET, DATA, READONLY
- EXPORT __Vectors
-
- __Vectors DCD __initial_sp
- DCD Reset_Handler
- DCD NMIException
- DCD HardFaultException
- DCD MemManageException
- DCD BusFaultException
- DCD UsageFaultException
- DCD 0
- DCD 0
- DCD 0
- DCD 0
- DCD SVCHandler
- DCD DebugMonitor
- DCD 0
- DCD PendSVC
- DCD SysTickHandler
- DCD WWDG_IRQHandler
- DCD PVD_IRQHandler
- DCD TAMPER_IRQHandler
- DCD RTC_IRQHandler
- DCD FLASH_IRQHandler
- DCD RCC_IRQHandler
- DCD EXTI0_IRQHandler
- DCD EXTI1_IRQHandler
- DCD EXTI2_IRQHandler
- DCD EXTI3_IRQHandler
- DCD EXTI4_IRQHandler
- DCD DMA1_Channel1_IRQHandler
- DCD DMA1_Channel2_IRQHandler
- DCD DMA1_Channel3_IRQHandler
- DCD DMA1_Channel4_IRQHandler
- DCD DMA1_Channel5_IRQHandler
- DCD DMA1_Channel6_IRQHandler
- DCD DMA1_Channel7_IRQHandler
- DCD ADC1_2_IRQHandler
- DCD USB_HP_CAN_TX_IRQHandler
- DCD USB_LP_CAN_RX0_IRQHandler
- DCD CAN_RX1_IRQHandler
- DCD CAN_SCE_IRQHandler
- DCD EXTI9_5_IRQHandler
- DCD TIM1_BRK_IRQHandler
- DCD TIM1_UP_IRQHandler
- DCD TIM1_TRG_COM_IRQHandler
- DCD TIM1_CC_IRQHandler
- DCD TIM2_IRQHandler
- DCD TIM3_IRQHandler
- DCD TIM4_IRQHandler
- DCD I2C1_EV_IRQHandler
- DCD I2C1_ER_IRQHandler
- DCD I2C2_EV_IRQHandler
- DCD I2C2_ER_IRQHandler
- DCD SPI1_IRQHandler
- DCD SPI2_IRQHandler
- DCD USART1_IRQHandler
- DCD USART2_IRQHandler
- DCD USART3_IRQHandler
- DCD EXTI15_10_IRQHandler
- DCD RTCAlarm_IRQHandler
- DCD USBWakeUp_IRQHandler
- DCD TIM8_BRK_IRQHandler
- DCD TIM8_UP_IRQHandler
- DCD TIM8_TRG_COM_IRQHandler
- DCD TIM8_CC_IRQHandler
- DCD ADC3_IRQHandler
- DCD FSMC_IRQHandler
- DCD SDIO_IRQHandler
- DCD TIM5_IRQHandler
- DCD SPI3_IRQHandler
- DCD UART4_IRQHandler
- DCD UART5_IRQHandler
- DCD TIM6_IRQHandler
- DCD TIM7_IRQHandler
- DCD DMA2_Channel1_IRQHandler
- DCD DMA2_Channel2_IRQHandler
- DCD DMA2_Channel3_IRQHandler
- DCD DMA2_Channel4_5_IRQHandler
-
- AREA |.text|, CODE, READONLY
- Reset_Handler PROC
- EXPORT Reset_Handler
-
- IF DATA_IN_ExtSRAM == 1
- LDR R0,= 0x00000114
- LDR R1,= 0x40021014
- STR R0,[R1]
-
- LDR R0,= 0x000001E0
- LDR R1,= 0x40021018
- STR R0,[R1]
- LDR R0,= 0x44BB44BB
- LDR R1,= 0x40011400
- STR R0,[R1]
-
- LDR R0,= 0xBBBBBBBB
- LDR R1,= 0x40011404
- STR R0,[R1]
-
- LDR R0,= 0xB44444BB
- LDR R1,= 0x40011800
- STR R0,[R1]
-
- LDR R0,= 0xBBBBBBBB
- LDR R1,= 0x40011804
- STR R0,[R1]
-
- LDR R0,= 0x44BBBBBB
- LDR R1,= 0x40011C00
- STR R0,[R1]
- LDR R0,= 0xBBBB4444
- LDR R1,= 0x40011C04
- STR R0,[R1]
- LDR R0,= 0x44BBBBBB
- LDR R1,= 0x40012000
- STR R0,[R1]
- LDR R0,= 0x44444B44
- LDR R1,= 0x40012004
- STR R0,[R1]
-
- LDR R0,= 0x00001011
- LDR R1,= 0xA0000010
- STR R0,[R1]
- LDR R0,= 0x00000200
- LDR R1,= 0xA0000014
- STR R0,[R1]
-
- ENDIF
-
-
- IMPORT __main
- LDR R0, =__main
- BX R0
- ENDP
- ALIGN
- IF :DEF:__MICROLIB
-
- EXPORT __initial_sp
- EXPORT __heap_base
- EXPORT __heap_limit
-
- ELSE
-
- IMPORT __use_two_region_memory
- EXPORT __user_initial_stackheap
-
- __user_initial_stackheap
- LDR R0, = Heap_Mem
- LDR R1, =(Stack_Mem + Stack_Size)
- LDR R2, = (Heap_Mem + Heap_Size)
- LDR R3, = Stack_Mem
- BX LR
- ALIGN
- ENDIF
- END
|