Build and run firmware
This page rebuilds the same TI example that the image ships, ipc_rpmsg_echo_linux, and loads your build on the MCU R5F. When the log shows your build time, the whole tool chain, from compiler to remoteproc, is working. The MCU console then adds your own code.
The example is the reference for Linux interworking in the TI guide (IPC RP Message Linux Echo). On start-up it waits for Linux, announces two endpoints, and echoes every message it receives:
| Endpoint | Service name announced to Linux | Used by |
|---|---|---|
| 13 | ti.ipc4.ping-pong | Linux kernel test driver |
| 14 | rpmsg_chrdev | Linux user space through /dev/rpmsg* |
It also implements TI's graceful shutdown: when Linux stops the core, the firmware closes its drivers, acknowledges, and halts. Keep that code in your own firmware.
Build on the host
Build the MCU R5F FreeRTOS project with the SDK makefile:
cd ~/ti/mcu_plus_sdk_am62ax_11_01_00_16
make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am62ax-sk/mcu-r5fss0-0_freertos/ti-arm-clang \
all PROFILE=release
The last lines of the build output:
Linking: am62ax:mcu-r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out Done !!!
Boot image: am62ax:mcu-r5fss0-0:freertos:ti-arm-clang .../ipc_rpmsg_echo_linux.release.appimage Done !!!
Boot image: am62ax:mcu-r5fss0-0:freertos:ti-arm-clang .../ipc_rpmsg_echo_linux.release.appimage.hs_fs Done !!!
SysConfig also prints The device AM62A7-Q1 has been automatically selected; the SDK examples name that part number, and the warning does not affect the build.
The ti-arm-clang folder now holds several images. For Linux, use ipc_rpmsg_echo.mcu-r5f0_0.release.strip.out, a 54 KB ELF file without debug sections:
| File | Size | Use |
|---|---|---|
ipc_rpmsg_echo.mcu-r5f0_0.release.strip.out | 54164 bytes | Load from Linux (this page) |
ipc_rpmsg_echo_linux.release.out | about 515 KB, depends on the install path | Same program with symbols, for CCS debugging |
*.appimage, *.rprc | TI secondary boot loader flows; not used with Linux |
PROFILE=debug also works and keeps assertions and symbols for CCS debugging. Building an example does not rebuild the SDK libraries; run make -s libs PROFILE=release first only if you change library sources.
Copy the firmware to the board
Install the new image under its own name, so the image's default file stays untouched:
scp examples/drivers/ipc/ipc_rpmsg_echo_linux/am62ax-sk/mcu-r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo.mcu-r5f0_0.release.strip.out \
YOUR_USERNAME@BOARD_HOSTNAME.local:/tmp/
On the board:
sudo install -m 0644 /tmp/ipc_rpmsg_echo.mcu-r5f0_0.release.strip.out /lib/firmware/mo62a-mcu-r5f-echo.out
Load it on the MCU R5F
A firmware name can only be changed while the core is stopped. Select the core by name, then stop, switch and start it:
MCU=$(grep -l '^79000000.r5f$' /sys/class/remoteproc/remoteproc*/name | xargs dirname)
echo stop | sudo tee "$MCU/state"
echo -n mo62a-mcu-r5f-echo.out | sudo tee "$MCU/firmware"
echo start | sudo tee "$MCU/state"
cat "$MCU/state" "$MCU/firmware"
stop
mo62a-mcu-r5f-echo.out
start
running
mo62a-mcu-r5f-echo.out
sudo dmesg shows the core stopping, the new image booting, and the two endpoints that the firmware announces:
remoteproc remoteproc1: stopped remote processor 79000000.r5f
remoteproc remoteproc1: powering up 79000000.r5f
remoteproc remoteproc1: Booting fw image mo62a-mcu-r5f-echo.out, size 54164
rproc-virtio rproc-virtio.7.auto: assigned reserved memory node r5f-dma-memory@9b800000
virtio_rpmsg_bus virtio0: rpmsg host is online
remoteproc remoteproc1: remote processor 79000000.r5f is now up
virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd
virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe
The unmodified TI example synchronizes with the DM R5F and C7x every time it starts. On Mo62A image V1.1.0 the fifth start of the MCU R5F after a board boot hung in that step in all three of our tests, twice with the stock firmware and once with a modified build. Linux then cannot stop the core and the board must be rebooted. Use it to check your tool chain, then base your own firmware on the MCU console, which removes this synchronization. Details are in Known issues.
The firmware value written here lasts until the next reboot; the board then boots the image default again. To make your firmware the default, see Make the change persistent.
Only operate on 79000000.r5f. Stopping 78000000.r5f (Device Manager) or 7e000000.dsp (C7x, used by AI) disrupts system services; see Overview.
Read the firmware log
DebugP_log() output from the firmware goes to a ring buffer in shared memory that Linux exposes through debugfs. Reading it needs root:
sudo cat /sys/kernel/debug/remoteproc/${MCU##*/}/trace0
[mcu-r5f0-0] 0.000495s : [IPC RPMSG ECHO] Version: REL.MCUSDK.K3.11.01.00.16+ (Oct 21 2026 13:46:57):
[mcu-r5f0-0] 0.006041s : [IPC RPMSG ECHO] Remote Core waiting for messages at end point 13 ... !!!
[mcu-r5f0-0] 0.011011s : [IPC RPMSG ECHO] Remote Core waiting for messages at end point 14 ... !!!
The first line shows the SDK version and the time of your build, so you can tell your image from the shipped one (11.01.00.03, Jun 16 2025 08:51:33). The two "waiting for messages" lines mean the firmware reached its receive loop. The buffer is about 1 MiB and wraps; it is a development aid, not a persistent log. Do not log from interrupt handlers (TI: log calls there have no effect) or on every message in a time-critical path.
Confirm that Linux can talk to it
When the firmware announces its endpoints, Linux creates RPMsg channels for it. Find the ones that belong to the MCU R5F:
for d in /sys/bus/rpmsg/devices/*; do
case "$(readlink -f "$d")" in *79000000.r5f*) echo "${d##*/}";; esac
done
virtio0.rpmsg_chrdev.-1.14
virtio0.rpmsg_ctrl.0.0
virtio0.rpmsg_ns.53.53
virtio0.ti.ipc4.ping-pong.-1.13
Then run the message test from Linux communication. With this build it passed 1000/1000 messages, median round trip 38.0 µs.
Make the change persistent
At boot, Linux starts the MCU R5F with /lib/firmware/am62a-mcu-r5f0_0-fw, which in the image is a link to /opt/ti/firmware/am62a-mcu-r5f0_0-fw. To boot your firmware by default, point the link at your file. This example uses the MCU console firmware, which is suitable for repeated reloads:
sudo ln -sfn /lib/firmware/mo62a-mcu-console.out /lib/firmware/am62a-mcu-r5f0_0-fw
sudo reboot
After the reboot sudo dmesg shows the size of your image, and the firmware answers:
remoteproc remoteproc1: Booting fw image am62a-mcu-r5f0_0-fw, size 59316
$ sudo mcu-console version
Mo62A MCU console, REL.MCUSDK.K3.11.01.00.16+, built Oct 21 2026 13:52:25, 800000000 Hz
Leave /opt/ti/firmware/am62a-mcu-r5f0_0-fw itself unchanged, so that restoring only resets the link. Both directions were tested with a reboot. Image updates may replace these links.