提交 55263df8 编写于 作者: B bernard.xiong

fix the cm3 assemble function issue.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@121 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 2f55ad6e
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
* rt_base_t rt_hw_interrupt_disable(); * rt_base_t rt_hw_interrupt_disable();
*/ */
.global rt_hw_interrupt_disable .global rt_hw_interrupt_disable
.type rt_hw_interrupt_disable, %function
rt_hw_interrupt_disable: rt_hw_interrupt_disable:
MRS r0, PRIMASK MRS r0, PRIMASK
CPSID I CPSID I
...@@ -41,6 +42,7 @@ rt_hw_interrupt_disable: ...@@ -41,6 +42,7 @@ rt_hw_interrupt_disable:
* void rt_hw_interrupt_enable(rt_base_t level); * void rt_hw_interrupt_enable(rt_base_t level);
*/ */
.global rt_hw_interrupt_enable .global rt_hw_interrupt_enable
.type rt_hw_interrupt_enable, %function
rt_hw_interrupt_enable: rt_hw_interrupt_enable:
MSR PRIMASK, r0 MSR PRIMASK, r0
BX LR BX LR
...@@ -51,7 +53,9 @@ rt_hw_interrupt_enable: ...@@ -51,7 +53,9 @@ rt_hw_interrupt_enable:
* r1 --> to * r1 --> to
*/ */
.global rt_hw_context_switch_interrupt .global rt_hw_context_switch_interrupt
.type rt_hw_context_switch_interrupt, %function
.global rt_hw_context_switch .global rt_hw_context_switch
.type rt_hw_context_switch, %function
rt_hw_context_switch_interrupt: rt_hw_context_switch_interrupt:
rt_hw_context_switch: rt_hw_context_switch:
...@@ -80,6 +84,7 @@ _reswitch: ...@@ -80,6 +84,7 @@ _reswitch:
* psr, pc, lr, r12, r3, r2, r1, r0 are pushed into [from] stack * psr, pc, lr, r12, r3, r2, r1, r0 are pushed into [from] stack
*/ */
.global rt_hw_pend_sv .global rt_hw_pend_sv
.type rt_hw_pend_sv, %function
rt_hw_pend_sv: rt_hw_pend_sv:
/* disable interrupt to protect context switch */ /* disable interrupt to protect context switch */
MRS r2, PRIMASK MRS r2, PRIMASK
...@@ -118,6 +123,7 @@ swtich_to_thread: ...@@ -118,6 +123,7 @@ swtich_to_thread:
* r0 --> to * r0 --> to
*/ */
.global rt_hw_context_switch_to .global rt_hw_context_switch_to
.type rt_hw_context_switch_to, %function
rt_hw_context_switch_to: rt_hw_context_switch_to:
LDR r1, =rt_interrupt_to_thread LDR r1, =rt_interrupt_to_thread
STR r0, [r1] STR r0, [r1]
...@@ -142,6 +148,7 @@ rt_hw_context_switch_to: ...@@ -142,6 +148,7 @@ rt_hw_context_switch_to:
/* compatible with old version */ /* compatible with old version */
.global rt_hw_interrupt_thread_switch .global rt_hw_interrupt_thread_switch
.type rt_hw_interrupt_thread_switch, %function
rt_hw_interrupt_thread_switch: rt_hw_interrupt_thread_switch:
BX lr BX lr
NOP NOP
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
.text .text
.global rt_hw_hard_fault .global rt_hw_hard_fault
.type rt_hw_hard_fault, %function
rt_hw_hard_fault: rt_hw_hard_fault:
/* get current context */ /* get current context */
MRS r0, psp /* get fault thread stack pointer */ MRS r0, psp /* get fault thread stack pointer */
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
.thumb .thumb
.global g_pfnVectors .global g_pfnVectors
.global SystemInit_ExtMemCtl_Dummy
.global Default_Handler .global Default_Handler
/* start address for the initialization values of the .data section. /* start address for the initialization values of the .data section.
...@@ -48,7 +47,6 @@ defined in linker script */ ...@@ -48,7 +47,6 @@ defined in linker script */
.word _sbss .word _sbss
/* end address for the .bss section. defined in linker script */ /* end address for the .bss section. defined in linker script */
.word _ebss .word _ebss
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
.equ Initial_spTop, 0x20000400 .equ Initial_spTop, 0x20000400
.equ BootRAM, 0xF1E0F85F .equ BootRAM, 0xF1E0F85F
...@@ -65,10 +63,6 @@ defined in linker script */ ...@@ -65,10 +63,6 @@ defined in linker script */
.weak Reset_Handler .weak Reset_Handler
.type Reset_Handler, %function .type Reset_Handler, %function
Reset_Handler: Reset_Handler:
/* FSMC Bank1 NOR/SRAM3 is used for the STM3210E-EVAL, if another Bank is
required, then adjust the Register Addresses */
bl SystemInit_ExtMemCtl
/* restore original stack pointer */ /* restore original stack pointer */
LDR r0, =_estack LDR r0, =_estack
MSR msp, r0 MSR msp, r0
...@@ -104,16 +98,6 @@ LoopFillZerobss: ...@@ -104,16 +98,6 @@ LoopFillZerobss:
bx lr bx lr
.size Reset_Handler, .-Reset_Handler .size Reset_Handler, .-Reset_Handler
/**
* @brief Dummy SystemInit_ExtMemCtl function
* @param None
* @retval : None
*/
.section .text.SystemInit_ExtMemCtl_Dummy,"ax",%progbits
SystemInit_ExtMemCtl_Dummy:
bx lr
.size SystemInit_ExtMemCtl_Dummy, .-SystemInit_ExtMemCtl_Dummy
/** /**
* @brief This is the code that gets called when the processor receives an * @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving * unexpected interrupt. This simply enters an infinite loop, preserving
...@@ -468,7 +452,3 @@ g_pfnVectors: ...@@ -468,7 +452,3 @@ g_pfnVectors:
.weak DMA2_Channel4_5_IRQHandler .weak DMA2_Channel4_5_IRQHandler
.thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler .thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler
.weak SystemInit_ExtMemCtl
.thumb_set SystemInit_ExtMemCtl,SystemInit_ExtMemCtl_Dummy
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册