<< 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

what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
What would be the best educational aid(s) for gifted kids/savants?
Heidi Reply
treat them normal, if they want help then give them. that will make everyone happy
Saurabh
What are the treatment for autism?
Magret Reply
hello. autism is a umbrella term. autistic kids have different disorder overlapping. for example. a kid may show symptoms of ADHD and also learning disabilities. before treatment please make sure the kid doesn't have physical disabilities like hearing..vision..speech problem. sometimes these
Jharna
continue.. sometimes due to these physical problems..the diagnosis may be misdiagnosed. treatment for autism. well it depends on the severity. since autistic kids have problems in communicating and adopting to the environment.. it's best to expose the child in situations where the child
Jharna
child interact with other kids under doc supervision. play therapy. speech therapy. Engaging in different activities that activate most parts of the brain.. like drawing..painting. matching color board game. string and beads game. the more you interact with the child the more effective
Jharna
results you'll get.. please consult a therapist to know what suits best on your child. and last as a parent. I know sometimes it's overwhelming to guide a special kid. but trust the process and be strong and patient as a parent.
Jharna
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




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