From a5eb02e2d0fc714070837d3c957152ab8eb85c38 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Tue, 30 Jun 2015 08:41:47 -0600 Subject: [PATCH] Fix Cortex-M0 assembly error when the interrupt stack is enabled --- arch/arm/src/armv6-m/up_exception.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/armv6-m/up_exception.S b/arch/arm/src/armv6-m/up_exception.S index 62cb7a2d68..f4e24cdce7 100644 --- a/arch/arm/src/armv6-m/up_exception.S +++ b/arch/arm/src/armv6-m/up_exception.S @@ -152,7 +152,8 @@ exception_common: */ #if CONFIG_ARCH_INTERRUPTSTACK > 3 - ldr sp, =g_intstackbase + ldr r7, =g_intstackbase /* R7=Base of the interrupt stack */ + mov sp, r7 /* Set the new stack point */ push {r1} /* Save the MSP on the interrupt stack */ bl up_doirq /* R0=IRQ, R1=register save area on stack */ pop {r1} /* Recover R1=main stack pointer */