0% found this document useful (0 votes)
153 views2 pages

SetUp 6416

The document provides instructions for setting up a Code Composer project to run a FIR filter example on a TMS320C6416 DSK board. The steps include: 1) Creating a project called "Fir" and adding the source files "Fir.c", "c6416dskinit.c", and "vectors_intr.asm" to it. 2) Adding the library files "rts6400.lib", "dsk6416bsl.lib", and "csl6416.lib" to the project. 3) Adding the linker command file "c6416dsk.cmd" and setting the compiler and linker options appropriately. 4) Building, downloading

Uploaded by

Anand Sridharan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views2 pages

SetUp 6416

The document provides instructions for setting up a Code Composer project to run a FIR filter example on a TMS320C6416 DSK board. The steps include: 1) Creating a project called "Fir" and adding the source files "Fir.c", "c6416dskinit.c", and "vectors_intr.asm" to it. 2) Adding the library files "rts6400.lib", "dsk6416bsl.lib", and "csl6416.lib" to the project. 3) Adding the linker command file "c6416dsk.cmd" and setting the compiler and linker options appropriately. 4) Building, downloading

Uploaded by

Anand Sridharan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Instructions for TI Code Composer tools using the TMS320C6416 DSK

The instructions below are given for the example project Fir. Create a new project file Fir.pjt
by selecting Project New and typing Fir as the project name. Set Target to TMS320C64XX before clicking on Finish . The .pjt file stores project information on build options, source filenames, and dependencies. The names of the files used by a project are displayed in the Project View window, which, by default, appears at the left - hand side of the Code Composer window.

Add the source file Fir.c to the project.


Fir.c is the top level C source file containing the definition of function main() . This source file is stored in the scratch drive(copy the file to your c:\temp) and must be added to the project if it is to be used to generate the executable file Fir.out . Select Project Add Files to Project and look for Files of Type C Source Files ( * .c, * .ccc). Open , or double - click on, Fir.c . It should appear in the Project View window in the Source folder.

Add the source file c6416dskinit.c to the project.


c6416dskinit.c contains the function definitions for a number of low level routines including comm._poll() and output_left_sample() . This source file is stored in the the scratch drive(copy the file to your c:\temp). Select Project Add Files to Project and look for Files of Type C Source Files ( * .c, * .ccc). Open , or double - click on, c6416dskinit.c . It should appear in the Project View window in the Source folder.

Add the source file vectors_intr.asm to the project.


This source file is stored in the scratch drive(copy the file to your c:\temp). Select Project Add Files to Project and look for Files of Type ASM Source Files ( * .a * ). Open , or double - click on, vectors_intr.asm. It should appear in the Project View window in the Source folder.

Add library support files rts6400.lib, dsk6416bsl.lib, and csl6416.lib to the project.
Three more times, select Project Add Files to Project and look for Files of Type Object and Library Files ( * .o * , * .l * ) The three library files are stored in the scratch drive(copy the file to your c:\temp). These are the run - time support (for C64x architecture), board support (for C6416 DSK), and chip support (for C6416 processor) library files.

Add the linker command file c6416dsk.cmd to the project.


This file is stored in the folder scratch drive(copy the file to your c:\temp). Select Project Add Files to Project and look for Files of Type Linker Command File ( * .cmd; * .lcf) . Open, or double - click on, c6416dsk.cmd . It should then appear in the Project View window. No header files will be shown in the Project View window at this stage. Selecting Project Scan All File Dependencies will rectify this. You should now be able to see header files c6416dskinit.h , dsk6416.h , and dsk6416_aic23.h , in the Project View window.

Code Generation and Build Options


The code generation tools underlying CCS, that is, C compiler, assembler, and linker, have a number of options associated with each of them. These options must be set appropriately before attempting to build a project. Once set, these options will be stored in the project file.

Setting Compiler Options


Select Project Build Options and click on the Compiler tab. In the Basic category set Target Version to C641x ( - mv6416) . In the Advanced category set Memory Models to Far ( mem_ model:data=far) . In the Preprocessor category set Pre - Define Symbol to CHIP_6416 and Include Search Path to c:\temp. Click on OK .

Setting Linker Options


Click on the Linker tab in the Build Options window. The Output Filename should default to .\ Debug \ Fir.out based on the name of the project file and the Autoinit Model should default to Run Time Autoinitialization. Set the following options (all in the Basic category). Set Library Search Path to c:\temp and set Include Libraries to rts6400.lib;dsk6416bsl.lib;csl6416.lib . Click on OK.

Building, Downloading, and Running the Project


The project Fir can now be built, and the executable file Fir.out can be downloaded to the DSK and run.

Build this project as Fir .


Select Project Rebuild All . Or press the toolbar button with the three downward arrows. This compiles and assembles all the C files using cl6x and assembles the assembly file vectors_int.asm using asm6x . The resulting object files are then linked with the library files using lnk6x . This creates an executable file Fir.out that can be loaded into the C6416 processor and run. Note that the commands for compiling, assembling, and linking are performed with the Build option. A log file cc_ build_Debug.log is created that shows the files that are compiled and assembled, along with the compiler options selected. It also lists the support functions that are used. The building process causes all the dependent files to be included (in case one forgets to scan for all the file dependencies). You should see a number of diagnostic messages, culminating in the message Build Complete, 0 Errors, 0 Warnings, 0 Remarks appear in an output window in the bottom left - hand side of the CCS window. It is possible that a warning about the Stack Size will have appeared. This can be ignored or can be suppressed by unchecking the Warn About Output Sections option in the Advanced category of Linker Build Options .

Connect to the DSK .


Select Debug Connect and check that the symbol in the bottom left - hand corner of the CCS window indicates connection to the DSK.

Select File Load Program in order to load Fir.out .


Select Debug Run . In order to verify that an output waveform is present, use an oscilloscope connected to the LINE OUT socket.

You might also like