|
@@ -12,12 +12,7 @@
|
|
|
* 2011-07-01 lgnq first version
|
|
|
*/
|
|
|
|
|
|
-.section .bss.init
|
|
|
-.equ Stack_Size, 0x00000200
|
|
|
-.space Stack_Size
|
|
|
-Initial_spTop:
|
|
|
-
|
|
|
- .syntax unified
|
|
|
+ .syntax unified
|
|
|
.cpu cortex-m3
|
|
|
.fpu softvfp
|
|
|
.thumb
|
|
@@ -48,13 +43,13 @@ defined in linker script */
|
|
|
* @retval : None
|
|
|
*/
|
|
|
|
|
|
- .section .text.Reset_Handler
|
|
|
+ .section .text.Reset_Handler
|
|
|
.weak Reset_Handler
|
|
|
.type Reset_Handler, %function
|
|
|
Reset_Handler:
|
|
|
/* restore original stack pointer */
|
|
|
- LDR r0, =Initial_spTop
|
|
|
- MSR msp, r0
|
|
|
+ ldr sp, =_estack /* set stack pointer */
|
|
|
+
|
|
|
/* Copy the data segment initializers from flash to SRAM */
|
|
|
movs r1, #0
|
|
|
b LoopCopyDataInit
|
|
@@ -107,13 +102,12 @@ Infinite_Loop:
|
|
|
* 0x0000.0000.
|
|
|
*
|
|
|
******************************************************************************/
|
|
|
- .section .isr_vector,"a",%progbits
|
|
|
+ .section .isr_vector,"a",%progbits
|
|
|
.type g_pfnVectors, %object
|
|
|
.size g_pfnVectors, .-g_pfnVectors
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
g_pfnVectors:
|
|
|
- .word Initial_spTop
|
|
|
+ .word _estack
|
|
|
.word Reset_Handler
|
|
|
.word NMI_Handler
|
|
|
.word HardFault_Handler
|