<< Chapter < Page Chapter >> Page >
This module describes the process of creating, building and debugging a Code Composer Studio (CCS) v4 assembly program project.

Introduction

This module describes how to create a Code Composer Studio (CCS) v4 project that executes a simple assembly program. The module does not explain the code in the project files. The project does not use DSP/BIOS and runs on the TI simulator. In this project the processor used is the TMS320C67xx but the process should work for other processors as well.

Create a ccs project

To create a CCS project select File->New->CCS Project .

Screenshot of CCS Project menu

This will bring up a window where you can enter the name of the project. The location selected is the default location for project files. Press Next .

CCS Project name and location

Since the example uses the TMS320C67xx processor the project type selected is C6000 . The project configurations are Debug and Release . Select the Next button.

Type of CCS project

If there are any project dependencies they are selected on the next screen. Select the Next button.

CCS Project dependencies

On the Project Settings Screen , select the items that pertain to the type of project to be created. Since the project will be executed select Output Type: Executable . The processor type is TMS320C67xx so the Device Variant is Generic C67xx Device . This project will use Little Endian . The code generation tools are the latest version (in this case TI v7.0.3). The runtime support library is selected to match the device variant and the endianness selected. The library can be selected automatically. Press Next .

Since this project will have assembly programs only, select the Empty Assembly-only Project . Select Finish and the project will show up in the C/C++ Projects view.

Project settings window

Project Templates

C/C++ projects view

Add code files

There are three files that will be added to the project. One, main.asm , will contain the assembly program we want to execute. The file vectors.asm will contain the code that gets executed when the reset interrupt occurs. The file link.cmd will be the linker command file that tells the linker where section of memory are located and where to put the code in the memory map.

Main program

Create the main.asm file that conains the assembly program to execute. Select File->New->Source File .

New source file

The New Source File dialog opens and you can enter the source file name. Add a .asm extension for an assembly program file. The source folder should be the folder of your project. Select Finish and a new file is opened.

New source file dialog

Enter the assembly code shown below in main.asm .

; Example assembly file ; Multiply two numbers.text ; Indicates that what follows is code .def _c_int00; This symbol is defined in this file; but used in another file _c_int00: MVK .S1 0x34,A1 ; Put a number in register A1MVK .S1 0x25,A2 ; Put a number in register A2 MPY .M1 A1,A2,A1 ; Multiply two numbers in A1 and A2NOP NOPNOP NOPNOP

Reset vector file

When a reset interrupt occurs in a C6000 processor the system will start executing the code located at the interrupt memory location. There are only 8 instructions at each interrupt vector. If a long program is to be executed then the interrupt vector needs to branch to the program location. This is done by using a resect vector program.

Create a new file named vectors.asm and enter the following code.

.ref _c_int00 ; name of the label where ; the program is located.sect"vectors" ; this will put this code ; in the vectors memeory sectionreset: mvkl.s2 _c_int00,b0 ; put the address in b0 mvkh.s2_c_int00,b0b .s2 b0 ; branch to the program nopnop nopnop nopnop

Command file

The linker command file tells the linker information about the memory map and where to put parts of the code like data and program instructions. Create a new file named link.cmd and enter the following code.

MEMORY {VECS : origin = 0x00000000 length = 0x00000220 IPRAM : origin = 0x00000240 length = 0x0000FDC0} SECTIONS{ vectors>VECS .text>IPRAM }

Create a target configuration

In order to build and run your project you need to have a target configuration. This file will contain information about the emulator that will be used and the target processor. In this module the target configuration will be the TI simulator for the C6713 processor. First select File->New->Target Configuration File .

Open new target configuration file

In the New Target Configuration dialog enter the configuration file name ending in the .ccxml file extension. Put the file in the project directory. Select Finish and a new target configuration file opens.

In the configuration, select the connection needed (simulator or some type of emulator, etc.) and the type of device. In this example the TI simulator is used with the C67xx little endian simulator device. Select Save when done.

Now the target configuration is in the project.

Project files

Debug the project

To start a debug session either select Target->Debug Active Project or press the debug icon in the menu bar.

Debug icon

When the debug session starts the code files are compiled and linked into an executable file and the file is loaded onto the target. The reset vector code should be located at memroy location 0x0.

Debugging session

If your window is small, CCS may not have room to open all windows. In this case your debugging window may look like the following figure.

Crowded debug window

Note that the window where the program files are located may not show much (circled in red). In this case you will need to expand the window.

Begin executing the code by stepping through the code using the Assembly Step Into button.

Assembly Step Into button

The code should execute until the branch instruction finishes executing and then it should jump to the main function located at a different memory location.

Debugging session after jump to main function

Questions & Answers

where we get a research paper on Nano chemistry....?
Maira Reply
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Google
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
revolt
da
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





Source:  OpenStax, Dsp lab with ti c6x dsp and c6713 dsk. OpenStax CNX. Feb 18, 2013 Download for free at http://cnx.org/content/col11264/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dsp lab with ti c6x dsp and c6713 dsk' conversation and receive update notifications?

Ask