using c6713 with ccsv5 revised20oct

13
“Digital Signal Processing and Applications with the TMS320C6713 and TMS320C6416 DSK” second edition Using the example programs with Code Composer Studio version 5.2.1 The example programs (provided on a CDROM with the book) were developed and tested (in 2007) using Windows XP and Code Composer Studio version 3.1. Since then, Texas Instruments have released Code Composer Studio version 5 which, unlike version 3, is compatible with Windows 7. The following notes describe some of the issues involved in getting the example programs to run using Windows 7 and Code Composer Studio version 5 (CCSv5). These notes are not intended as a tutorial for installing and using CCSv5. The workspace folder and program examples described below have been tested using Code Composer Studio version 5.2.1. A workspace folder containing two example projects from the book is supplied in file C6713_CCSv5.zip. Assuming that CCSv5, the board support library (BSL), available at http://c6000.spectrumdigital.com/dsk6713/ , and the workspace folder C6713_CCSv5.zip have been installed using the pathnames described in section a) below, the program examples should run as supplied. However, in order to allow the addition of more projects (program examples from the CDROM supplied with the book) to the workspace, and/or to allow the use of different pathnames for CCSv5, the BSL and the workspace, details of the issues involved are discussed. The file C6713_CCSv5.zip has deliberately been made quite small, providing just two example projects and not duplicating common support files that are supplied on the CDROM. In order to run example programs from the book using CCSv5, in addition to the file C6713_CCSv5.zip you will need to have access to the files on the CDROM that comes with the book. Described below are three different scenarios. a) How to run the program examples from the workspace folder provided, assuming that CCSv5, the BSL and the workspace folder are located on a C:\ drive exactly as they were when the programs were tested. b) How to run the program examples from the workspace folder provided, assuming that CCSv5, the BSL and the workspace folder are not located on a C:\ drive exactly as they were when the programs were tested. c) How to create new projects within the workspace folder provided, for further program examples taken from the CDROM supplied with the book.

Upload: engr-fawad-wali

Post on 20-Nov-2015

32 views

Category:

Documents


6 download

DESCRIPTION

dsp kit c6713 and code compose studio

TRANSCRIPT

  • Digital Signal Processing and Applications with the TMS320C6713 and

    TMS320C6416 DSK second edition

    Using the example programs with Code Composer Studio version 5.2.1

    The example programs (provided on a CDROM with the book) were developed and tested (in

    2007) using Windows XP and Code Composer Studio version 3.1. Since then, Texas

    Instruments have released Code Composer Studio version 5 which, unlike version 3, is

    compatible with Windows 7.

    The following notes describe some of the issues involved in getting the example programs to

    run using Windows 7 and Code Composer Studio version 5 (CCSv5). These notes are not

    intended as a tutorial for installing and using CCSv5.

    The workspace folder and program examples described below have been tested using Code

    Composer Studio version 5.2.1.

    A workspace folder containing two example projects from the book is supplied in file

    C6713_CCSv5.zip.

    Assuming that CCSv5, the board support library (BSL), available at

    http://c6000.spectrumdigital.com/dsk6713/ , and the workspace folder C6713_CCSv5.zip

    have been installed using the pathnames described in section a) below, the program examples

    should run as supplied. However, in order to allow the addition of more projects (program

    examples from the CDROM supplied with the book) to the workspace, and/or to allow the

    use of different pathnames for CCSv5, the BSL and the workspace, details of the issues

    involved are discussed.

    The file C6713_CCSv5.zip has deliberately been made quite small, providing just two

    example projects and not duplicating common support files that are supplied on the CDROM.

    In order to run example programs from the book using CCSv5, in addition to the file

    C6713_CCSv5.zip you will need to have access to the files on the CDROM that comes

    with the book.

    Described below are three different scenarios.

    a) How to run the program examples from the workspace folder provided, assuming that

    CCSv5, the BSL and the workspace folder are located on a C:\ drive exactly as they

    were when the programs were tested.

    b) How to run the program examples from the workspace folder provided, assuming that

    CCSv5, the BSL and the workspace folder are not located on a C:\ drive exactly as

    they were when the programs were tested.

    c) How to create new projects within the workspace folder provided, for further program

    examples taken from the CDROM supplied with the book.

    http://c6000.spectrumdigital.com/dsk6713/

  • In each case, the following step is necessary.

    Replace file DSK6713\c6000\dsk6713\include\dsk6713_aic23.h (supplied by Spectrum

    Digital as part of the BSL) with the slightly modified version supplied in file

    C6713_CCSv5.zip as C6713\dsk6713_aic23.h.

    The change made in file dsk6713_aic23.h is that the lines

    extern MCBSP_Handle DSK6713_AIC23_DATAHANDLE;

    extern MCBSP_Handle DSK6713_AIC23_CONTROLHANDLE;

    have been modified to read

    extern far MCBSP_Handle DSK6713_AIC23_DATAHANDLE;

    extern far MCBSP_Handle DSK6713_AIC23_CONTROLHANDLE;

    a) How to run the program examples from the workspace folder

    provided, assuming that Code Composer Studio, the BSL and the

    workspace folder are located on a C:\ drive exactly as they were

    when the programs were tested.

    Install CCSv5 so that a path C:\ti\ccsv5 exists.

    Copy the BSL folder DSK6713 (downloadable from

    http://c6000.spectrumdigital.com/dsk6713/) so that a path C:\DSK6713\ exists.

    Copy the workspace folder C6713 supplied in file C6713_CCSv5.zip so that a path

    C:\C6713\sine8_intr exists.

    Copy the folder Support from the CDROM that came with the book into folder C6713 so that

    path C:\C6713\Support exists.

    Copy, or move, files vectors_intr.asm, vectors_poll.asm, DSK6713.gel, C6713dsk.cmd

    and C6713DSK.ccxml from the folder C6713 mentioned above into the folder Support

    (overwriting the older files vectors_intr.asm, vectors_poll.asm, and C6713dsk.cmd).

    The newer .asm files have been modified according to advice given at

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/215477.aspx

    Launch CCSv5, select workspace C:\C6713, and projects sine8_intr and sweep8000

    should appear in the Project Explorer window in the CCS Edit perspective, as shown in

    Figure 2.

    http://c6000.spectrumdigital.com/dsk6713/http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/215477.aspx

  • Figure 1: Select workspace C:\C6713

    Figure 2: Projects sine8_intr and sweep8000 should appear in the Project Explorer

    window.

    If the projects do not appear, select Project->Import Existing CCS Eclipse Project, Browse to

    C:\C6713, Select All and click Finish.

    Click on the name of one of the projects in the Project Explorer window, and then on the

    Debug toolbar button and the project should compile link and load successfully.

  • Figure 3: Click on the Debug toolbar button.

    You will see some warning messages from the linker in the Problems window regarding

    functions output_left_sample(), comm_intr()and/or comm_poll(). These will not

    prevent the program from running.

    Figure 4: Compiler warning messages.

    One way of avoiding these warning messages is to copy the following three function

    declarations from file C6713dskinit.h into files sine8_intr.c and/or Sweep8000.c.

    void comm_poll();

    void comm_intr();

    void output_left_sample(short);

    There are probably other, more elegant, ways of avoiding the warning messages.

    Click on Resume in the Debug window and the program should run.

  • Figure 5: Click on Resume in the Debug window.

    b) How to run the program examples from the workspace folder

    provided, assuming that Code Composer Studio, the BSL and the

    workspace folder are not located on a C:\ drive exactly as they were

    when the programs were tested.

    Install CCSv5 at a location of your choice.

    Copy the BSL folder DSK6713 (available at http://c6000.spectrumdigital.com/dsk6713/) to a

    location of your choice.

    Copy the workspace folder C6713 supplied in file C6713_CCSv5.zip to a location of your

    choice.

    Copy folder Support from the CDROM that came with the book into the folder C6713

    mentioned in the previous step.

    Copy, or move, files vectors_intr.asm, vectors_poll.asm, DSK6713.gel, C6713dsk.cmd

    and C6713DSK.ccxml from the folder C6713 mentioned above into the folder C6713\Support

    (overwriting the older files vectors_intr.asm, vectors_poll.asm, and C6713dsk.cmd).

    Launch CCSv5 and select the new C6713 workspace folder as a workspace.

    If projects sine8_intr and sweep8000 do not appear in the Project Explorer window in the

    CCS Edit perspective, select Project->Import Existing CCS Eclipse Project, Browse to the

    new C6713 folder, Select All and click Finish.

    You will have to alter some of the Build Settings for each project. Right click on a project

    name in the Project Explorer window and select Show Build Settings....

    http://c6000.spectrumdigital.com/dsk6713/

  • Figure 6: General Build Settings used by example programs.

    Modify the C6000 Compiler->Include Options so that the compiler is aware of the locations

    of the following folders

    DSK6713\c6000\bios\include

    DSK6713\c6000\dsk6713\include

  • Figure 7: C6000 Compiler->Include Options used by example programs.

    You will need to prefix these pathnames according to where you have copied folder DSK6713,

    rather than simply by C:\ as shown in Figure 7.

    Modify the C6000 Linker->File Search Path so that the linker is aware of the locations of the

    following libraries

    ccsv5\tools\compiler\c6000_7.3.4\lib\rts6200.lib

    DSK6713\c6000\bios\lib\csl6713.lib

    DSK6713\c6000\dsk6713\lib\dsk6713bsl.lib

  • Figure 8: C6000 Linker->File Search Path used by example programs

    You will need to prefix these pathnames according to where you have copied folder DSK6713

    and where you have installed CCSv5, rather than simply by C:\ and C:\ti as shown in

    Figure 8.

    In the case of rts6200.lib, the exact pathname may be different from that shown in Figure

    8 depending on the exact version of CCSv5 being used and in particular the exact version of

    the compiler being used. In the case of Code Composer Studio version 5.2.1, compiler

    version 7.3.4 is supplied. CCSv5 does not include library file rts6700.lib but file

    rts6200.lib works in this application.

    Make sure that symbol CHIP_6713 is defined, as shown in Figure 9.

  • Figure 9: Make sure that symbol CHIP_6713 is defined.

    You may have to alter the links in the Project Explorer window to several files. Each project

    contains links to the following files

    c6713dskinit.c,

    C6713dskinit.h,

    Vectors_intr.asm,

    C6713dsk.cmd, and

    C6713DSK.ccxml

    which are located in folder C6713\Support. If you have not placed folder C6713\Support at

    C:\C6713\Support then you will need to delete the links to these files from the project and

    then add correct links to the files in folder C6713\Support again using Project->Add Files

  • Figure 10: In the Project Explorer window, you may need to delete the links to files

    c6713dskinit.c, C6713dskinit.h, Vectors_intr.asm, C6713dsk.cmd, and

    C6713DSK.ccxml and then use Project->Add Files in order to link to these files in wherever

    you have located folder C6713\Support.

    c) How to create new projects within the workspace folder provided, for

    further program examples taken from the CDROM supplied with the

    book.

    The following steps will transfer project firprn from the CDROM to the C:\C6713 CCSv5

    workspace. It is assumed here that CCSv5, the BSL and the workspace, including the folder

    Support have been installed exactly as described in scenario a).

    Select Project->New CCS Project and then set the project parameters as shown in Figure 11.

  • Figure 11: Parameters for new project firprn. Note that workspace C:\C6713 is used.

    Using Windows Explorer, copy the following files from folder C6713\firprn on the

    CDROM to the newly created project folder C:\C6713\firprn.

    firprn.c

    Noise_gen.h

    bs2700f.cof

    These should appear automatically in the Project Explorer window, as shown in Figure 12.

  • Figure 12: Project Explorer window after files firprn.c, noise_gen.h, and

    bs2700f.cof have been copied to folder C:\C6713\firprn.

    Right click on the project name firprn in the Project Explorer window, select Project->Add

    Files and add links to the following files in folder C:\C6713\Support

    c6713dskinit.c,

    C6713dskinit.h,

    Vectors_intr.asm,

    C6713dsk.cmd, and

    C6713DSK.ccxml.

  • Figure 13: Adding links to support files C6713dsk.cmd and C6713DSK.ccxml to project

    firprn.

    Right click on the project name firprn in the Project Explorer window, select Show Build

    Settings... and set up the C6000 Compiler and C6000 Linker as described previously in

    section b). You should now be able successfully to build, load, and run program example

    firprn.