VAR-SOM-MX7 FreeRTOS for M4 PingPong demo: Difference between revisions

From Variscite Wiki
 
Line 55: Line 55:
  Get Data From Master Side: 33
  Get Data From Master Side: 33
  Get Data From Master Side: 44
  Get Data From Master Side: 44
  ......
  ...


A video of the demo starting on our target is available here:
A video of the demo starting on our target is available here:


<youtube>9W3BGN568HY</youtube>
<youtube>9W3BGN568HY</youtube>

Latest revision as of 17:09, 2 February 2020

VAR-SOM-MX7 FreeRTOS for M4: RPMsg PingPong demo

Prerequisites

Before you begin, ensure to read Complete Developers Guide and follow sections 2,3 and 4.

Build the demo

cd ~/var-som-mx7_m4-freertos/freertos-variscite/examples/var-som-mx7_m4
cd demo_apps/rpmsg/pingpong_freertos
cd armgcc
export ARMGCC_DIR=~/var-som-mx7_m4-freertos/gcc-arm-none-eabi-5_4-2016q3
./build_all.sh > /dev/null

Copy the demo binary to the BOOT (FAT32) partition of the bootable SD card:

cp release/rpmsg_pingpong_freertos_example.bin /media/BOOT

Gracefully eject the SD card from your host machine, and plug it in the EVK.

Connect UART2 using pins J5.5 (RX) and J5.7 (TX) and configure the connection on your host PC as 115200 8N1 for the Cortex-M4 debug UART.
Connect a micro-USB cable to the DEBUG port and configure the connection on your host PC as 115200 8N1 for the regular (Cortex-A7) debug UART.
Power on the board and hit any key on the Cortex-A7 terminal to stop autoboot and get to the U-Boot command line.

Setup and save the U-Boot environment:

setenv use_m4 yes
setenv fdtfile undefined
setenv m4bootdata 0x007F8000
setenv m4image rpmsg_pingpong_freertos_example.bin
saveenv

Start Cortex-M4 demo

run m4boot

After the boot process succeeds, the Cortex-M4 terminal displays the following information:

RPMSG PingPong FreeRTOS RTOS API Demo...
RPMSG Init as Remote

Start Cortex-A7 core

run bootcmd

Then login from Yocto console and load the pingpong module:

modprobe imx_rpmsg_pingpong

After the Linux ping-pong master side module is installed, the Cortex-M4 terminal displays something like:

Name service handshake is done, M4 has setup a rpmsg channel [1 ---> 1024]
Get Data From Master Side: 0
Get Data From Master Side: 11
Get Data From Master Side: 22
Get Data From Master Side: 33
Get Data From Master Side: 44
...

A video of the demo starting on our target is available here: