From 92d4c1939b6e68975698f751e617f6c46c7bb95e Mon Sep 17 00:00:00 2001 From: weety Date: Tue, 2 Apr 2013 20:23:11 +0800 Subject: [PATCH] fixed at91sam9260 context thread issue, avoid idle thread stack overflow --- libcpu/arm/at91sam926x/context_gcc.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcpu/arm/at91sam926x/context_gcc.S b/libcpu/arm/at91sam926x/context_gcc.S index e53e1260dd..30d8235331 100755 --- a/libcpu/arm/at91sam926x/context_gcc.S +++ b/libcpu/arm/at91sam926x/context_gcc.S @@ -59,9 +59,9 @@ rt_hw_context_switch: ldmfd sp!, {r4} @ pop new task spsr msr spsr_cxsf, r4 ldmfd sp!, {r4} @ pop new task cpsr - msr cpsr_cxsf, r4 + msr spsr_cxsf, r4 - ldmfd sp!, {r0-r12, lr, pc} @ pop new task r0-r12, lr & pc + ldmfd sp!, {r0-r12, lr, pc}^ @ pop new task r0-r12, lr & pc /* * void rt_hw_context_switch_to(rt_uint32 to); -- GitLab