This helps if applications are started by a boot loader.
---
 bsps/arm/shared/start/start.S | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bsps/arm/shared/start/start.S b/bsps/arm/shared/start/start.S
index 50bf1d4841..bd623178ed 100644
--- a/bsps/arm/shared/start/start.S
+++ b/bsps/arm/shared/start/start.S
@@ -553,6 +553,14 @@ _start:
 #endif
 
        ldr     sp, =_ISR_Stack_area_end
+
+       /*
+        * Set the Main Stack Pointer (MSP) to the ISR stack area end just in
+        * case we run using the Process Stack Pointer (PSP).
+        */
+       mov     r0, sp
+       msr     msp, r0
+
        ldr     lr, =bsp_start_hook_0_done + 1
        b       bsp_start_hook_0
 
-- 
2.26.2

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to