Apalis M4 and TorizonOS

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Cortex-M4 and Linux Conflict Resolution

Based on the available documentation and community discussions, the issue you’re experiencing where the Cortex-M4 stops when Linux boots is a common problem in Heterogeneous Multicore Processing environments. Here are the key areas to address:

Resource Domain Controller (RDC) Configuration

The Resource Domain Controller is crucial for preventing conflicts between the A-cores and M-cores (1). The RDC controls access to peripherals and memory areas for individual bus masters. By default, both the A7 and M4 cores start in domain 0, but the M4 should be reassigned to domain 1 along with its required peripherals (1).

Device Tree Modifications Required

For proper HMP operation, you need to ensure proper memory buffer allocation for RPMsg communication (2). The device tree overlays must configure:

  • Correct RAM buffer allocation
  • VRING base addresses
  • Resource table memory locations

Critical Linux Kernel Parameters

Recent community reports indicate that on newer TorizonOS versions, you may need to add specific kernel command line arguments to prevent Linux from interrupting the M-core during boot (3). Without these parameters, the Linux kernel can take over the M4 core, causing it to stop functioning.

Peripheral Conflict Resolution

When a peripheral is used by the Cortex-M4, it must be completely disabled in the Linux device tree (1). For any device that should be used on the Cortex-M4 which is also used by the Linux kernel, you must set the status property to disabled in the device tree.

Memory Areas and Linker Configuration

Ensure your firmware is properly linked to run in the appropriate memory area (typically TCM for most examples) (1). The memory addresses used in your U-Boot loading commands must match the addresses specified in your device tree overlay and firmware linker scripts.

Recommended Troubleshooting Steps

  1. Verify M4 Debug Output: Connect to the M4 debug UART to monitor if the firmware continues running after Linux boot
  2. Check RPMsg Initialization: Look for proper RPMsg initialization messages on the M4 side
  3. Review Kernel Messages: Use dmesg | grep -i rpmsg to check for any conflicts or errors
  4. Validate Memory Configuration: Ensure the resource table and VRING addresses match between firmware and device tree

Unfortunately, I cannot review the specific device tree file you’ve uploaded, but the key is ensuring all peripherals used by the M4 are properly disabled in the Linux device tree and that the memory regions are correctly configured for RPMsg communication.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.