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

From Variscite Wiki
No edit summary
Line 12: Line 12:
  ./build_all.sh > /dev/null
  ./build_all.sh > /dev/null


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


  cp release/rpmsg_pingpong_freertos_example.bin /media/BOOT
  cp release/rpmsg_pingpong_freertos_example.bin /media/BOOT


Gracefully eject the SD card from host machine, plug it in the EVK.
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) as 115200 8N1 for Cortex-M4 debug UART.
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 on the board and stop the boot process pressing "Enter" key.
Power on the board and hit any key on the Cortex-A7 console to stop autoboot and getting to the U-Boot command line.


Setup and save uboot environment:
Setup and save the U-Boot environment:


  setenv use_m4 yes
  setenv use_m4 yes

Revision as of 16:54, 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 console to stop autoboot and getting 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: