Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Hello, and thank you for your question!
To run a HelloWorld.bin on the Verdin iMX8M Plus M7 core and set up communication (GPIO, UART, SPI, and message exchange) between the Cortex-M7 and A53 cores, here’s a step-by-step path:
1. Download and Prepare the MCUXpresso SDK
-
Get the MCUXpresso SDK for your exact module variant:
- Quad:
MIMX8ML8xxxKZ
- QuadLite:
MIMX8ML4xxxKZ
- Download here: MCUXpresso SDK & Examples
- Quad:
-
Set up the GCC AArch32 bare-metal toolchain (recommended:
arm-none-eabi
).
2. Device Tree Configuration
Yes, device tree configuration is required!
- You must reserve memory for the M7 and setup RPMsg communication.
- Apply the official overlay:
verdin-imx8mm_hmp_overlay.dtbo
- Make sure the
imx rpmsg driver
is registered:dmesg | grep -i rpmsg [ 0.045742] imx rpmsg driver is registered.
More on overlays: Device Tree Overlay for M7/A53 Communication
3. Build Hello World for M7
-
In your MCUXpresso SDK, locate:
./boards/evkmimx8mp/demo_apps/hello_world/armgcc
-
Build:
export ARMGCC_DIR=<PATH_TO_GCC_TOOLCHAIN>/<GCC_TOOLCHAIN_FOLDER> cd ./boards/evkmimx8mp/demo_apps/hello_world/armgcc ./build_debug.sh
-
Copy the binary to your board (e.g., via scp):
scp debug/hello_world.bin root@<board-ip>:/home/root
4. Load & Run Firmware on M7
- In the U-Boot terminal, set up environment variables:
setenv load_cmd "ext4load mmc 0:2" setenv cm_image "/home/root/hello_world.bin" setenv cm_image_size 20000 setenv load_cm_image "${load_cmd} ${loadaddr} ${cm_image}" setenv cm_boot "${load_cm_image}; cp.b ${loadaddr} 0x7e0000 ${cm_image_size}; dcache flush; bootaux 0x7e0000" saveenv
- To start the firmware:
run cm_boot
Full steps: Freertos on iMX8MP M7 - Case Oriented Examples
5. A53 ↔ M7 Message Exchange (RPMsg)
-
Use the RPMsg examples in the SDK to establish communication:
./boards/evkmimx8mp/multicore_examples/rpmsg_lite_str_echo_rtos
-
On Linux, load the TTY kernel module:
sudo modprobe imx_rpmsg_tty ls /dev/ | grep -i rpmsg
You should see:
ttyRPMSG30
Use this for message exchange:
echo Toradex! > /dev/ttyRPMSG30
Reference: How to Establish Shared Memory Communication
6. Peripheral Support (GPIO, UART, SPI)
-
For GPIO: You may need a custom device tree overlay to reassign certain pins as GPIO (for pins with default I2C/SPI roles).
- More here: Configuring I2C Pins as GPIO
-
The MCUXpresso SDK contains example apps for GPIO, UART, and SPI under:
boards/evkmimx8mp/driver_examples
Use those as templates for your code running on the M7.
Summary Workflow:
- Download and build MCUXpresso SDK examples (Hello World, RPMsg, peripheral demos).
- Deploy your binaries to the board.
- Configure and apply proper overlays for memory and pinmuxing.
- Use U-Boot commands to run your M7 firmware.
- Set up RPMsg for inter-core messages.
- Develop your peripheral application based on SDK examples.
Feel free to ask if you need clarification on a specific part of the process or further details!
Best regards,
Toradex AI Assistant