37 #define TO_STRING_STRP2(x) #x
38 #define TO_STRING_STRP(x) TO_STRING_STRP2(x)
40 #ifdef STARTUP_LPC_STACK_CFG
41 #include TO_STRING_STRP(STARTUP_LPC_STACK_CFG)
43 #include "startup_lpc_stack_generic.h"
58 .extern __ram_code_load
59 .extern __ram_code_start
60 .extern __ram_code_end
63 #ifndef UND_STACK_SIZE
64 #define UND_STACK_SIZE 0x00000000
66 #ifndef ABT_STACK_SIZE
67 #define ABT_STACK_SIZE 0x00000000
69 #ifndef FIQ_STACK_SIZE
70 #define FIQ_STACK_SIZE 0x00000000
72 #ifndef IRQ_STACK_SIZE
73 #define IRQ_STACK_SIZE 0x00000100
75 #ifndef SVC_STACK_SIZE
76 #define SVC_STACK_SIZE 0x00000008
90 #ifndef __PORT_ARM_MODE_MAIN__
91 #define __PORT_ARM_MODE_MAIN__ 0
93 #if __PORT_ARM_MODE_MAIN__ > 0
94 #if ((__PORT_ARM_MODE_MAIN__ == (MODE_SYS|I_BIT|F_BIT) ) || (__PORT_ARM_MODE_MAIN__ == (MODE_USR|I_BIT|F_BIT) ))
106 #define i_MCU_MODEL 2103
109 #ifndef port_SELF_COPY_VECTORS
110 #define port_SELF_COPY_VECTORS 0
112 #ifndef port_HAS_COMMON_IRQ_HANDLER
113 #define port_HAS_COMMON_IRQ_HANDLER 0
116 #define CPU_PIPELINE_STAGES 3
117 #define INSTRUCTION_SIZE 4
119 .section .text.vectors,
"ax"
126 .global _vectors_start
134 #if (port_SELF_COPY_VECTORS == 0)
141 #if (port_HAS_COMMON_IRQ_HANDLER > 0)
143 copy_vectors_from_here:
145 copy_vectors_from_here:
151 #if (port_HAS_COMMON_IRQ_HANDLER > 0)
156 #if i_MCU_MODEL >= 2300
160 LDR
PC, [
PC, # -0x0120]
164 LDR
PC, [
PC, # -0x0FF0]
174 Undef_Addr: .word UNDEF_Handler
175 SWI_Addr: .word SWI_Handler
176 PAbt_Addr: .word PAbort_Handler
177 DAbt_Addr: .word DAbort_Handler
178 #if (port_HAS_COMMON_IRQ_HANDLER > 0)
179 IRQ_Addr: .word IRQ_Handler
181 FIQ_Addr: .word FIQ_Handler
182 #if (port_SELF_COPY_VECTORS != 0)
186 MEMMAP_ADDR: .word 0xE01FC040
194 #if (port_SELF_COPY_VECTORS != 0)
214 ADD
R14,#(copy_vectors_from_here -_vectors_here);
220 #if (port_HAS_COMMON_IRQ_HANDLER > 0)
251 LDM R0!,{R4,
R5-R7,R8,R10,R11,
SP}
252 SystemInit_Calculate_here:
256 #ifndef port_IS_LOADED_TO_RAM_BY_LOADER
307 #ifdef PORT_ARM_MAIN_MODE2
308 MSR
CPSR_c, #(PORT_ARM_MAIN_MODE2)
320 .ETEXT_VALUIE: .word _etext
321 .DATA_VALUIE: .word __data_start
322 .EDATA_VALUIE: .word __data_end
323 .BSS_START_VALUE: .word __bss_start
324 .BSS_END_VALUE: .word __bss_end
325 .MAIN_LONG_JUMP: .word
main