Load binary to Cortex M7 on SMARC iMX95

Hi,

I am evaluating following platform

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.6.119-7.5.0-ge5c5595adb06 #1-Torizon SMP PREEMPT Mon Jan  5 09:23:13 UTC 2026
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/0e04d6a836820d69d53314be9f582fb62fb9e703263185d50425d019887e7e7b/0
Distro name:              NAME="Torizon OS"
Distro version:           VERSION_ID=7.5.0-build.30
Distro variant:           VARIANT="Docker"
Hostname:                 toradex-smarc-imx95-12594759
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex SMARC iMX95 on Toradex SMARC Development Board
Toradex version:          0096 V1.1A
Serial number:            12594759
Processor arch:           aarch64
------------------------------------------------------------

I’m trying to load compiled hello world binary into Cortex-M similarly as in How to Load Compiled Binaries into Cortex-M | Toradex Developer Center but SMARC family is not covered in the tutorial.

I was trying to follow the approach with remoteproc from Loading Zephyr on iMX95 Cortex-M from Linux with OpenAMP but I got stuck on this step:

root@imx95-19x19-verdin:~# cd /sys/devices/platform/imx95-cm7/remoteproc/remoteproc1/ 
root@imx95-19x19-verdin:~# echo ~/zephyr.elf > firmware 

/sys/devices/platform/imx95-cm7 is not available on my device. I can only see /sys/devices/platform/imx95-soc/

How can I load a binary to Cortex M7 processor on this device?

smarc-imx95 smarc

Hi, I’m the Toradex AI Assistant.

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


Torizon OS 7.5.0-build.30 on the SMARC iMX95 supports Heterogeneous Multi-core Processing (HMP) for running applications on the Cortex-M7 core (1). The SMARC iMX95 includes dual Cortex-M processors (Cortex-M7 and Cortex-M33) for real-time applications (2).

Using RemoteProc Framework

For the SMARC iMX95, you should use the RemoteProc framework to load and control the Cortex-M7 core (3). The remote processor framework serves as a robust solution for managing remote processor devices within modern System-on-Chips (SoCs) and is particularly geared towards heterogeneous multicore processing (HMP) setups (3).

Setting Up RemoteProc

First, check if RemoteProc is available on your system (3):

# dmesg | grep -E "remote|rproc"
[    1.629455] remoteproc remoteproc0: imx-rproc is available

The RemoteProc functionality should be available through the sysfs interface (3):

# ls /sys/class/remoteproc/remoteproc0/
consumers  device     firmware   name       power      state      subsystem  suppliers  uevent

Loading Your Binary

To load your compiled hello world binary (3):

  1. Copy your ELF binary to the firmware location. Since Torizon OS has a read-only filesystem, copy it to /tmp/ and update the firmware path (3):
# echo -n /tmp/ > /sys/module/firmware_class/parameters/path
  1. Ensure the remote processor is offline (3):
# echo stop > /sys/class/remoteproc/remoteproc0/state
# cat /sys/class/remoteproc/remoteproc0/state
offline
  1. Load your firmware (make sure to use a *.elf file) (3):
# echo <your_binary>.elf > /sys/class/remoteproc/remoteproc0/firmware
  1. Start the remote processor (3):
# echo start > /sys/class/remoteproc/remoteproc0/state

You should see output similar to (3):

[12594.692880] remoteproc remoteproc0: powering up imx-rproc
[12594.698629] remoteproc remoteproc0: Booting fw image hello_world.elf, size 240736
[12594.706192] remoteproc remoteproc0: no dtb rsrc-table
[12594.761474] remoteproc remoteproc0: remote processor imx-rproc is now up

The use of *.elf binaries is only supported on RemoteProc, in other words, if you want to control the Cortex-M cores from the Linux side (3).

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.

Hello wborowiec,

On SMARC i.MX95 with Torizon OS 7.5, the sysfs layout is slightly different from the one shown in the Zephyr blog, which is based on another i.MX95 board/device tree. That’s why /sys/devices/platform/imx95-cm7/... does not exist on your system.

On SMARC i.MX95, the Cortex‑M7 is described in the device tree as:

cm7: remoteproc-cm7 {
compatible = "fsl,imx95-cm7";
...
};

This node is a child of the imx95-soc SoC node, so at runtime it appears under …/imx95-soc/… instead of …/imx95-cm7/…. The recommended, board‑independent interface is the remoteproc class in /sys/class/remoteproc.

Please try the following on your SMARC i.MX95:
1- Identify the Cortex‑M7 remoteproc:

ls /sys/class/remoteproc

You should see something like:

/sys/class/remoteproc/remoteproc0: imx95-cm33
/sys/class/remoteproc/remoteproc1: imx95-cm7

In this case, remoteproc1 is the Cortex‑M7.

2- Load your ELF to the M7 using remoteproc1:

# point firmware loader to /tmp (or another writable dir)
echo -n /tmp/ > /sys/module/firmware_class/parameters/path

# copy your ELF
cp /path/to/zephyr.elf /tmp/

