This document gives a more detailed introduction of MCAPI examples.
This example involves two following parts:
There are 3 MCAPI inter-operability demos included in the libmcapi tests, currently we only support msg demo:
There are 2 ways to load the MCAPI baremetal project: loaded by remoteproc and loaded by ICE1000 in CCES.
For more information about “loaded by Remoteproc”, please refer to Multicore loading using the Remoteproc
For more information about “loaded by ICE1000 in CCES”, please refer to Run Linux on ARM and bare-metal application on SHARC
The MCAPI example for ARM core (Running Linux) is included in the YOCTO, and you can get the MCAPI example for SHARC+ Cores from the gitbub lnxdsp-examples
The examples code in “lnxdsp-exmaples/mcapi/mcapi-message-example”. You'll find three folders which are for msg, sclchan and pktchan, each folder contains the baremetal mcapi cces projects for sc589, sc584 and sc573 boards, “Mcapi_Test_Core1.c” is the main application c file. You should use CCES to open and build the project, since we only support msg test example, we'll take the MCAPI Baremetal MSG test as the example in the next section.
The MCAPI example for ARM core (Running Linux) is included in the YOCTO through the package “libmcapi” demos can be found in “build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/libmcapi”, “arm_sharc_msg_demo.c” is the main application c file.
Once the linux boot finished, one command for MCAPI demo test can be found in linux, you are able to use “arm_sharc_msg_demo -h” to get more information about the command:
# arm_sharc_msg_demo -h Usage: arm_sharc_msg_demo <options> Available options: -h,--help this help -m,--mode select the mode: 0 --- nonblocking mode0(default) 1 --- nonblocking mode1 2 --- nonblocking mode2 3 --- blocking mode -t,--timeout timeout value in jiffies(default:5000) -r,--round number of test round(default:100)
“arm_sharc_msg_demo” shows the example use of blocking/nonblocking message send/receive between two different endpoints on different nodes, the endpoint of ARM sends a message then receives a message from another endpoint of CORE1 in one round, after comparing the receive data with the data you expect, the number of passed rounds will be increased, only when the passed rounds and the test rounds are equal, it'll give demo passed log.
Each mode means the different ways to do message transaction between two endpoints using different MCAPI APIs we supported, and you can choose the way by “-m”:
Options | Descrition |
---|
BACK TO Multi-Core Support