I’m attempting to run two Cortex M4s and Linux (Yocto BSP 7.2) simultaneously. On the M4s, I have a simple example that prints text on the debug consoles in a loop (hello world). I’ve applied the two overlays mentioned at How to Run Hello World on the Cortex-M | Toradex Developer Center.
Here’s a breakdown of the overlay application process:
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?
Hello Florin,
Thank you for your detailed description. What you’re experiencing is a known issue when running both Cortex-M4s and Linux with BSP 7.x (Linux kernel 6.6) on the Apalis iMX8 platform. Community reports confirm that with BSP 7.x, attempting to launch both Linux and M4 firmware together can cause faults (notably, a reboot with a reported SCFW fault), making the M4 cores stop running after Linux boots (1).
Advice and Recommended Solutions:
Use BSP 6.x (Linux kernel 5.15):
BSP 6 has been reported to work reliably for concurrent execution of Linux and both M4 cores. If your use-case requires both Linux and M4 to run together, it is strongly recommended to use BSP 6.x for the time being.
Device Tree Overlays:
It looks like your overlays are being correctly applied. For reference on custom overlays, you can see the documentation here: Development: Writing a Custom DTO
Test M4 Standalone First:
To ensure your firmware is functional, you can initially boot only the M4 cores without Linux, verify their operation, and then introduce Linux (on BSP 6) for parallel operation.
Summary:
Due to a confirmed issue with the current BSP 7.x (kernel 6.6), running both Linux and the M4s simultaneously is not stable on the Apalis iMX8. For consistent operation, please downgrade to BSP 6.x. If you need to continue with the latest BSP, be aware that the issue is under investigation and a stable solution is not yet available.
This page and these overlays were tested on BSP 6, so to make it work for BSP 7 you may need to tweak it a bit.
If you are running the hello world inside the loop example.
The M4 core is actually still running your script and printing it, but the UART pin is claimed by A-core Linux, so the M4 core can’t really write the print values.