Page 1 of 1

ARMv8-M-ML-ALT crash

Posted: Wed Dec 31, 2025 5:31 pm
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!

Re: ARMv8-M-ML-ALT crash

Posted: Thu Jan 01, 2026 10:10 am
by Giovanni
Hi

Fixed, thanks for finding, this was critical.

Giovanni

Re: ARMv8-M-ML-ALT crash

Posted: Sun Jan 04, 2026 5:36 pm
by Giovanni
There are probably more problems with both -ALT ports, working on it.

Giovanni

Re: ARMv8-M-ML-ALT crash

Posted: Tue Jan 06, 2026 6:52 am
by Giovanni
There were a couple of other regressions, now both ALT ports should be fine.

Giovanni