(Multi-Core DSP QuickStart) 1. Create a simple multi-core DSP project HelloWorld

Source: Internet
Author: User

Original article

Reprint please register source HTTP://BLOG.CSDN.NET/TOSTQ

Tutorial directory: http://blog.csdn.net/tostq/article/details/51245979

In this section we will run the first multi-core DSP program, familiar with the CCS development environment, and learn to use the CCS debugging tool, the main content is as follows:

(1) New CCS project
(2) Import target simulation module
(3) Using the Debug tool

First, the new CCS project

Select File/new/ccs Project

second, the New Project dialog box
(1) Project name: refers to project names, where the project names are not case-sensitive
(2) Output type: Executable refers to the executable file (usually in. out format, can be downloaded directly into the DSP), Static Library refers to the static libraries (output format is generally. lib file), our program here needs to run directly in the DSP, so choose executable format
(3) Use default location: Refers to the directory where the project is stored
(4) Device: Determine what type of DSP we need to run under, if we choose the model is a generic model such as generic c66xx Device, only soft emulation, but if we have a hardware evaluation board such as EVMC6747, The following connection will be highlighted and you can choose to require a hardware emulator as follows:

(5) Project templates and Example: You can choose a project template, there are also many examples of DSP, here we first select Empty project
You can refer to this document for the creation and use of project templates:Http://processors.wiki.ti.com/index.php/Project_Templates_in_CCS
(6) Advance setting, keep it to the default.
(7) Click Finish to complete the project creation, then we can see the project in Project Explorer, there is only one includes folder in the current project, [Active-debug] next to the project name refers to the current project is a work item, When Project Explorer has multiple projects, only one project can be valid at the same time and can be toggled by clicking on the project.
iii. new and added Files
(1) Create new file HELLOWORLD.C, select Current project, right click, select/new/file, Get new File dialog box, enter file name after finish

(2) Edit the contents of the file, double-click the file, you can edit, DSP syntax and C language basically consistent. The dnum here is defined in C6x.h, indicating the ID number of the current kernel.
(3) Import linker file (or link command file), which is. cmd format, is the project must, mainly to the processor to arrange memory, heap, stack and other aspects of the allocation, you can manually generate, you can also go to TI official web based on different processors download different linker files: HTTP ://processors.wiki.ti.com/index.php/linker_cmd_files_for_ccs. Here we assume that the processor platform is C6678, so download the corresponding C6678 link command file.
After downloading the C6678.cmd file, return to the project, right click to select Add Files ..., import the c6678.cmd into the project, the following dialog box appears:
Select Copy files to copy the imported file to the project directory, and link to files is just the equivalent of a shortcut, here we choose Copy files, at this time we completed the project file import, as below, there is an import method, is directly the text Copy to the project directory, and then refresh Project Explorer to automatically import the files needed by the project.

third, compile the project
when the source file, the link command file, the header file are in place, the project can be compiled. There are several ways to compile a project:
(1) Right-click the current project and select Build project
(2) Select Menu Bar Project, click Build Project
(3) Select the small hammer on the toolbar, you can also switch debug/release
Click Compile, you may get the following prompt, where console is the Control command window, problems is prompt error and warning, here the compilation result is no errors and warnings.
Iv. Simulation of the project
simulation Here is software simulation, we need to first generate a target file, the main purpose of this file is to define the emulator
Click Select target configuration file, type the target profile name and finish the installation
Now that there is one more. ccxml file in Project Explorer, we can see that there is a red fork on this file, which indicates that there is an error in the current file because we have not configured the target emulator yet, so there will be an error.
We chose C6678 Device functional Simulator, Little Endian, click Save to complete the target configuration, and we can also find that the Red fork on the file disappears.
after the target profile is complete, you can start the simulation, the same as the project compiled there are three ways, but here we recommend directly click on the bug on the toolbar, click on the simulation, because the C6678 is a multi-core DSP, so will now select the following DSP Core dialog box. It's all done here.
the Emulation debugging window is as follows:
It doesn't matter if some of the windows don't appear here, we can select them in the window.
(1) Single core operation, we select a kernel, click Run, in the console window can see the results

(2) Multi-core operation, we select all the cores through shift, right click Groups Cores, then click Run, in the console window can see the results of multiple cores running

If the expected results are not present here, you can re-import the program and re-test it, and the imported execution file is generated by the previous compilation process. Out File

after debugging, we click on the small red Square to stop debugging and return back to our original interface.
Here we have completed the first multi-core DSP project, is not very simple, here about the use of the relevant debugging tools, we put in the back to explain ~_~
v. References
TI website Information
about creating a project: Http://processors.wiki.ti.com/index.php/GSG:Creating_projects_v5

About the Debug project: HTTP://PROCESSORS.WIKI.TI.COM/INDEX.PHP/GSG:DEBUGGING_PROJECTS_V5

Routine: Https://github.com/tostq/EasyMulticoreDSP/tree/master/1.HelloWorldtest

(Multi-Core DSP QuickStart) 1. Create a simple multi-core DSP project HelloWorld

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.