You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Targeted HardwarephyCORE-i.MX7, phyBOARD-Zeta i.MX7
Targeted Softwarei.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

  1. Download image and add to Boot partition of SD card.
  2. 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.
  3. Connect a serial cable from UART2 RS232 DB-9 connector on the evaluation board to your host PC.
  4. 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) 
  5. Set the boot switch located on the underside of the board to boot from SD (See quickstart for more info).
  6. Power on the board. Press the power button if board doesn't automatically boot.
  7. Press any key to stop autoboot and enter U-Boot.
  8. 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
  9. You should see the following appear in the serial terminal connected to UART2:
    <picture>

  10. Now boot Linux on the Cortex-A7.

    boot
  11. 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
  12. You can now echo content to /dev/ttyRPMSG and it will be received by the M4 and printed on the FreeRTOS serial console.
  13. 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

  • No labels