Stack_Size EQU 0x004000 AREA STACK, NOINIT, READWRITE, ALIGN=4 Stack_Mem SPACE Stack_Size __initial_sp EQU 0x10014000 ; Heap Configuration ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=4 __heap_base Heap_Mem SPACE Heap_Size __heap_limit PRESERVE8 THUMB ; Vector Table Mapped to Address 0 at Reset AREA RESET, DATA, READONLY IMPORT NMI_Handler IMPORT HardFault_Handler IMPORT SVC_Handler IMPORT PendSV_Handler EXPORT __Vectors EXPORT __Vectors_End EXPORT __Vectors_Size __Vectors DCD __initial_sp ; Top of Stack DCD Reset_Handler ; Reset Handler DCD NMI_Handler DCD HardFault_Handler ; Hard Fault Handler DCD 0 ; DCD 0 ; DCD 0 ; DCD 0 ; DCD 0 ; DCD 0 ; DCD 0 ; DCD SVC_Handler ; DCD 0 ; DCD 0 ; DCD PendSV_Handler ; DCD SysTick_Handler ; DCD USB_IRQHandler ; DCD IIC_IRQHandler ; DCD QSPI_IRQHandler ; DCD SPI_IRQHandler ; DCD UART_IRQHandler ; DCD UARTB_IRQHandler ; DCD ADC_IRQHandler ; DCD IIS_IRQHandler ; DCD BT_IRQHandler ; DCD GPIO0_IRQHandler ; DCD GPIO1_IRQHandler ; DCD 0 ; DCD 0 ; DCD 0 ; DCD 0 ; DCD 0 ; DCD 0 ; DCD GPIO8_IRQHandler ; DCD GPIO9_IRQHandler ; DCD GPIO10_IRQHandler ; DCD GPIO11_IRQHandler ; DCD GPIO12_IRQHandler ; DCD GPIO13_IRQHandler ; DCD GPIO14_IRQHandler ; DCD GPIO15_IRQHandler ; DCD GPIO16_IRQHandler ; DCD GPIO17_IRQHandler ; DCD GPIO18_IRQHandler ; DCD GPIO19_IRQHandler ; DCD GPIO20_IRQHandler ; DCD GPIO21_IRQHandler ; DCD GPIO22_IRQHandler ; __Vectors_End __Vectors_Size EQU __Vectors_End - __Vectors AREA |.text|, CODE, READONLY ,ALIGN=4 ; Reset Handler Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT __main LDR R0, =__main BX R0 ENDP Default_Handler PROC ; ToDo: Add here the export definition for the device specific external interrupts handler EXPORT SysTick_Handler [WEAK] EXPORT USB_IRQHandler [WEAK] EXPORT IIC_IRQHandler [WEAK] EXPORT QSPI_IRQHandler [WEAK] EXPORT SPI_IRQHandler [WEAK] EXPORT UART_IRQHandler [WEAK] EXPORT UARTB_IRQHandler [WEAK] EXPORT ADC_IRQHandler [WEAK] EXPORT IIS_IRQHandler [WEAK] EXPORT BT_IRQHandler [WEAK] EXPORT GPIO0_IRQHandler [WEAK] EXPORT GPIO1_IRQHandler [WEAK] EXPORT GPIO8_IRQHandler [WEAK] EXPORT GPIO9_IRQHandler [WEAK] EXPORT GPIO10_IRQHandler [WEAK] EXPORT GPIO11_IRQHandler [WEAK] EXPORT GPIO12_IRQHandler [WEAK] EXPORT GPIO13_IRQHandler [WEAK] EXPORT GPIO14_IRQHandler [WEAK] EXPORT GPIO15_IRQHandler [WEAK] EXPORT GPIO16_IRQHandler [WEAK] EXPORT GPIO17_IRQHandler [WEAK] EXPORT GPIO18_IRQHandler [WEAK] EXPORT GPIO19_IRQHandler [WEAK] EXPORT GPIO20_IRQHandler [WEAK] EXPORT GPIO21_IRQHandler [WEAK] EXPORT GPIO22_IRQHandler [WEAK] ; ToDo: Add here the names for the device specific external interrupts handler SysTick_Handler USB_IRQHandler IIC_IRQHandler QSPI_IRQHandler SPI_IRQHandler UART_IRQHandler UARTB_IRQHandler ADC_IRQHandler IIS_IRQHandler BT_IRQHandler GPIO0_IRQHandler GPIO1_IRQHandler GPIO8_IRQHandler GPIO9_IRQHandler GPIO10_IRQHandler GPIO11_IRQHandler GPIO12_IRQHandler GPIO13_IRQHandler GPIO14_IRQHandler GPIO15_IRQHandler GPIO16_IRQHandler GPIO17_IRQHandler GPIO18_IRQHandler GPIO19_IRQHandler GPIO20_IRQHandler GPIO21_IRQHandler GPIO22_IRQHandler B . ENDP ALIGN ; User Initial Stack & Heap 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 PROC LDR R0, = Heap_Mem LDR R1, =(Stack_Mem + Stack_Size) LDR R2, = (Heap_Mem + Heap_Size) LDR R3, = Stack_Mem BX LR ENDP ALIGN ENDIF END