Targeted Hardware | phyCORE-i.MX7, phyBOARD-Zeta i.MX7 |
---|---|
Targeted Software | i.MX7 ALPHA2 |
Date |
NXP FreeRTOS info
Demo: Send Command from Cortex-A7 (Linux) to Cortex-M4(FreeRTOS) to toggle GPIO
Running the Demo
Requirements
- SD card formatted with sdcard image from ALPHA2 release. Instructions for formatting here.
- Hardware set up as described in Getting Started section of Quickstart.
- PEB-EVAL-02 module required. Demo uses LED1 and debug UART2 for the Cortex-M4
Step-by-step guide
- Download image and add to Boot partition of SD card.
- A different DTS file is required that configures memory allocation, enables rpmsg bus, and disables UART2 in Linux. Download the dtb and copy it to the boot partition as well.
- Connect a serial cable from UART2 RS232 DB-9 connector on the evaluation board to your host PC.
- In your preferred terminal software (such as Minicom or TeraTerm) on your host PC, configure an additional terminal for UART2 with 115200 baud, 8 data bits, no parity, and 1 stop bit (8n1) ,no handshake. Note that UART5 should be connected as well and is the debug UART for Cortex-A7)
- Set the boot switch located on the underside of the board to boot from SD (See quickstart for more info).
- Power on the board. Press the power button if board doesn't automatically boot.
- Press any key to stop autoboot and enter U-Boot.
In U-Boot, type the following to load the application image from the SD card to TCM, flush cached content, and start the M4 demo.
fatload mmc 0:1 0x7F8000 <demo name> dcache flush bootaux 0x7F8000
You should see the following appear in the serial terminal connected to UART2:
<picture>Now boot Linux on the Cortex-A7.
boot
Type root to log in, and then load the kernel module imx_rpmsg_tty which will configure RPMSG on the A7.
modprobe imx_rpmsg_tty
- You can now echo content to /dev/ttyRPMSG and it will be received by the M4 and printed on the FreeRTOS serial console.
In order to toggle LED1 on the evaluation board, echo "led1" to /dev/ttyRPMSG:
echo "led1" > /dev/ttyRPMSG
Demo Source Code
Download FreeRTOS i.MX7 release from NXP.
Apply patch from Artifactory
Note: Supports GCC cmake
Additional Info
NXP Documentation