This is an old revision of the document!
This document introduces steps to run Linux on ARM core and SHARC baremetal application on SHARC+ cores(Core 1 & 2) by CrossCore Embedded Studio (CCES). Take the Linux MCAPI inter-operability demo example as a SHARC baremetal application.
MCAPI support the the ADSP-SC5xx series product:
Here we take ADSP-SC589 EZ-kit as our example.
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
v1.0.0
1.0.0
Git Usage
git clone https://bitbucket.analog.com/scm/dte/lnxdsp-examples.git cd lnxdsp-examples git branch -a git checkout -b develop/yocto-1.0.0 origin/develop/yocto-1.0.0 git pull
2.9.1
or later.Make sure the icc has been enabled by from the device tree file sc589-ezkit.dts/sc584-ezkit.dts/sc573-ezkit.dts/sc589-mini.dts under arch/arm/boot/dts.
&icc0 { status = "okay"; };
MCAPI lib is built on top of the ICC (Inter-Core Communications) device driver. Enable the ICC driver relevant operations in Linux kernel:
# bitbake linux-adi -c menuconfig
Device Drivers ---> [*] Staging drivers ---> [*] icc driver ---> [*] icc core control [*] icc protocol [ ] icc debug
Then run bitbake linux-adi -C compile to generate kernel image zImage and dtb file.
Add the mcapi package in the filesystem, it's enabled in adsp-sc5xx-full image by default.
vim build/conf/local.conf IMAGE_INSTALL_append = " libmcapi sc5xx-corecontrol"
Then run bitbake adsp-sc5xx-minimal -C compile or bitbake adsp-sc5xx-full -C compile to generate the filesystem.
A brief step to run multicore on the EZ-Kit board is showing as follows:
Please refer to the Installing Linux On The Hardware to load the built Linux into the target board:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@@@ @@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Analog Devices Yocto Distribution www.analog.com www.yoctoproject.org adsp-sc589-ezkit login: root Password: adi
Before running the mcapi example in CrossCore Embedded Studio, please follow the steps below to import and build it, now we take ADSP-SC589-EzKit as the example to demonstrate.
Step 1
Step 2
Step 3
Diagram 1 Import the MCAPI Example
Select the “Build Tool” to choose Debug/Release mode for building the target projects:
Diagram 2 Build Action - Build Mode Selection
Diagram 3 Build Action - Build Projects
Please follow the steps below to do debug configuration, download and run the built binary for SHARC Cores.
1. Connect ICE-1000/2000 JTAG emulator between the SC589-EZKIT and your PC
2. In the Project Explorer right click mcapi_send_recv_sc589_Core1 on the project and select the Debug As option from the menu.
3. From the popup menu select Debug Configurations option to create a new debug configuration that matches your emulator and target board
4. Remove the ARM core project from the debug configuration
5. Uncheck automaticlly setted breakpoints and disable semihosting in “Automatic Breakpoints” view of debug configuration.
6. Uncheck the debug target option “Halt core after connecting to target” for ARM core.
7. Start debug and wait for Linux to start core1.
In u-boot, enable SHARC core then boot linux
sc # icc enable 1
Or boot Linux, and then in Linux use the corecontrol utility to start the SHARC core:
# corecontrol --start 1
After running SHARC core, CCES halts in the first line of the application code on SHARC core 1.
Resume(F5) core 1 and continue running the application in CCES.
Now Linux is running on ARM core 0 while SHARC baremetal application is running on core 1.
Run 'arm_sharc_msg_demo' and 'arm_sharc_msg_test' command in Linux and the passed log in linux is showing as below.
root@adsp-sc589-ezkit:~# corecontrol --start 1 Test core 1 start Test core 1 end: 0 root@adsp-sc589-ezkit:~# corecontrol --start 2 Test core 2 start Test core 2 end: 0 root@adsp-sc589-ezkit:~# 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:10,000) -r,--round number of test round(default:100) -i,--remote_core_id number of remote core id: 0 ----- specify to use the two SHARC cores(default) 1 ----- specify the remote core is SHARC Core 1 2 ----- specify the remote core is SHARC Core 2 root@adsp-sc589-ezkit:~# arm_sharc_msg_demo -r 3 semget Thread [0] CHECK_STATUS---initialize:MCAPI_SUCCESS node=0, port=200 Thread [2] CHECK_STATUS---create_ep:MCAPI_SUCCESS Thread [2] local endpoint: c8 Thread [2] CHECK_STATUS---get_ep_i:MCAPI_PENDING node=2, port=6 Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] remote endpoint: 20006 Thread [2] send() start...... Thread [2] CHECK_STATUS---send_i:MCAPI_PENDING Thread [2] CHECK_STATUS---test:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of send() - endpoint=200 has sent: [hello core 2 messag from core 0 - 0] Thread [2] core0: mode(0) message send. The 0 time sending Thread [2] recv() start...... Thread [2] CHECK_STATUS---available:MCAPI_SUCCESS node=2, port=6 Thread [2] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of recv() - endpoint=200 size 0x48 has received: [hello core 0 message from core 2 - 1] Thread [2] core0: mode(0) message recv. The 0 time receiving Thread [2] send() start...... Thread [2] CHECK_STATUS---send_i:MCAPI_PENDING Thread [2] CHECK_STATUS---test:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of send() - endpoint=200 has sent: [hello core 2 messag from core 0 - 1] Thread [2] core0: mode(0) message send. The 1 time sending Thread [2] recv() start...... Thread [2] CHECK_STATUS---available:MCAPI_SUCCESS node=2, port=6 Thread [2] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of recv() - endpoint=200 size 0x48 has received: [hello core 0 message from core 2 - 2] Thread [2] core0: mode(0) message recv. The 1 time receiving Thread [2] send() start...... node=0, port=101 Thread [1] CHECK_STATUS---create_ep:MCAPI_SUCCESS Thread [1] local endpoint: 65 Thread [1] CHECK_STATUS---get_ep_i:MCAPI_PENDING node=1, port=5 Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] remote endpoint: 10005 Thread [1] send() start...... Thread [1] CHECK_STATUS---send_i:MCAPI_PENDING Thread [1] CHECK_STATUS---test:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of send() - endpoint=101 has sent: [hello core 1 messag from core 0 - 0] Thread [1] core0: mode(0) message send. The 0 time sending Thread [1] recv() start...... Thread [1] CHECK_STATUS---available:MCAPI_SUCCESS node=1, port=5 Thread [1] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of recv() - endpoint=101 size 0x48 has received: [hello core 0 message from core 1 - 1] Thread [1] core0: mode(0) message recv. The 0 time receiving Thread [1] send() start...... Thread [2] CHECK_STATUS---send_i:MCAPI_PENDING Thread [2] CHECK_STATUS---test:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of send() - endpoint=200 has sent: [hello core 2 messag from core 0 - 2] Thread [2] core0: mode(0) message send. The 2 time sending Thread [2] recv() start...... Thread [2] CHECK_STATUS---available:MCAPI_SUCCESS node=2, port=6 Thread [2] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of recv() - endpoint=200 size 0x48 has received: [hello core 0 message from core 2 - 3] Thread [2] core0: mode(0) message recv. The 2 time receiving Thread [2] CHECK_STATUS---del_ep:MCAPI_SUCCESS Thread [2] core0 3 rounds mode(0) demo Test PASSED!! Thread [2] test success Thread [1] CHECK_STATUS---send_i:MCAPI_PENDING Thread [1] CHECK_STATUS---test:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of send() - endpoint=101 has sent: [hello core 1 messag from core 0 - 1] Thread [1] core0: mode(0) message send. The 1 time sending Thread [1] recv() start...... Thread [1] CHECK_STATUS---available:MCAPI_SUCCESS node=1, port=5 Thread [1] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of recv() - endpoint=101 size 0x48 has received: [hello core 0 message from core 1 - 2] Thread [1] core0: mode(0) message recv. The 1 time receiving Thread [1] send() start...... Thread [1] CHECK_STATUS---send_i:MCAPI_PENDING Thread [1] CHECK_STATUS---test:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of send() - endpoint=101 has sent: [hello core 1 messag from core 0 - 2] Thread [1] core0: mode(0) message send. The 2 time sending Thread [1] recv() start...... Thread [1] CHECK_STATUS---available:MCAPI_SUCCESS node=1, port=5 Thread [1] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of recv() - endpoint=101 size 0x48 has received: [hello core 0 message from core 1 - 3] Thread [1] core0: mode(0) message recv. The 2 time receiving Thread [1] CHECK_STATUS---del_ep:MCAPI_SUCCESS Thread [1] core0 3 rounds mode(0) demo Test PASSED!! Thread [1] test success mcapi_finalize 322 root@adsp-sc589-ezkit:~# arm_sharc_msg_test -h Usage: arm_sharc_msg_test <options> Available options: -h,--help this help -t,--timeout timeout value in jiffies(default:10,000) -r,--round number of test round(default:100) root@adsp-sc589-ezkit:~# arm_sharc_msg_test -r 3 semget Thread [0] CHECK_STATUS---initialize:MCAPI_SUCCESS node=0, port=200 Thread [2] CHECK_STATUS---create_ep:MCAPI_SUCCESS Thread [2] local endpoint: c8 node=2, port=6 Thread [2] CHECK_STATUS---get_ep:MCAPI_SUCCESS Thread [2] CHECK_STATUS---get_ep_i:MCAPI_PENDING node=2, port=6 Thread [2] CHECK_STATUS---test:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] remote endpoint: 20006 Thread [2] send() start...... Thread [2] CHECK_STATUS---send_i:MCAPI_PENDING Thread [2] CHECK_STATUS---test:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of send() - endpoint=200 has sent: [hello core 2 messag from core 0 - 0] Thread [2] core0: mode(0) message send. The 0 time sending Thread [2] recv() start...... Thread [2] CHECK_STATUS---available:MCAPI_SUCCESS node=2, port=6 Thread [2] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of recv() - endpoint=200 size 0x48 has received: [hello core 0 message from core 2 - 1] Thread [2] core0: mode(0) message recv. The 0 time receiving Thread [2] send() start...... node=0, port=101 Thread [1] CHECK_STATUS---create_ep:MCAPI_SUCCESS Thread [1] local endpoint: 65 Thread [2] CHECK_STATUS---send_i:MCAPI_PENDING Thread [2] CHECK_STATUS---test:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of send() - endpoint=200 has sent: [hello core 2 messag from core 0 - 1] Thread [2] core0: mode(1) message send. The 1 time sending Thread [2] recv() start...... node=2, port=6 Thread [2] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [2] CHECK_STATUS---test:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of recv() - endpoint=200 size 0x48 has received: [hello core 0 message from core 2 - 2] Thread [2] core0: mode(1) message recv. The 1 time receiving Thread [2] send() start...... node=1, port=5 Thread [1] CHECK_STATUS---get_ep:MCAPI_SUCCESS Thread [1] CHECK_STATUS---get_ep_i:MCAPI_PENDING node=1, port=5 Thread [1] CHECK_STATUS---test:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] remote endpoint: 10005 Thread [1] send() start...... Thread [1] CHECK_STATUS---send_i:MCAPI_PENDING Thread [1] CHECK_STATUS---test:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of send() - endpoint=101 has sent: [hello core 1 messag from core 0 - 0] Thread [1] core0: mode(0) message send. The 0 time sending Thread [1] recv() start...... Thread [1] CHECK_STATUS---available:MCAPI_SUCCESS node=1, port=5 Thread [1] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of recv() - endpoint=101 size 0x48 has received: [hello core 0 message from core 1 - 1] Thread [1] core0: mode(0) message recv. The 0 time receiving Thread [1] send() start...... Thread [2] CHECK_STATUS---send_i:MCAPI_PENDING Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of send() - endpoint=200 has sent: [hello core 2 messag from core 0 - 2] Thread [2] core0: mode(2) message send. The 2 time sending Thread [2] recv() start...... node=2, port=6 Thread [2] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [2] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [2] end of recv() - endpoint=200 size 0x48 has received: [hello core 0 message from core 2 - 3] Thread [2] core0: mode(2) message recv. The 2 time receiving Thread [2] CHECK_STATUS---del_ep:MCAPI_SUCCESS Thread [2] core0 3 rounds mode(2) Test PASSED!! Thread [2] test success Thread [1] CHECK_STATUS---send_i:MCAPI_PENDING Thread [1] CHECK_STATUS---test:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of send() - endpoint=101 has sent: [hello core 1 messag from core 0 - 1] Thread [1] core0: mode(1) message send. The 1 time sending Thread [1] recv() start...... node=1, port=5 Thread [1] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [1] CHECK_STATUS---test:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of recv() - endpoint=101 size 0x48 has received: [hello core 0 message from core 1 - 2] Thread [1] core0: mode(1) message recv. The 1 time receiving Thread [1] send() start...... Thread [1] CHECK_STATUS---send_i:MCAPI_PENDING Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of send() - endpoint=101 has sent: [hello core 1 messag from core 0 - 2] Thread [1] core0: mode(2) message send. The 2 time sending Thread [1] recv() start...... node=1, port=5 Thread [1] CHECK_STATUS---recv_i:MCAPI_SUCCESS Thread [1] CHECK_STATUS---wait:MCAPI_SUCCESS Thread [1] end of recv() - endpoint=101 size 0x48 has received: [hello core 0 message from core 1 - 3] Thread [1] core0: mode(2) message recv. The 2 time receiving Thread [1] CHECK_STATUS---del_ep:MCAPI_SUCCESS Thread [1] core0 3 rounds mode(2) Test PASSED!! Thread [1] test success mcapi_finalize 322
BACK TO Multi-Core Support