# stop the M7 (if running)
echo stop > /sys/class/remoteproc/remoteproc1/state || true

# select the firmware
echo zephyr.elf > /sys/class/remoteproc/remoteproc1/firmware

# start the M7
echo start > /sys/class/remoteproc/remoteproc1/state

So, instead of /sys/devices/platform/imx95-cm7/remoteproc/remoteproc1/... from the blog, on SMARC i.MX95 you should use /sys/class/remoteproc/remoteproc1/..., which targets the same Cortex‑M7 core on your platform.

If you share the output of the remoteproc commands above, we can double‑check that your remoteproc1 is indeed mapped to the M7 on your board.

Hi Diego,

thank you for the reply. The thing is, my default Torizon OS installation is missing remoteproc1:

torizon@toradex-smarc-imx95-12594759:~$ ls /sys/class/remoteproc/
remoteproc0

I applied this patch to device tree and it enabled remoteproc1. However, when trying to load a hello world binary with

echo -n /var/rootdirs/home/torizon/ > /sys/module/firmware_class/parameters/path
echo hello_world_cm7.elf > /sys/class/remoteproc/remoteproc1/firmware
echo start > /sys/class/remoteproc/remoteproc1/state

for ELF with load address 0x90000000 I get:

[  748.321650] remoteproc remoteproc1: header-less resource table
[  748.327793] remoteproc remoteproc1: bad phdr da 0x90000000 mem 0x64c
[  748.334173] remoteproc remoteproc1: Failed to load program segments: -22
[  748.341149] remoteproc remoteproc1: Boot failed: -22

For load address 0x80000000 I get kernel panic:

[ 1710.225087] remoteproc remoteproc1: header-less resource table
[ 1710.231172] SError Interrupt on CPU2, code 0x00000000be000011 -- SError
[ 1710.231187] CPU: 2 PID: 1057 Comm: bash Tainted: G   M       O       6.6.119-7.5.0-ge5c5595adb06 #1-Torizon
[ 1710.231202] Hardware name: Toradex SMARC iMX95 on Toradex SMARC Development Board (DT)
[ 1710.231210] pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 1710.231224] pc : __memcpy+0x14c/0x260
[ 1710.231249] lr : rproc_elf_load_segments+0x20c/0x25c
[ 1710.231269] sp : ffffffc081fb3b60
[ 1710.231275] x29: ffffffc081fb3ba0 x28: 000000000000064c x27: 0000000000001000
[ 1710.231299] x26: 000000000000064c x25: ffffffc085001034 x24: ffffff80837b5ea0
[ 1710.231319] x23: 0000000000000020 x22: 0000000000000003 x21: 0000000000000001
[ 1710.231338] x20: 0000000080000000 x19: 0000000000000000 x18: fffffffffffd0118
[ 1710.231358] x17: 6973202c666c652e x16: 376d635f646c726f x15: 0000000000000040
[ 1710.231377] x14: 0000000000000000 x13: 800009b1800009ad x12: 800009a9800009a5
[ 1710.231397] x11: 80000925800009a1 x10: 8000099d80000925 x9 : 8000099980000995
[ 1710.231416] x8 : 8000099180000925 x7 : 8000092580000925 x6 : 800009b9800009b5
[ 1710.231436] x5 : ffffffc08200064c x4 : ffffffc08500264c x3 : ffffffc082000100
[ 1710.231455] x2 : 00000000000004bc x1 : ffffffc085002140 x0 : ffffffc082000000
[ 1710.231476] Kernel panic - not syncing: Asynchronous SError Interrupt
[ 1710.231484] SMP: stopping secondary CPUs
[ 1710.231617] Kernel Offset: 0x130dc00000 from 0xffffffc080000000
[ 1710.231625] PHYS_OFFSET: 0x80000000
[ 1710.231630] CPU features: 0x0,c0000001,40028143,1000720b
[ 1710.231639] Memory Limit: none

How can I fix it?
smarc smarc-imx95

Hi wborowiec,

I investigated internally and this is a known limitation; Toradex is currently working on full Cortex‑M7 support for i.MX95 (including SMARC) and the patch is in test and will be released soon.

Until that release is available, there is unfortunately no reliable way to fix this just by changing the ELF load address or applying a single DT patch. For production use I would recommend waiting for the image where this issue is marked as done and listed in the release notes.

Hi Diego,

thank you for the update. Is there any ETA for the release? Or can it be tracked anywhere?

Hi wborowiec,

it is currently in testing, so it should definitely be included in our next quarterly release. You can follow our quarterly, monthly, and nightly releases here:

We strongly recommend that our customers use the quarterly releases for both development and production. However, as in your case, some features are only available in the monthly and nightly releases.

Best regards,

Hi Diego,

does it mean 7.6.0-devel-20260310+build.415for SMARC iMX95 has the fix and I can test it myself?

Regards,
wborowiec

Hi wborowiec,

Apologies for not sharing our release notes page earlier. You can find it here: https://www.toradex.com/news

Currently, the fix is not yet available in the pre-release versions, but you can keep an eye on that page for updates as soon as it is deployed.

Best regards,