This three-part series provides hands-on instruction on how to build and run SDK sample code for the Cortex-M33 core in the NXP i.MX 93 applications processor .
In this second article, we will explain how to run a pre-built M core image on an evaluation board using U-Boot and remoteproc .
There are two ways to run an M33 core image from A55: "running from U-Boot" and "running from remoteproc," as shown in the figure below.
Now, I'll explain each method.
As stated in the ARM documentation below, M33 code must be run in Privileged/Secure mode.
The Cortex-M33 processor supports Secure and Non-secure security states, Thread and Handler operating modes, and can run in either Thumb or Debug operating states. In addition, the processor can limit or exclude access to some resources by executing code in privileged or unprivileged mode.
Code can execute as privileged or unprivileged. Unprivileged execution limits or excludes access to some resources appropriate to the current security state. Privileged execution has access to all resources available to the security state. Handler mode is always privileged. Thread mode can be privileged or unprivileged.
Check the address map of the i.MX 93 TCM (Tightly Coupled Memory) area and organize the access addresses from the Cortex-M33 and Cortex-A55.
The following is an excerpt from the i.MX 93 Applications Processor Reference Manual :
0x1FFE00000x201E0000*For details, please refer to the following section in the i.MX 93 Applications Processor Reference Manual.
" 2.2 System memory map used by all initiators other than the Cortex-M33 core "
" 2.3 System memory map (Cortex-M33)"
This article explains how to write the M core image to an SD card using the uuu tool or the Ubuntu cp command . For
more information, please also refer to the article " How to build a Linux BSP and write the generated image to the target board ."
① Set BOOT_MODE to "Cortex-A55 USDHC1 8-bit eMMC 5.1 [0100]" and start U-Boot.
②Start fastboot with U-Boot
Uboot=> fastboot 0
[ Tip ] : "fastboot 0" is a convenient command that allows you to switch to USB Serial Loader mode without changing the DIP SW.
③ Write to the SD card from the host PC with uuu -b fat_write
$ uuu -b fat_write power_mode_switch_rtos_imx93.bin mmc 1:1 power_mode_switch_rtos_imx93.bin
Use an SD card reader and copy directly to the FAT partition
$ cp power_mode_switch_rtos_imx93.bin /media/xxx/boot
$ cp power_mode_switch_rtos_imx93_cm33.elf /media/xxx/boot
This article explains how to load the M33 image on U-Boot and run it with the bootaux command. It also includes setting environment variables before starting Linux.
① Load the M33 image with U-Boot and run it
u-boot=> fatload mmc 1:1 ${loadaddr} power_mode_switch_rtos_imx93.bin
36484 bytes read in 6 ms (5.8 MiB/s)
u-boot=> cp.b ${loadaddr} 0x201e0000 ${filesize}
u-boot=> bootaux 0x1ffe0000 0
## Starting auxiliary core addr = 0x1FFE0000...
② Before starting Linux, run prepare_mcore in U-Boot and add clk_ignore_unused to the U-Boot mmcargs environment variable.
u-boot=>run prepare_mcore
u-boot=>setenv mmcargs setenv bootargs ${jh_clk} ${mcore_clk} clk_ignore_unused console=${console} root=${mmcroot}
③ Start Linux
u-boot=>boot
The following will be displayed on the M33 terminal.
By performing the suspend/wakeup operation on the A55, you can check the cooperation with the M33.
On the A55, suspend it by running:
root@imx93frdm:~# echo mem > /sys/power/state
Enter the "W" command on the M33 to wake up the A55:
Confirmed return of A55:
remoteproc (Remote Processor Framework) is a mechanism that allows the Linux kernel to control remote processors such as the Cortex-M33. It allows the M33 firmware to be loaded, started, and stopped from Linux, enabling flexible system design in multi-core SoCs.
With i.MX 93, remoteproc allows you to dynamically control the M33 from Linux, enabling designs that separate and execute real-time processing and safety functions.
| function | explanation |
| Loading Firmware | Loads an ELF binary into the specified memory location. |
| Processor start/stop | Start/stop control |
| Resource Management | Shared memory and communication channel configuration using resource_table |
| IPC Collaboration | Message communication between Linux and M33 using rpmsg |
| component | explanation |
| /lib/firmware/ | M33 firmware location directory |
| resource_table | Resource information structure in firmware |
| remoteproc driver | Control driver in the Linux kernel (e.g. imx_rproc) |
| sysfs interface | Can be controlled by /sys/class/remoteproc/remoteprocX/ |
Learn how to load, run, and stop M33 images using the remoteproc framework
① Run prepare_mcore in U-Boot , add clk_ignore_unused to the U-Boot mmcargs environment function, and start Linux.
u-boot=>run prepare_mcore
u-boot=>setenv mmcargs setenv bootargs ${jh_clk} ${mcore_clk} clk_ignore_unused console=${console} root=${mmcroot}
u-boot=>boot
② After booting Linux, copy the M33 image to /lib/firmware/
root@imx93frdm:~# mount /dev/mmcblk1p1 /mnt
root@imx93frdm:~# cp /mnt/power_mode_switch_rtos_imx93_cm33.elf /lib/firmware/
③ Specify the firmware to remoteproc
root@imx93frdm:~# echo /lib/firmware/power_mode_switch_rtos_imx93_cm33.elf >/sys/devices/platform/remoteproc-cm33/remoteproc/remoteproc0/firmware
④ Start the M33 image
root@imx93frdm:~# echo start > /sys/devices/platform/remoteproc-cm33/remoteproc/remoteproc0/state
The following will be displayed in the M33 terminal.
⑤Stop the execution of the M33 image from remoteproc.
root@imx93frdm:~# echo stop > /sys/devices/platform/remoteproc-cm33/remoteproc/remoteproc0/state
In this article, we introduced the steps to run a pre-built M core image on the FRDM-i.MX93 evaluation board using U-Boot and remoteproc .
In the next article, we will explain how to automatically start these binaries using the bootloader .
→ Next time : [ Part 3] Automatic startup of M-core using bootloader
○ This time : [Part 2] M-core execution using U-Boot and remoteproc (this article)
===========================
We are currently unable to respond to comments in the " Comment " section of this post .
We apologize for the inconvenience, but when making inquiries, please refer to " How to contact NXP with technical questions ( Japanese blog ) " .
(If you are already an NXP distributor or have a relationship with NXP , you may contact the person in charge directly. )
This series will cover three hands-on articles that explain how to build and run SDK sample code for the Cortex-M33 core in i.MX 93 using the low-cost, compact development board, the FRDM i.MX 93 Development Board .