Colibri Module Cortex-M Firmware Loading Analysis
Based on your setup with bootcmd = 'run m4boot_0; run distro_bootcmd' and your Colibri module, let me provide specific guidance:
1. Memory Address Configuration
The fact that loadaddr and kernel_addr_r have the same value is actually normal in U-Boot environment (1). These variables serve different purposes:
loadaddr: Contains the memory address where data (e.g., kernel image) can be loaded (1)
kernel_addr_r: Contains the memory address where the kernel is loaded (1)
Both being set to the same value indicates they’re using the default load address for temporary operations.
2. Your Loading Method (Not EXT4LOAD)
Since you’re using run m4boot_0 in your bootcmd, you’re using the correct method for Colibri modules. This command is specifically designed for loading Cortex-M firmware (2). The m4boot_0 command loads and starts the Cortex-M application (2).
3. Resource Sharing Verification
For Colibri modules, particularly the iMX7, resource sharing is critical. Here’s how to verify:
Device Tree Configuration
Your firmware might be accessing peripherals that Linux also tries to use. For example, if your firmware uses UART_B, you need to disable it in the Linux device tree (3). This is done by setting the status property to disabled using device tree overlays (3).
Resource Domain Controller (RDC)
On iMX7-based Colibri modules, the Resource Domain Controller controls access to peripherals between cores (3):
- By default, the Cortex-A7 core is in domain 0 with all peripherals assigned to it (3)
- When FreeRTOS firmware starts, the Cortex-M4 reassigns itself and required peripherals to domain 1 (3)
4. Boot Sequence Analysis
Your bootcmd = 'run m4boot_0; run distro_bootcmd' configuration is correct (2). The sequence:
- Loads and starts Cortex-M firmware via
m4boot_0 (2)
- Proceeds with Linux boot via
distro_bootcmd (4)
Potential Issue: Firmware Initialization
Since your firmware works after the echo example but fails on cold boot, the issue likely lies in initialization differences between your firmware and the echo example. The echo example might be performing hardware initialization that your firmware depends on but doesn’t implement.
Troubleshooting Steps
Check Device Tree Conflicts
Ensure any peripherals your firmware uses are disabled in the Linux device tree (3). This prevents external aborts when Linux tries to access peripherals already claimed by the Cortex-M firmware.
Compare Initialization Sequences
The echo example likely performs proper hardware initialization that your firmware might be missing. Review your firmware’s hardware initialization against the echo example.
Verify Memory Areas
For Colibri iMX7, ensure your firmware is linked to run in the correct memory area (typically TCM) (3). All examples are linked to run in the TCM area (3).
Recommendation
Since you mentioned this firmware worked extensively with Yocto, the issue is likely related to different device tree configurations or hardware initialization sequences between Yocto and Torizon. Focus on:
- Comparing device tree configurations between your working Yocto setup and Torizon
- Ensuring proper peripheral disable/enable settings in the device tree
- Verifying your firmware performs all necessary hardware initialization
The boot sequence you’re using (run m4boot_0; run distro_bootcmd) is the standard and correct approach for Colibri modules (2).
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.