ARMv8-M-ML-ALT crash Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
wild-boar
Posts: 17
Joined: Thu May 08, 2014 11:58 pm
Been thanked: 9 times

ARMv8-M-ML-ALT crash

Post by wild-boar »

I experimented with ARMv8-M-ML-ALT and it would not bootup on a STM32U385.

My options to reproduce is: PORT_USE_SYSCALL=FALSE, CORTEX_USE_FPU=TRUE, and CH_DBG_ENABLE_STACK_CHECK=TRUE

Here is a patch to fix the problem:

Code: Select all

diff --git a/os/common/ports/ARMv8-M-ML-ALT/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv8-M-ML-ALT/compilers/GCC/chcoreasm.S
index 5fe8fba3e..fbc13c230 100644
--- a/os/common/ports/ARMv8-M-ML-ALT/compilers/GCC/chcoreasm.S
+++ b/os/common/ports/ARMv8-M-ML-ALT/compilers/GCC/chcoreasm.S
@@ -285,6 +285,9 @@ SVC_Handler:
 .Lctxswitch:
                 /* SVC called from privilege mode for context switch.*/
 #else
+#if PORT_SAVE_CONTROL
+                mrs     r12, CONTROL
+#endif
                 mrs     r2, PSP             /* Position of the exc.frame.*/
 #endif
                 /* Retrieving pointers to old and new context from the


Thanks!
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ARMv8-M-ML-ALT crash

Post by Giovanni »

Hi

Fixed, thanks for finding, this was critical.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ARMv8-M-ML-ALT crash

Post by Giovanni »

There are probably more problems with both -ALT ports, working on it.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ARMv8-M-ML-ALT crash

Post by Giovanni »

There were a couple of other regressions, now both ALT ports should be fine.

Giovanni
Post Reply