NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

MCSDK UG Chapter Developing KS II First App

From Texas Instruments Wiki
Jump to: navigation, search




TI Logo oneline twocolor.png



Developing with MCSDK: Your First Application

Last updated: 08/07/2014


Overview[edit]

The following sequence is recommended to get familiar with Keystone II EVM and MCSDK software.

Out-of-box Demo[edit]

Please refer to Getting Started Guide to execute every step from “Hardware Setup” till “Program EVM”. This is to verify that all versions of hardware modules and software are up-to-date, and update them if not. Once these are done, users can proceed to run out-of-box demo.

Get the first hello world to run on A15[edit]

Refer to Tools Chapter of Keystone-II User's Guide to download and setup Linario tool chain. To compile the hello.c file and run it on ARM, please follow the steps below:

a) Building the executable

arm-linux-gnueabi-gcc -o hello hello.c

b) Transfer the executable to the EVM First, copy the executable to the tftpboot directory of the TFTP server. Then from the linux prompt of the EVM, type:

tftp -r hello -g <tftp server IP address>

Or if NFS is used, please the hello binary under NFS server directory.

[Quick note on how to set up NFS filesystem. For more detailed info, please google for Linux NFS]

c) Run the application on EVM after it boots up

chmod +x hello
./hello

Installation of MCSDK on target[edit]

Starting from MCSDK 3.0.4, the release includes an MCSDK native linux package that can be installed on the target platform.
The MCSDK release package can be installed in the filesytem if the required space is available. Here are the steps to install the MCSDK on the target platform. Note the XDC tools which can be used on the target for C66x DSP compilation are installed under the directory.

wget <http-url>mcsdk_3_00_04_18_native_setuplinux.bin
chmod +x mcsdk_3_00_04_18_native_setuplinux.bin
./mcsdk_3_00_04_18_native_setuplinux.bin

Installing Linux-devkit on the target platform follow the following steps.

cd <target_directory for devkit installation>
sed '1,/^MARKER:/d' mcsdk_linux_<version>/linux-devkit/arago-2013.12-cortexa15-linux-gnueabi-mcsdk-sdk-i686.sh > devkit.bz2
tar xjf devkit.bz2

Compilation of ARM Image on A15 Target[edit]

Starting from MCSDK 3.0.4, the released root filesystem includes tools for target compilation for ARM A15 on the target platform.

To compile the hello.c file and run, please follow the steps below a) Build the executable on the target using

gcc -o hello hello.c

b) Run the application on EVM using

./hello

Compilation of DSP Image on A15 Target[edit]

Starting from MCSDK 3.0.4, the release target filesystem includes additional tools to enable building a C66x DSP image on the ARM A15 target.
Note that the code gen tools used for compilation of the C66x DSP image is not included in the MCSDK release. Contact TI technical support for early adopter versions of this tool.

Get the first DSP application to run with MPM (Multiple Processor Manager)[edit]

In Keystone-II, Multiple Processor Manager (MPM) must be used to load and run DSP applications.

A pre-build DSP image is in this folder:


mcsdk_bios_x_xx_xx_xx/examples/mpm/mpmsrv_keystone2_example/Debug/mpmsrv_keystone2_example.out


[ Note: The MCSDK package should have been installed in step 1 by now. If it has not been installed, please visit the section of installing the MCSDK in Getting Started Guide to install it.


Follow the following steps to run the demo.

a) Copy the pre-build DSP image to tftpboot directory of the TFTP server b) Tftp the DSP image to EVM using the tftp command shown in previous holloworld example, and rename the image file to mpmdemo.out c) In Linux prompt of the EVM, type the following

      mpmcl ping dsp0                               (shows the DSP0 is alive)
      mpmcl status dsp0                            (shows the DSP0 status)
      mpmcl load dsp0 mpmdemo.out   (load the prebuild image to DSP0)
      mpmcl run dsp0                                 (run the executable on DSP0)

The output of mpmdemo.out will be in /debug/remoteproc/remoteproc0/trace0 of the EVM file system.

Replace dsp0 to dsp# in above commands to run demo in different dsp cores (where # = 0, 1, ..., 7)

The result for each core will be in /debug/remoteproc/remoteproc#/trace0

For more details about MPM, please refer to System Management Section in Exploring Chapter.

User space example on ARM[edit]

For user space example on ARM, please refer to the example code in mcsdk_linux_x_xx_xx_xx\example-applications\smp_test directory.


ARM and DSP Communication[edit]

MCSDK provides high level abstraction component to provide communication between different processors. The MessageQ based IPC is used between ARM to DSP and beween DSP to DSP. For more info, please refer to Transport Section in Exploring Chapter of the Keystone-II User's Guide.

The image processing demo has ARM side master code and DSP slave code. To see how the IPC communication between ARM and DSP is coded, please refer to the source code in mcsdk_bios_x_xx_xx_xx/demos/image_processing/ipc/master/src and slave/src directories


Explore for your application needs[edit]

Follow this wiki page to build uboot, kernel and file system and build your applications.




E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK UG Chapter Developing KS II First App here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK UG Chapter Developing KS II First App here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article MCSDK UG Chapter Developing KS II First App here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article MCSDK UG Chapter Developing KS II First App here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article MCSDK UG Chapter Developing KS II First App here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK UG Chapter Developing KS II First App here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK UG Chapter Developing KS II First App here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article MCSDK UG Chapter Developing KS II First App here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article MCSDK UG Chapter Developing KS II First App here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity