help with hello world, DSK6713

Greetings all!

First post here.  total noob... Excited to be here! I have a DSK6713, and CC Studio  Version: 5.2.1.00018 .  Wouldn't post if I had not already struggled for hours.  Any help/suggestions would be most appreciated!

I'm trying to work through Rulph Chassaing's book, Digital Signal Processing and Applications with the C6713 and C6416 DSK . ( http://www.amazon.com/Digital-Signal-Processing-Applications-Topics/dp/0471690074/ref=la_B001IXMEOI_1_3?ie=UTF8&qid=1348296203&sr=1-3 ).

The book was really set up to to use CC3.0--it came with the board.  However, I have Windows 7, and after much trial-and-error, CC3.0 will not work with Windows 7.

Following the book, using CC5 instead--that shouldn't be a factor, I don't think-- for the first program, sine8_LED.    It seems I'm having some trouble compiling the c6713dskinit.c file.  The errors seem to be coming from the chip support library.  I did get the precompiled Sine8_LED.out to load on the board.  That part works ok, so I know the board works.

I started with a blank project, included all the required files spelled out in the book:

- Sine8_LED.c  (from Chassaing's book -- current project)

- c6713dsk.cmd (from Chassaing's book -- support folder)

- Vectors_poll.asm (from Chassaing's book --support folder)

- csl6713.lib (fresh download from http://c6000.spectrumdigital.com/dsk6713/... only existed in the bios folder).  D:\CCStudio_v5.2\ccsv5\tools\compiler\DSK6713(latest)\c6000\bios\lib

dsk6713bsl.lib (also fresh download from http://support.spectrumdigital.com)

- rts6700.lib (CCS5 C6000 compiler folder version 7.3.4)  D:\CCStudio_v5.2\ccsv5\tools\compiler\c6000_7.3.4\lib .  Did not find this library in the most recent compiler version 7.3.8, Also, reset build properties to use the 7.3.4 compiler.

- the dsk6713.gel file was NOT added automatically when the project was built.  Had to add it manually.  (also fresh download from spectrumdigital.com)  D:\CCStudio_v5.2\ccsv5\tools\compiler\DSK6713(latest)\cc\gel

Set all the compiler options per the book (spelled out build printout below):

**** Build of configuration Debug for project my_sine8LED ****

D:\CCStudio_v5.2\ccsv5\utils\bin\gmake -k all
'Building file: ../Sine8_LED.c'
'Invoking: C6000 Compiler'
"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mvc671x{-mv6710} -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CodeComposerWork/Chassaing_6713/sine8_LED" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --display_error_number --diag_warning=225 --abi=coffabi --preproc_with_compile --preproc_dependency="Sine8_LED.pp"  "../Sine8_LED.c"
>> WARNING: invalid version 0, defaulting to 6200
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1041: error #838: unrecognized cregister name 'FADCR'

>> Compilation failure
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1041: error #658-D: the modifier "cregister" is not allowed on this declaration
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1240: error #838: unrecognized cregister name 'FAUCR'
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1240: error #658-D: the modifier "cregister" is not allowed on this declaration
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1451: error #838: unrecognized cregister name 'FMCR'
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1451: error #658-D: the modifier "cregister" is not allowed on this declaration
"../Sine8_LED.c", line 15: warning #225-D: function declared implicitly
'Building file: ../Vectors_poll.asm'
"../Sine8_LED.c", line 16: warning #225-D: function declared implicitly
"../Sine8_LED.c", line 17: warning #225-D: function declared implicitly
"../Sine8_LED.c", line 20: warning #225-D: function declared implicitly
"../Sine8_LED.c", line 22: warning #225-D: function declared implicitly
"../Sine8_LED.c", line 23: warning #225-D: function declared implicitly
"../Sine8_LED.c", line 26: warning #225-D: function declared implicitly
6 errors detected in the compilation of "../Sine8_LED.c".
gmake: *** [Sine8_LED.obj] Error 1
'Invoking: C6000 Compiler'
"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mvc671x{-mv6710} -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CodeComposerWork/Chassaing_6713/sine8_LED" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --display_error_number --diag_warning=225 --abi=coffabi --preproc_with_compile --preproc_dependency="Vectors_poll.pp"  "../Vectors_poll.asm"
>> WARNING: invalid version 0, defaulting to 6200
'Finished building: ../Vectors_poll.asm'
' '
'Building file: ../c6713dskinit.c'
'Invoking: C6000 Compiler'
"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mvc671x{-mv6710} -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CodeComposerWork/Chassaing_6713/sine8_LED" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --display_error_number --diag_warning=225 --abi=coffabi --preproc_with_compile --preproc_dependency="c6713dskinit.pp"  "../c6713dskinit.c"
>> WARNING: invalid version 0, defaulting to 6200
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1041: error #838: unrecognized cregister name 'FADCR'

"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1041: error #658-D: the modifier "cregister" is not allowed on this declaration
>> Compilation failure
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1240: error #838: unrecognized cregister name 'FAUCR'
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1240: error #658-D: the modifier "cregister" is not allowed on this declaration
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1451: error #838: unrecognized cregister name 'FMCR'
"D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include/csl_chiphal.h", line 1451: error #658-D: the modifier "cregister" is not allowed on this declaration
6 errors detected in the compilation of "../c6713dskinit.c".
gmake: *** [c6713dskinit.obj] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ******** Build of configuration Debug for project my_sine8LED ****

It has to be something simple, but I'm just not seeing it.  The two .c programs are listed below as well...

//sine8_LED.c  sine generation with DIP switch control

#include "dsk6713_aic23.h"                              //codec support
Uint32 fs = DSK6713_AIC23_FREQ_8KHZ;                    //set sampling rate
#define DSK6713_AIC23_INPUT_MIC 0x0015
#define DSK6713_AIC23_INPUT_LINE 0x0011
Uint16 inputsource=DSK6713_AIC23_INPUT_MIC;             //select input
#define LOOPLENGTH 8
short loopindex = 0;                                    //table index
short gain = 10;                                        //gain factor
short sine_table[LOOPLENGTH]={0,707,1000,707,0,-707,-1000,-707}; //sine values

void main()
{
  comm_poll();                                          //init DSK,codec,McBSP
  DSK6713_LED_init();                                   //init LED from BSL
  DSK6713_DIP_init();                                   //init DIP from BSL
  while(1)                                              //infinite loop
  {
    if(DSK6713_DIP_get(0)==0)                           //=0 if DIP switch #0 pressed
    {
      DSK6713_LED_on();                                 //turn LED #0 ON
      output_left_sample(sine_table[loopindex++]*gain); //output sample
      if (loopindex >= LOOPLENGTH) loopindex = 0;       //reset table index
    }
    else DSK6713_LED_off(0);                            //turn LED off if not pressed
  }                                                     //end of while(1) infinite loop
}                                                       //end of main

//C6713dskinit.c Includes functions from TI in the C6713 CSL and C6713DSK BSL

#include "C6713dskinit.h"
#define using_bios                                           //if BIOS don't use top of vector table
extern Uint32 fs;                                            //for sampling frequency
extern Uint16 inputsource;

void c6713_dsk_init()                                        //dsp-peripheral initialization
{
DSK6713_init();                                              //call BSL to init DSK-EMIF,PLL)

hAIC23_handle=DSK6713_AIC23_openCodec(0, &config);           //handle(pointer) to codec
DSK6713_AIC23_setFreq(hAIC23_handle, fs);                    //set sample rate
DSK6713_AIC23_rset(hAIC23_handle, 0x0004, inputsource);      // choose mic or line in
MCBSP_config(DSK6713_AIC23_DATAHANDLE,&AIC23CfgData);        //interface 32 bits toAIC23

MCBSP_start(DSK6713_AIC23_DATAHANDLE, MCBSP_XMIT_START | MCBSP_RCV_START |
    MCBSP_SRGR_START | MCBSP_SRGR_FRAMESYNC, 220);           //start data channel again
}

void comm_poll()                                             //added for communication/init using polling
{
    poll=1;                                                  //1 if using polling
   c6713_dsk_init();                                         //init DSP and codec
}

void comm_intr()                                             //for communication/init using interrupt
{
    poll=0;                                                  //0 since not polling
   IRQ_globalDisable();                                      //disable interrupts
    c6713_dsk_init();                                        //init DSP and codec
    CODECEventId=MCBSP_getXmtEventId(DSK6713_AIC23_codecdatahandle);//McBSP1 Xmit

#ifndef using_bios                                           //do not need to point to vector table
      IRQ_setVecs(vectors);                                  //point to the IRQ vector table
#endif                                                       //since interrupt vector handles this

      IRQ_map(CODECEventId, 11);                             //map McBSP1 Xmit to INT11
      IRQ_reset(CODECEventId);                               //reset codec INT 11
   IRQ_globalEnable();                                       //globally enable interrupts
      IRQ_nmiEnable();                                       //enable NMI interrupt
   IRQ_enable(CODECEventId);                                 //enable CODEC eventXmit INT11

    output_sample(0);                                        //start McBSP interrupt outputting a sample
}

void output_sample(int out_data)                             //for out to Left and Right channels
{
    short CHANNEL_data;

    AIC_data.uint=0;                                         //clear data structure
    AIC_data.uint=out_data;                                  //32-bit data -->data structure

//The existing interface defaults to right channel. To default instead to the
//left channel and use output_sample(short), left and right channels are swapped
//In main source program use LEFT 0 and RIGHT 1 (opposite of what is used here)


    CHANNEL_data=AIC_data.channel[RIGHT];                     //swap left and right channels
    AIC_data.channel[RIGHT]=AIC_data.channel[LEFT];
    AIC_data.channel[LEFT]=CHANNEL_data;
   if (poll) while(!MCBSP_xrdy(DSK6713_AIC23_DATAHANDLE));    //if ready to transmit
        MCBSP_write(DSK6713_AIC23_DATAHANDLE,AIC_data.uint);  //write/output data
}

void output_left_sample(short out_data)                       //for output from left channel
{
    AIC_data.uint=0;                                          //clear data structure
    AIC_data.channel[LEFT]=out_data;                          //data from Left channel -->data structure

    if (poll) while(!MCBSP_xrdy(DSK6713_AIC23_DATAHANDLE));   //if ready to transmit
        MCBSP_write(DSK6713_AIC23_DATAHANDLE,AIC_data.uint);  //output left channel
}

void output_right_sample(short out_data)                      //for output from right channel
{
    AIC_data.uint=0;                                          //clear data structure
    AIC_data.channel[RIGHT]=out_data; //data from Right channel -->data structure

    if (poll) while(!MCBSP_xrdy(DSK6713_AIC23_DATAHANDLE));   //if ready to transmit
        MCBSP_write(DSK6713_AIC23_DATAHANDLE,AIC_data.uint);  //output right channel
}

Uint32 input_sample()                                         //for 32-bit input
{
    short CHANNEL_data;

    if (poll) while(!MCBSP_rrdy(DSK6713_AIC23_DATAHANDLE));   //if ready to receive
         AIC_data.uint=MCBSP_read(DSK6713_AIC23_DATAHANDLE);  //read data

//Swapping left and right channels (see comments in output_sample())
    CHANNEL_data=AIC_data.channel[RIGHT];                     //swap left and right channel
    AIC_data.channel[RIGHT]=AIC_data.channel[LEFT];
    AIC_data.channel[LEFT]=CHANNEL_data;

    return(AIC_data.uint);
}

short input_left_sample()                                     //input to left channel
{
    if (poll) while(!MCBSP_rrdy(DSK6713_AIC23_DATAHANDLE));   //if ready to receive
     AIC_data.uint=MCBSP_read(DSK6713_AIC23_DATAHANDLE);      //read into left channel
    return(AIC_data.channel[LEFT]);                           //return left channel data
}

short input_right_sample()                                    //input to right channel
{
    if (poll) while(!MCBSP_rrdy(DSK6713_AIC23_DATAHANDLE));   //if ready to receive
     AIC_data.uint=MCBSP_read(DSK6713_AIC23_DATAHANDLE);      //read into right channel
    return(AIC_data.channel[RIGHT]);                          //return right channel data
}

  • Darrell,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages. Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics.

    And thank you for already being a leader in the Community by replying with helpful advice to a user.

    I do not remember seeing braces in the compiler arg list. Is "-mvc671x{-mv6710}" the way it printed out to your screen or is it annotated? This is probably very relevant since each of the builds has the warning line below.

    Darrell Thomas
    >> WARNING: invalid version 0, defaulting to 6200

    The three sets of errors all look alike and they all have to do with csl_chiphal.h. My copies do not match with yours, in fact mine do not have a non-comment line with FADCR, at line 1041 or any other. Mine are also at least 5 years old, so your newer version is the best choice, of course.

    The -mv is probably the problem, though. Fix it and see how things work.

    What you have at the top of your first post here is great documentation of what you have done. One thing about the GEL file: The GEL file can be attached to the Target Configuration so it will run automatically when the emulator is connected and when you load or reset, depending on which commands are defined in the GEL file.

    Please report here what you do to get one of the Chassaing examples to work with CCSv5. There have been others who wanted to do that, and you can continue your leadership role.

    Regards,
    RandyP

     

  • In reply to RandyP:

    Thank you Randy,

    I took out the listed compiler target and changed it to "6700", as in some of the examples that came with the Spectrum Digital download.  I also noticed that the program is slightly different from the text, so I went in line-by-line to make it "exactly" as the text  This cleaned up the 6 errors, as you predicted.

    I'm trying to be as detailed as I can as I work through setting this up.  Hopefully it will save someone else a few hours.

    Now, about the warnings:

    There were a few functions that needed to be prototyped in the sine8_LED.c file.  I carefully traced back all the headers, and found that two functions were in headers that were not referenced, so I added two headers to declare a few functions like DSK6713_DIP_on() and DSK6713_LED_on() that exist in the sine8_LED.c code.  In addition,  one of the functions takes a Uint argument to specify "which" LED gets enabled--which was not in the code.  I suspect the function may have changed over the years.

    #include "dsk6713_led.h"
    #include "dsk6713_dip.h"

    While I was dealing with headers, I added inclusion guards around "C6713dskinit.h" in case it was referenced more than once:

    #ifndef C6713_DSKINIT_

    #define C6713_DSKINIT_

    ...(header code)...

    #endif

    That cleaned up the " warning #225-D: function declared implicitly" except for two declarations I added to the sine8_LED.c code.

    void comm_poll();               
    void output_left_sample(short out_data);

    The comm_poll() function is defined in c6713dskinit.c and prototyped in c6713dskinit.h.  Simply adding #include "c6713dskinit.h" to the sine8_LED.c file doesn't work.  It spits out  a few errors:

    **** Build of configuration Debug for project my_sine8LED ****
    ...
    <Linking>
    error #10056: symbol "_config" redefined: first defined in

       "./c6713dskinit.obj"; redefined in "./Sine8_LED.obj"
    >> Compilation failure
    error #10056: symbol "_AIC_data" redefined: first defined in
       "./c6713dskinit.obj"; redefined in "./Sine8_LED.obj"
    error #10056: symbol "_hAIC23_handle" redefined: first defined in
       "./c6713dskinit.obj"; redefined in "./Sine8_LED.obj"
    error #10056: symbol "_AIC23CfgData" redefined: first defined in
       "./c6713dskinit.obj"; redefined in "./Sine8_LED.obj"
    error #10010: errors encountered during linking; "my_sine8LED.out" not built
    gmake: *** [my_sine8LED.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    Adding the prototypes to the sin8_LED.c program seems to work.  It compiles with warnings, but no errors --yeah!:  So, I have a sine8_LED.out file, but it won't load on the board.  Note the last warning at the bottom.  Looks like linker/memory issues, so I'm diving into:

    http://www.ti.com/lit/an/spraa46a/spraa46a.pdf                      (linker techniques for efficient memory usage)

    Any other suggestions to read?  It may be a simple issue of setting up the linker properly.  I'm not too familiar with the ins-outs of the linker.  Hopefully, some of the TI documentation will help.

    On a side note, I did get some of the examples and tutorials to compile and load  from the Spectrum Digital site,

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

    but I don't know what they "do".  In my most recent update, I have not found any documentation that walks you through the examples and tutorials.  The code is just "there".  Short example:  At the beginning of the sine.c code (from the spectrumdigital site) says:

    // ****************************************************************
    // Description: This application uses Probe Points to obtain input
    // (a sine wave). It then takes this signal, and applies a gain
    // factor to it.
    // Filename: Sine.c
    // ****************************************************************

    I'm not familiar with probe points.  Since the program was found in the /tutorials folder, I would have hoped it would have been explained somewhere. :(.  Most all of the tutorials are like that.  I haven't found a meaningful one yet.


    Latest build output:

    ================================================================

    **** Build of configuration Debug for project my_sine8LED ****


    D:\CCStudio_v5.2\ccsv5\utils\bin\gmake -k all
    'Building file: ../Sine8_LED.c'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --display_error_number --diag_warning=225 --abi=coffabi --preproc_with_compile --preproc_dependency="Sine8_LED.pp"  "../Sine8_LED.c"
    'Finished building: ../Sine8_LED.c'
    ' '
    'Building target: my_sine8LED.out'
    'Invoking: C6000 Linker'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --display_error_number --diag_warning=225 --abi=coffabi -z -m"my_sine8LED.map" --stack_size=0x800 --heap_size=0x800 --warn_sections --display_error_number -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/lib" -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --reread_libs --rom_model -o "my_sine8LED.out"  "./c6713dskinit.obj" "./Vectors_poll.obj" "./Sine8_LED.obj" -l"libc.a" "../C6713dsk.cmd" "../csl6713.lib" "../dsk6713bsl.lib" "../rts6700.lib"
    <Linking>
    "../c6713dskinit.c", line 15: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000068, section = ".text")
    "../c6713dskinit.c", line 17: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000128, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x000001ac, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x000002dc, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000300, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x0000032c, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000370, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000394, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x000003c4, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000408, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x0000042c, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000450, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000480, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x000004a4, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x000004c8, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000534, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x00000558, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x0000057c, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x000005c4, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x000005e8, section = ".text")
    "../c6713dskinit.c", line 19: warning #17009-D: relocation type is static
       base-relative, but references symbol "_DSK6713_AIC23_codecdatahandle"
       defined in section ".far"; references to section ".far" are not relative to
       any static base, so this relocation cannot be performed (type = 'R_C60BASE'
       (80), file = "./c6713dskinit.obj", offset = 0x0000060c, section = ".text")
    warning #10015-D: output file "my_sine8LED.out" cannot be loaded and run on a
       target system
    'Finished building target: my_sine8LED.out'
    ' '

    **** Build Finished ****



  • In reply to Darrell Thomas:

    Darrell,

    Thanks for the detail and for continuing this on the forum. It may be best to remove the Answered flag until we are done, since other support people may not think you still need help. Once you are completely done, then please mark Answered on the best choice post(s).

    Darrell Thomas
    Adding the prototypes to the sin8_LED.c program seems to work.  It compiles with warnings, but no errors --yeah!:

    To me, a warning is as bad as an error because it is something showing up in the Problems window. I want that to be empty. Mainly, this is to make sure I do not miss a warning that is really bad. The warnings in your linker output are really bad.

    I think this is due to using the wrong memory model in the compiles. In the Build Properties -> C6000 Compiler -> Runtime Model Options, there is a selection for "Data access model (--mem_model:data). The default may be near, and that may be incompatible with one or more of the libraries since they use the .far section. Change this to either "far" or "far_aggregate" and see if the linker works better.

    It is possible that you will want to re-build all of the libraries to make sure they are completely compatible with the newest build tools that you are using. This could also be a factor in the linker warnings.

    Re Probe Points: In CCS Help->Search, you can look for probe points and find a little bit of information. I think we have a tutorial for probe points that uses the stairstep example. I think I had a problem getting the stairstep example to build with SYS/BIOS, so there may be a default setting that needs to change for it. I did not look farther, but if you try it and have a problem, start a new thread about that in the Code Composer forum, and please mention it in this thread, mainly for my sake since I do not look through the Code Composer forum very often.

    Regards,
    RandyP

  • In reply to RandyP:

    Randy,

    Yeah!  The --mem_model:data = far did the trick to clean up the linking errors. (latest build below). So now, I have a seemingly good .out file, and trying to load it on the board. For comparison, the sine8_LED.out that comes with the Chassaing book loads, and runs as advertised.  The one I build "looks" ok, but unfortunately, it's not running on the board.

    Let's see if I can summarize the errors: 

    1.  I cleaned, and built the debug version.  I started the debugger, and Code Composer connects and loads my_sine8_LED.out program into the board.  I'm using the Spectrum Digital DSK-EVM-eZdsp onboard USB Emulator_0/TMS320671X, and it starts (Running), instead of (Suspended) as expected. My compiled program does not work, all four LEDs are lit, and there is no tone when DIP(0) is pressed.

    2.  I'll press the "pause" button in CCS5 to stop the program, and I get the following error:  Trouble Halting Target CPU:  Errror 0x80000020/-1060, Fatal Error During Execution...

    3.  I follow the recommendations to restart..   Disconnect the board, reset the emulator, and reset the board (reset button).  The board re-boots with a good POST.

    4.  At this point, I can reload my program, or reload the pre-compiled program.  If I connect, load, and run the pre-compiled program,  I get a working program.   If I connect, load and run "my" program, I'm back where I started (except the program starts without my intervention).  It is not responsive.

    I'm still thinking it is something to do with the compile/link settings.  I looked a bit at the CSL, and the BSL, and I'm reluctant to think it's anything in there, unless TI changed formats, and the Chassaing example isn't current.. but in that case, I think I would get hard compile errors, which are all cleaned up.

    The other thing I could think of are my "fidgeting" with the source code--  (added headers, and prototypes for undeclared functions).   I took out all my "fidgets" and tested that, but it still doesn't run... and as expected...pick up a few "function delcared implicitly" warnings in the process.  In the end, I don't think it is a factor.

    Just to rule out some simple stuff,  I've confirmed that I am loading a freshly built my_sine8_LED.out  and not an old one left laying around.

    When you say "rebuild your libraries,"  what are you referring to?  the CSL, BSL, and RTS6700.lib?  These come from TI right?  All I have (I think) are the headers and the .obj files.  Of note, the latest compiler (7.3.8) doesn't have the RTS6700.lib, so I had to use the one-off compiler (7.3.4) to make use of this library.

    I feel like I'm making headway.  This is one of the most difficult "hello world" programs I've seen in a while.  End the end though--once I can get through this, I think the rest of the learning curve won't be so steep.  I'd almost want to start debugging the executable, but I don't really know where to start.  This is probably the simplest of simple programs and it "should" work without too much frustration.  At least I'm learning stuff as I try to work through the problem. 

    Once I get it running, I'll write up a summary to post on here so others can make the jump easily.  I emailed the guys at Spectrum Digital.  They replied and basically washed their hands of it saying they had no CCS 5 projects they were working on for the DSK6713.  I guess they expect to sell me a board in 2012, and have me roll back to CCS 3.1, (and downgrade my computer as well).

    No worries.  We'll get 'er done!

    I haven't looked at the probe points yet.  Will do once I get past this hurdle.

    dt


    **** Build of configuration Debug for project my_sine8LED ****

    D:\CCStudio_v5.2\ccsv5\utils\bin\gmake -k all
    'Building file: ../Sine8_LED.c'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --display_error_number --mem_model:data=far --abi=coffabi --optimizer_interlist --analyze_only -k --src_interlist --preproc_with_compile --preproc_dependency="Sine8_LED.pp"  "../Sine8_LED.c"
    'Finished building: ../Sine8_LED.c'
    ' '
    'Building file: ../Vectors_poll.asm'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --display_error_number --mem_model:data=far --abi=coffabi --optimizer_interlist --analyze_only -k --src_interlist --preproc_with_compile --preproc_dependency="Vectors_poll.pp"  "../Vectors_poll.asm"
    'Finished building: ../Vectors_poll.asm'
    ' '
    'Building file: ../c6713dskinit.c'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --display_error_number --mem_model:data=far --abi=coffabi --optimizer_interlist --analyze_only -k --src_interlist --preproc_with_compile --preproc_dependency="c6713dskinit.pp"  "../c6713dskinit.c"
    'Finished building: ../c6713dskinit.c'
    ' '
    'Building target: my_sine8LED.out'
    'Invoking: C6000 Linker'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --display_error_number --mem_model:data=far --abi=coffabi --optimizer_interlist --analyze_only -k --src_interlist -z -m"my_sine8LED.map" --stack_size=0x800 --heap_size=0x800 --warn_sections --display_error_number -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/lib" -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --reread_libs --relocatable --rom_model --trampolines=on -o "my_sine8LED.out"  "./c6713dskinit.obj" "./Vectors_poll.obj" "./Sine8_LED.obj" -l"rts6700.lib" "../C6713dsk.cmd" "../csl6713.lib" "../dsk6713bsl.lib" "../rts6700.lib"
    <Linking>
    'Finished building target: my_sine8LED.out'
    ' '

    **** Build Finished ****


  • In reply to Darrell Thomas:

    Darrell,

    I am very surprised that we dropped rts6700.lib. This had to have been intentional, and that means you definitely want to stay with CGT 7.3.4 for now.

    1. Hello World would be simpler than this. My first suggestion is to make a true Hello World to see if you can get a program to build and load and run. When you load it, it should run to main() and stop. Then you can Run (Resume) to see the awesome printout on the Console window.

    2. When I said to rebuild your libraries, I meant all of them that are not supplied with the compile tools. So csl6713.lib, and dsk6713bsl.lib. Since those were probably built with much older compilers, this would just be a way to make sure there are no compatibility issues. You could put it off a little if you want to narrow down the culprit first, but this may be needed.

    3. Please show or attach the .map and .cmd files that you are using, my_sine8LED.map and C6713dsk.cmd.

    4. I had a big exam in an EE class in college, and we were told to read through the whole test before starting to work on it. The first four problems were really difficult, like to design a multi-controller system for the elevators in a 120-story office building. Keep in mind this was with an 8-bit micro before K&R wrote their first book on C. The fifth problem was to notice it was April 1st and to go up to the instructor to get the real exam. Nothing related to this thread, other than I think #5 may be the answer and I just now saw it.

    5. --analyze_only is something I have never used. I do not believe you want to use it here. If you have a reason for using it, please let me know so I will understand it. But I think it keeps the tool from doing what you really want it to do. Take this out and see how it works. I could guess it was an unusual artifact from the import process, but it was not in your earlier switch lists.

    Regards,
    RandyP

  • In reply to RandyP:

    1.  Got "hello world to work as advertised-- within a DSP BIOS example.  So that's good news.   See attached.

    2.  Where to get the source for the CSL and BSL? 

    3.  See below:

    4.  For a philosophy exam, the prof listed a one-word question:  "Why?"  Most deliberated and essayed for hours.  The guy that answered, "Why not?" got the A.

    5. I took out analyze_only.  I may have added that in an attempt to interlist the .asm and .c for debugging.  It's down on the bottom of the "feedback options" page, and was inadvertent.  No luck on fixing the run though. 

    dt

    **** Build of configuration Debug for project my_sine8LED ****

    D:\CCStudio_v5.2\ccsv5\utils\bin\gmake -k all
    'Building file: ../Sine8_LED.c'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --mem_model:data=far --abi=coffabi -k --src_interlist --preproc_with_compile --preproc_dependency="Sine8_LED.pp"  "../Sine8_LED.c"
    'Finished building: ../Sine8_LED.c'
    ' '
    'Building file: ../Vectors_poll.asm'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --mem_model:data=far --abi=coffabi -k --src_interlist --preproc_with_compile --preproc_dependency="Vectors_poll.pp"  "../Vectors_poll.asm"
    'Finished building: ../Vectors_poll.asm'
    ' '
    'Building file: ../c6713dskinit.c'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --mem_model:data=far --abi=coffabi -k --src_interlist --preproc_with_compile --preproc_dependency="c6713dskinit.pp"  "../c6713dskinit.c"
    'Finished building: ../c6713dskinit.c'
    ' '
    'Building target: my_sine8LED.out'
    'Invoking: C6000 Linker'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g -O0 -ms0 --define=CHIP_6713 --mem_model:data=far --abi=coffabi -k --src_interlist -z -m"my_sine8LED.map" --warn_sections --display_error_number -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/lib" -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --reread_libs --relocatable --rom_model --trampolines=on -o "my_sine8LED.out"  "./c6713dskinit.obj" "./Vectors_poll.obj" "./Sine8_LED.obj" -l"libc.a" "../C6713dsk.cmd" "../csl6713.lib" "../dsk6713bsl.lib" "../rts6700.lib"
    <Linking>
    'Finished building target: my_sine8LED.out'
    ' '

    **** Build Finished ****

    3.  .cmd

    /*C6713dsk.cmd  Linker command file*/

    MEMORY
    {
      IVECS:    org=0h,          len=0x220
      IRAM:        org=0x00000220,    len=0x0002FDE0 /*internal memory*/
      SDRAM:    org=0x80000000, len=0x01000000 /*external memory*/
      FLASH:    org=0x90000000, len=0x00020000 /*flash memory*/                    
    }

    SECTIONS
    {
      .EXT_RAM :> SDRAM
      .vectors :> IVECS    /*in vector file*/
      .text    :> IRAM    /*Created by C Compiler*/
      .bss     :> IRAM
      .cinit   :> IRAM
      .stack   :> IRAM
      .sysmem  :> IRAM
      .const   :> IRAM
      .switch  :> IRAM
      .far     :> IRAM
      .cio     :> IRAM
      .csldata :> IRAM
    }

    3.  .map

    ******************************************************************************
                   TMS320C6x Linker PC v7.3.4                      
    ******************************************************************************
    >> Linked Tue Sep 25 20:34:01 2012

    OUTPUT FILE NAME:   <my_sine8LED.out>
    ENTRY POINT SYMBOL: "_c_int00"  address: 00002f00


    MEMORY CONFIGURATION

             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      IVECS                 00000000   00000220  00000200  00000020  RWIX
      IRAM                  00000220   0002fde0  0000396c  0002c474  RWIX
      SDRAM                 80000000   01000000  00000000  01000000  RWIX
      FLASH                 90000000   00020000  00000000  00020000  RWIX


    SECTION ALLOCATION MAP

     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .vectors   0    00000000    00000200     
                      00000000    00000200     Vectors_poll.obj (.vectors)

    .text      0    00000220    00003420     
                      00000220    000007a0     c6713dskinit.obj (.text)
                      000009c0    00000480     dsk6713bsl.lib : dsk6713.obj (.text)
                      00000e40    00000300                    : dsk6713_aic23_opencodec.obj (.text)
                      00001140    000002e0     csl6713.lib : csl_irq.obj (.text:_IRQ_hook)
                      00001420    00000240     rts6700.lib : memcpy62.obj (.text:_memcpy)
                      00001660    000001e0     dsk6713bsl.lib : dsk6713_led.obj (.text)
                      00001840    000001c0     csl6713.lib : csl_irq.obj (.text:_IRQ_map)
                      00001a00    000001c0                 : csl_irq.obj (.text:_mux2Tables)
                      00001bc0    000001a0                 : csl_mcbsp.obj (.text:_MCBSP_reset)
                      00001d60    00000160     rts6700.lib : autoinit.obj (.text:__auto_init)
                      00001ec0    00000140                 : strasg.obj (.text:__strasgi)
                      00002000    00000140     dsk6713bsl.lib : dsk6713_aic23_registers.obj (.text)
                      00002140    00000120     rts6700.lib : exit.obj (.text:_exit)
                      00002260    00000100     Sine8_LED.obj (.text)
                      00002360    00000100     csl6713.lib : csl_mcbsp.obj (.text:_MCBSP_open)
                      00002460    00000100                 : csl_mcbsp.obj (.text:_MCBSP_start)
                      00002560    000000e0                 : csl_irq.obj (.text:_IRQ_config)
                      00002640    000000e0                 : csl_irq.obj (.text:_IRQ_getConfig)
                      00002720    000000e0     rts6700.lib : strasg.obj (.text:__strasg)
                      00002800    000000c0     csl6713.lib : csl_irq.obj (.text:_IRQ_configArgs)
                      000028c0    000000c0     rts6700.lib : cpy_tbl.obj (.text:_copy_in)
                      00002980    000000c0     dsk6713bsl.lib : dsk6713_aic23_setfreq.obj (.text)
                      00002a40    000000a0     csl6713.lib : csl_irq.obj (.text:_IRQ_getArg)
                      00002ae0    000000a0                 : csl_irq.obj (.text:_IRQ_setArg)
                      00002b80    000000a0                 : csl_mcbsp.obj (.text:_MCBSP_close)
                      00002c20    000000a0                 : csl_mcbsp.obj (.text:_MCBSP_config)
                      00002cc0    000000a0                 : csl_irq.obj (.text:__IRQ_init)
                      00002d60    000000a0                 : csl_irq.obj (.text:_setMux)
                      00002e00    00000080                 : csl_mcbsp.obj (.text:_MCBSP_configArgs)
                      00002e80    00000080                 : csl_mcbsp.obj (.text:_MCBSP_getConfig)
                      00002f00    00000080     rts6700.lib : boot.obj (.text:_c_int00)
                      00002f80    00000080     dsk6713bsl.lib : dsk6713_dip.obj (.text)
                      00003000    00000060     csl6713.lib : csl_irq.obj (.text:_IRQ_restore)
                      00003060    00000040                 : csl_irq.obj (.text:_IRQ_disable)
                      000030a0    00000040                 : csl_irq.obj (.text:_IRQ_enable)
                      000030e0    00000040                 : csl_irq.obj (.text:_IRQ_reset)
                      00003120    00000040                 : csl_irq.obj (.text:_IRQ_resetAll)
                      00003160    00000040                 : csl_irq.obj (.text:_IRQ_test)
                      000031a0    00000040                 : csl_mcbsp.obj (.text:_MCBSP_setPins)
                      000031e0    00000040     rts6700.lib : args_main.obj (.text:__args_main)
                      00003220    00000020     Vectors_poll.obj (.text)
                      00003240    00000020     csl6713.lib : csl_irq.obj (.text:_IRQ_biosPresent)
                      00003260    00000020                 : csl_irq.obj (.text:_IRQ_clear)
                      00003280    00000020                 : csl_irq.obj (.text:_IRQ_globalDisable)
                      000032a0    00000020                 : csl_irq.obj (.text:_IRQ_globalEnable)
                      000032c0    00000020                 : csl_irq.obj (.text:_IRQ_globalRestore)
                      000032e0    00000020                 : csl_irq.obj (.text:_IRQ_nmiDisable)
                      00003300    00000020                 : csl_irq.obj (.text:_IRQ_nmiEnable)
                      00003320    00000020                 : csl_irq.obj (.text:_IRQ_set)
                      00003340    00000020                 : csl_irq.obj (.text:_IRQ_setVecs)
                      00003360    00000020                 : csl_mcbsp.obj (.text:_MCBSP_enableFsync)
                      00003380    00000020                 : csl_mcbsp.obj (.text:_MCBSP_enableRcv)
                      000033a0    00000020                 : csl_mcbsp.obj (.text:_MCBSP_enableSrgr)
                      000033c0    00000020                 : csl_mcbsp.obj (.text:_MCBSP_enableXmt)
                      000033e0    00000020                 : csl_mcbsp.obj (.text:_MCBSP_getPins)
                      00003400    00000020                 : csl_mcbsp.obj (.text:_MCBSP_getRcvAddr)
                      00003420    00000020                 : csl_mcbsp.obj (.text:_MCBSP_getRcvEventId)
                      00003440    00000020                 : csl_mcbsp.obj (.text:_MCBSP_getXmtAddr)
                      00003460    00000020                 : csl_mcbsp.obj (.text:_MCBSP_getXmtEventId)
                      00003480    00000020                 : csl_mcbsp.obj (.text:_MCBSP_read)
                      000034a0    00000020                 : csl_mcbsp.obj (.text:_MCBSP_resetAll)
                      000034c0    00000020                 : csl_mcbsp.obj (.text:_MCBSP_rfull)
                      000034e0    00000020                 : csl_mcbsp.obj (.text:_MCBSP_rrdy)
                      00003500    00000020                 : csl_mcbsp.obj (.text:_MCBSP_rsyncerr)
                      00003520    00000020                 : csl_mcbsp.obj (.text:_MCBSP_write)
                      00003540    00000020                 : csl_mcbsp.obj (.text:_MCBSP_xempty)
                      00003560    00000020                 : csl_mcbsp.obj (.text:_MCBSP_xrdy)
                      00003580    00000020                 : csl_mcbsp.obj (.text:_MCBSP_xsyncerr)
                      000035a0    00000020     rts6700.lib : _lock.obj (.text:__nop)
                      000035c0    00000020                 : _lock.obj (.text:__register_lock)
                      000035e0    00000020                 : _lock.obj (.text:__register_unlock)
                      00003600    00000020                 : exit.obj (.text:_abort)
                      00003620    00000020     csl6713.lib : csl_irq.obj (.text)

    .cinit     0    00003640    000002dc     
                      00003640    0000012c     csl6713.lib : csl_irq.obj (.cinit)
                      0000376c    00000004     --HOLE-- [fill = 0]
                      00003770    00000058     Sine8_LED.obj (.cinit)
                      000037c8    00000058     c6713dskinit.obj (.cinit)
                      00003820    00000054     csl6713.lib : csl_mcbsp.obj (.cinit)
                      00003874    00000004     --HOLE-- [fill = 0]
                      00003878    00000030     dsk6713bsl.lib : dsk6713_aic23_registers.obj (.cinit)
                      000038a8    0000002c     rts6700.lib : exit.obj (.cinit)
                      000038d4    00000004     --HOLE-- [fill = 0]
                      000038d8    00000028     dsk6713bsl.lib : dsk6713_aic23_setfreq.obj (.cinit)
                      00003900    0000001c     rts6700.lib : _lock.obj (.cinit)

    .far       0    0000391c    00000208     UNINITIALIZED
                      0000391c    000000f4     csl6713.lib : csl_irq.obj (.far)
                      00003a10    00000058     c6713dskinit.obj (.far)
                      00003a68    00000038     csl6713.lib : csl_mcbsp.obj (.far)
                      00003aa0    00000028     dsk6713bsl.lib : dsk6713_aic23_registers.obj (.far)
                      00003ac8    00000020                    : dsk6713_aic23_setfreq.obj (.far)
                      00003ae8    0000001c     Sine8_LED.obj (.far)
                      00003b04    0000000c     rts6700.lib : exit.obj (.far)
                      00003b10    00000008     dsk6713bsl.lib : dsk6713_aic23_opencodec.obj (.far)
                      00003b18    00000008     rts6700.lib : _lock.obj (.far)
                      00003b20    00000002     dsk6713bsl.lib : dsk6713.obj (.far)
                      00003b22    00000002                    : dsk6713_led.obj (.far)

    .const     0    00003b24    00000060     
                      00003b24    00000040     dsk6713bsl.lib : dsk6713_aic23_opencodec.obj (.const)
                      00003b64    00000020                    : dsk6713.obj (.const)

    .stack     0    00003b88    00000008     UNINITIALIZED
                      00003b88    00000008     rts6700.lib : boot.obj (.stack)


    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

    address    name
    --------   ----
    00000000   $bss
    00003600   C$$EXIT
    00003a1c   _AIC23CfgData
    00003a10   _AIC_data
    00003b10   _DSK6713_AIC23_codeccontrolhandle
    00003b14   _DSK6713_AIC23_codecdatahandle
    000020c0   _DSK6713_AIC23_config
    00000e40   _DSK6713_AIC23_openCodec
    00002098   _DSK6713_AIC23_rget
    00002000   _DSK6713_AIC23_rset
    00002980   _DSK6713_AIC23_setFreq
    00002f88   _DSK6713_DIP_get
    00002f80   _DSK6713_DIP_init
    00001660   _DSK6713_LED_init
    000016a0   _DSK6713_LED_off
    00001710   _DSK6713_LED_on
    00001780   _DSK6713_LED_toggle
    00000dd4   _DSK6713_getVersion
    00000a0c   _DSK6713_init
    00000d28   _DSK6713_rget
    00000d3c   _DSK6713_rset
    00003b20   _DSK6713_version
    00000d50   _DSK6713_wait
    00000da8   _DSK6713_waitusec
    00003240   _IRQ_biosPresent
    00003260   _IRQ_clear
    00002560   _IRQ_config
    00002800   _IRQ_configArgs
    00003060   _IRQ_disable
    000030a0   _IRQ_enable
    00002a40   _IRQ_getArg
    00002640   _IRQ_getConfig
    00003280   _IRQ_globalDisable
    000032a0   _IRQ_globalEnable
    000032c0   _IRQ_globalRestore
    00001140   _IRQ_hook
    00001840   _IRQ_map
    000032e0   _IRQ_nmiDisable
    00003300   _IRQ_nmiEnable
    000030e0   _IRQ_reset
    00003120   _IRQ_resetAll
    00003000   _IRQ_restore
    00003320   _IRQ_set
    00002ae0   _IRQ_setArg
    00003340   _IRQ_setVecs
    00003160   _IRQ_test
    00002b80   _MCBSP_close
    00002c20   _MCBSP_config
    00002e00   _MCBSP_configArgs
    00003360   _MCBSP_enableFsync
    00003380   _MCBSP_enableRcv
    000033a0   _MCBSP_enableSrgr
    000033c0   _MCBSP_enableXmt
    00002e80   _MCBSP_getConfig
    000033e0   _MCBSP_getPins
    00003400   _MCBSP_getRcvAddr
    00003420   _MCBSP_getRcvEventId
    00003440   _MCBSP_getXmtAddr
    00003460   _MCBSP_getXmtEventId
    00002360   _MCBSP_open
    00003480   _MCBSP_read
    00001bc0   _MCBSP_reset
    000034a0   _MCBSP_resetAll
    000034c0   _MCBSP_rfull
    000034e0   _MCBSP_rrdy
    00003500   _MCBSP_rsyncerr
    000031a0   _MCBSP_setPins
    00002460   _MCBSP_start
    00003520   _MCBSP_write
    00003540   _MCBSP_xempty
    00003560   _MCBSP_xrdy
    00003580   _MCBSP_xsyncerr
    00003a08   __IRQ_dispatchTable
    00003944   __IRQ_eventTable
    00003620   __IRQ_hookFetchPacket
    00002cc0   __IRQ_init
    000039c8   __IRQ_intTable
    00003a98   __MCBSP_hDev0
    00003a9c   __MCBSP_hDev1
    UNDEFED    __STACK_END
    00000001   __TI_args_main
    00003b0c   ___TI_enable_exit_profile_output
    UNDEFED    ___TI_pprof_out_hndl
    UNDEFED    ___binit__
    UNDEFED    ___c_args__
    UNDEFED    ___cinit__
    UNDEFED    ___pinit__
    000031e0   __args_main
    00001d60   __auto_init
    00001ec0   __c6xabi_strasgi
    00003b04   __cleanup_ptr
    00003b08   __dtors_ptr
    00003b18   __lock
    000035a0   __nop
    000035c0   __register_lock
    000035e0   __register_unlock
    00003b88   __stack
    00002720   __strasg
    00001ec0   __strasgi
    00003b1c   __unlock
    00003600   _abort
    00000220   _c6713_dsk_init
    00002f00   _c_int00
    000003e0   _comm_intr
    000003ac   _comm_poll
    00003a3c   _config
    000028c0   _copy_in
    00002140   _exit
    00003ae8   _fs
    00003af0   _gain
    00003a64   _hAIC23_handle
    00000848   _input_left_sample
    000008f8   _input_right_sample
    00000770   _input_sample
    00003aec   _inputsource
    00003aee   _loop
    00002260   _main
    00001420   _memcpy
    00000600   _output_left_sample
    000006b8   _output_right_sample
    00000520   _output_sample
    00003af4   _sine_table
    00000020   _vector1
    00000140   _vector10
    00000160   _vector11
    00000180   _vector12
    000001a0   _vector13
    000001c0   _vector14
    000001e0   _vector15
    00000040   _vector2
    00000060   _vector3
    00000080   _vector4
    000000a0   _vector5
    000000c0   _vector6
    000000e0   _vector7
    00000100   _vector8
    00000120   _vector9
    00000000   _vectors


    GLOBAL SYMBOLS: SORTED BY Symbol Address

    address    name
    --------   ----
    00000000   $bss
    00000000   _vectors
    00000001   __TI_args_main
    00000020   _vector1
    00000040   _vector2
    00000060   _vector3
    00000080   _vector4
    000000a0   _vector5
    000000c0   _vector6
    000000e0   _vector7
    00000100   _vector8
    00000120   _vector9
    00000140   _vector10
    00000160   _vector11
    00000180   _vector12
    000001a0   _vector13
    000001c0   _vector14
    000001e0   _vector15
    00000220   _c6713_dsk_init
    000003ac   _comm_poll
    000003e0   _comm_intr
    00000520   _output_sample
    00000600   _output_left_sample
    000006b8   _output_right_sample
    00000770   _input_sample
    00000848   _input_left_sample
    000008f8   _input_right_sample
    00000a0c   _DSK6713_init
    00000d28   _DSK6713_rget
    00000d3c   _DSK6713_rset
    00000d50   _DSK6713_wait
    00000da8   _DSK6713_waitusec
    00000dd4   _DSK6713_getVersion
    00000e40   _DSK6713_AIC23_openCodec
    00001140   _IRQ_hook
    00001420   _memcpy
    00001660   _DSK6713_LED_init
    000016a0   _DSK6713_LED_off
    00001710   _DSK6713_LED_on
    00001780   _DSK6713_LED_toggle
    00001840   _IRQ_map
    00001bc0   _MCBSP_reset
    00001d60   __auto_init
    00001ec0   __c6xabi_strasgi
    00001ec0   __strasgi
    00002000   _DSK6713_AIC23_rset
    00002098   _DSK6713_AIC23_rget
    000020c0   _DSK6713_AIC23_config
    00002140   _exit
    00002260   _main
    00002360   _MCBSP_open
    00002460   _MCBSP_start
    00002560   _IRQ_config
    00002640   _IRQ_getConfig
    00002720   __strasg
    00002800   _IRQ_configArgs
    000028c0   _copy_in
    00002980   _DSK6713_AIC23_setFreq
    00002a40   _IRQ_getArg
    00002ae0   _IRQ_setArg
    00002b80   _MCBSP_close
    00002c20   _MCBSP_config
    00002cc0   __IRQ_init
    00002e00   _MCBSP_configArgs
    00002e80   _MCBSP_getConfig
    00002f00   _c_int00
    00002f80   _DSK6713_DIP_init
    00002f88   _DSK6713_DIP_get
    00003000   _IRQ_restore
    00003060   _IRQ_disable
    000030a0   _IRQ_enable
    000030e0   _IRQ_reset
    00003120   _IRQ_resetAll
    00003160   _IRQ_test
    000031a0   _MCBSP_setPins
    000031e0   __args_main
    00003240   _IRQ_biosPresent
    00003260   _IRQ_clear
    00003280   _IRQ_globalDisable
    000032a0   _IRQ_globalEnable
    000032c0   _IRQ_globalRestore
    000032e0   _IRQ_nmiDisable
    00003300   _IRQ_nmiEnable
    00003320   _IRQ_set
    00003340   _IRQ_setVecs
    00003360   _MCBSP_enableFsync
    00003380   _MCBSP_enableRcv
    000033a0   _MCBSP_enableSrgr
    000033c0   _MCBSP_enableXmt
    000033e0   _MCBSP_getPins
    00003400   _MCBSP_getRcvAddr
    00003420   _MCBSP_getRcvEventId
    00003440   _MCBSP_getXmtAddr
    00003460   _MCBSP_getXmtEventId
    00003480   _MCBSP_read
    000034a0   _MCBSP_resetAll
    000034c0   _MCBSP_rfull
    000034e0   _MCBSP_rrdy
    00003500   _MCBSP_rsyncerr
    00003520   _MCBSP_write
    00003540   _MCBSP_xempty
    00003560   _MCBSP_xrdy
    00003580   _MCBSP_xsyncerr
    000035a0   __nop
    000035c0   __register_lock
    000035e0   __register_unlock
    00003600   C$$EXIT
    00003600   _abort
    00003620   __IRQ_hookFetchPacket
    00003944   __IRQ_eventTable
    000039c8   __IRQ_intTable
    00003a08   __IRQ_dispatchTable
    00003a10   _AIC_data
    00003a1c   _AIC23CfgData
    00003a3c   _config
    00003a64   _hAIC23_handle
    00003a98   __MCBSP_hDev0
    00003a9c   __MCBSP_hDev1
    00003ae8   _fs
    00003aec   _inputsource
    00003aee   _loop
    00003af0   _gain
    00003af4   _sine_table
    00003b04   __cleanup_ptr
    00003b08   __dtors_ptr
    00003b0c   ___TI_enable_exit_profile_output
    00003b10   _DSK6713_AIC23_codeccontrolhandle
    00003b14   _DSK6713_AIC23_codecdatahandle
    00003b18   __lock
    00003b1c   __unlock
    00003b20   _DSK6713_version
    00003b88   __stack
    UNDEFED    __STACK_END
    UNDEFED    ___TI_pprof_out_hndl
    UNDEFED    ___binit__
    UNDEFED    ___c_args__
    UNDEFED    ___cinit__
    UNDEFED    ___pinit__

    [138 symbols]



  • In reply to Darrell Thomas:

    Darrell,

    Darrell Thomas

    1.  Got "hello world to work as advertised-- within a DSP BIOS example.  So that's good news.   See attached.

    There are three approaches I can suggest to get to a solution.

    • Since this is really a tools issue with getting a good build, you could restart this thread in the Compiler forum to get the most expertise from the compiler team. I do not want to push you hard in that direction, but it might be worthwhile to do even while I continue helping you here.
    • The outside-in approach would be to start from a runnable example and add in your new code until it breaks, then you would know what is broken. It would be best to start from a non-BIOS Hello world, though, since you do not intend to end with a BIOS project.
    • The inside-out approach will be after #5.

    Darrell Thomas

    2.  Where to get the source for the CSL and BSL? 

    Go to the Wiki and search for "C6713 CSL" (no quotes), which you may have already done. In the release notes, it talks about how to extract the source from a .src file that is included in the installation. For the BSL source, it should be in the download from SD, too.

    Darrell Thomas

    3.  See below: [.map and .cmd files]

    Nothing looks out of the ordinary in these files.

    Darrell Thomas

    5. I took out analyze_only.  I may have added that in an attempt to interlist the .asm and .c for debugging.  It's down on the bottom of the "feedback options" page, and was inadvertent.  No luck on fixing the run though. 

    5a. Do all three of the .obj files get updated date/time stamps when you do a clean build? And the .out file, too?

    5b. Try taking out the "../rts6700.lib"; the libc.a is a CGT "trick" that tells the linker to get the appropriate rts .lib file for this build. They might be interfering with each other, but nothing looks wrong in the .map file so I doubt this is a problem. You could also delete the libc.a. There is no need for both of those to be included.

    5c. In CCS' Debug Perspective after you have launched the Target Configuration but before connecting to the target (I always do these individually), right--click on the C6713 processor line and select Debug Configurations. On the Target tab under Auto Run Options , uncheck both boxes, in particular "On a program load or restart". This will let the program get loaded and your PC should be at _c_int00. If that does not give you a rational display in the Disassembly window, there is something else major wrong with something in CCS or in the linker outside of your program itself. Make sure the _c_int00 location matches what the .map file said. Now open the source file where main() is and set a breakpoint in there, then tell it to Run/Resume. If it does not reach there, then something in the pre-main() C init code is messed up and you will want to figure out a good way to get down to the failing routine to give you a good guess.

    5d. If 5c fails, one alternative is to do the .lib rebuilds to see if there is some new compiler thing that is causing this problem. That is a reasonable probability, and one that the Compiler team would know about really quickly.

    5e. Another "if 5c fails" is what I called the inside-out method. Rename main to x_main and put in a main with just Hello world in it. That may not change anything, but it will help to bound the problem some. Start commenting out things in main and other functions, too. Get rid of vectors_poll.asm until you need it, or minimize it down to just _c_int00 if that is in there; it is probably not needed for this early CCS work, but will be for getting all the interrupts running.

    Regards,
    RandyP

  • In reply to RandyP:

    Mission complete.  I got it to run. 

    Randy, I took your "outside-in" method and just kept adding functionality until something broke and worked it out from there.  "--relocatable" seemed to be the main culprit, as well as a slightly different gel file, and that extra libc.a.

    So, for anyone else wishing to use Rulph Chassaing's book, Digital Signal Processing and Applications with the C6713 and C6416 DSK,  with Code Composer Studio 5.2, and Windows 7,--here is what I did to get it to work.

    Just so we are working from the same page, this is the book I'm referring to:

    http://www.amazon.com/Digital-Signal-Processing-Applications-Topics/dp/0471690074/ref=la_B001IXMEOI_1_3?ie=UTF8&qid=1348296203&sr=1-3

    Get all the files ready. 

    - Chassaing's file structure, where ever you want it.

    - DSK6713 Target Content folder from Spectrum Digital ( http://c6000.spectrumdigital.com/dsk6713/ ).  I reference this folder as ../DSK6713(spectrum_digital)/ or ../DSK6713(latest)/

    - I used the 7.3.4 compiler and all of it's RTS6700.lib.  I did not see a run time library with 7.8.4.  (It may be somewhere, but I didn't have it)  * update.. I do have it now... so 7.3.8 does work.   see below..

    - In the Spectrum Digital download, there are some drivers that don't quite work with Windows 7. 

    ..\DSK6713(spectrum_digital)\drivers

    In this folder, right mouse click (RMC) on c6713dsk.exe, and "troubleshoot compatibility.  Get it running as an XP program.  It should be persistent, so you only have to do it once.   Do it for the 6713DSKDiag.exe , and you can run diagnostics on your board.--which you should do to rule out any board issues.

    Set up the project.   Other options may work, but  I would not change them until you're up and running and ready to tinker.


    In Code composer studio, v 5xx, FILE, NEW, CCS PROJECT:

    Project name: Sine8_LED_from_scratch (or whatever you want)
    Executable,
    C6000
    DSK6713
    Spectrum Digital DSK-EVM-eZdsp onboard USB Emulator
    Empty Project
    FINISH

    Right mouse click (RMC) on the project, then: "show build settings..."

    General tab:
    - Compiler Version to 7.3.8  (initially I thought I could only build under 7.3.4 because I didn't have the 7.3.8 rts library.   Was pleasantly surprised.  Read on.)
    - Linker command file: (browse to Chassaing's c6713dsk.cmd file), this should automatically add it to your file structure. It is in Chassaing's support folder)
    - Runtime support library:  rts6700.lib  (When you put a library in this box, and it doesn't exist yet, CCS5 builds it for your right then..  I did not have this library earlier.  If you specify the library, and you don't have it, you will get a subtle note during linking as it builds it for you on the spot. 

       "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.8/lib/rts6700.lib" for the
       first time, so it must be built.  This may take a few minutes.


    C6000 Compiler tab:
    - Basic Options tab:  Target Processer version: 6700
    - Predefined Symbols tab: CHIP_6713
    Include Options tab:  You'll need:
    "${CG_TOOL_ROOT}/include"
    "..\DSK6713(spectrum_digital)\c6000\dsk6713\include"     <-- (use path of wherever these files are on your system)
    "..\Chassaing_6713\Support"                                                <-- (use path of wherever these files are on your system)
    "..\DSK6713(spectrum_digital)\c6000\bios\include"        <-- (use path of wherever these files are on your system)

    Runtime Model Options tab:
    - Data access model (--mem_model:data) far

    File Search Path tab:
    - remove "libc.a" (...not required, you are using rts6700.lib)

    Close out of "Build Settings"   Most other options will work too, but this is the basic setup for this project.

    Examine your DSK6713.ccxml file (double click to open) :

    -Basic tab, ensure DSK6713 is checked

    - Advanced tab (after clicking on the TMS320C671X icon) ensure the path is:
    ..\..\emulation\boards\dsk6713\gel\dsk6713.gel   (you don't want to use the one from spectrum digital... it has a small error... (see comparison below)

    SAVE, and close the DS6713.ccxml file.

    RMC on project to bring up "add files..."- (copy)

    - c6713dskinit.c               (from Chassaing's support folder)
    - Vectors_poll.asm          (from Chassaing's support folder)
    - C6713dsk.cmd               (just confirm it is there from when you added it earlier)
    - Sine8_LED.c                   (from Chassaing's Sine8_LED folder)
    - dsk6713bsl.lib                ( ..\DSK6713(latest)\c6000\dsk6713\lib )
    - csl6713.lib                       (..\DSK6713(latest)\c6000\bios\lib )
    note that the rts6700.lib gets linked in from the compiler's library automatically from when you specified it initially. no need to add it as instructed in the book.


    HUGE!!!  modify your Sine8_LED.c program (and save):

    add the following  (before main):
    #include "dsk6713.h"
    #include "dsk6713_led.h"
    #include "dsk6713_dip.h"
    void comm_poll();                        
    void output_left_sample(short out_data);         

    inside of  main there is a line:
         DSK6713_LED_on();                       //turn LED #0 ON    

    change it to
         DSK6713_LED_on(0);                     //turn LED #0 ON (added an argument)

    Optional, but I recommend...  add the inclusion guards around c6713dskinit.h  in case your use it more than once.

    #ifndef C6713_DSKINIT_               //(use a unique name... )
    #define C6713_DSKINIT_        

    (... the header file...)

    #endif                               // C6713_DSKINIT_

    This should give you the following build, which--in turn--will run properly.  Make sure the board is plugged in, and ready to go,  use the debug button, and the program should be at the top of main().  Use resume (F8) to get going.  Note this output is from a good 7.3.4 build.  7.3.8 works OK too as explained above.

    **** Build of configuration Debug for project Sine8_LED_from_scratch ****

    D:\CCStudio_v5.2\ccsv5\utils\bin\gmake -k all
    'Building file: ../Sine8_LED.c'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --display_error_number --diag_warning=225 --mem_model:data=far --abi=coffabi --preproc_with_compile --preproc_dependency="Sine8_LED.pp"  "../Sine8_LED.c"
    'Finished building: ../Sine8_LED.c'
    ' '
    'Building file: ../Vectors_poll.asm'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --display_error_number --diag_warning=225 --mem_model:data=far --abi=coffabi --preproc_with_compile --preproc_dependency="Vectors_poll.pp"  "../Vectors_poll.asm"
    'Finished building: ../Vectors_poll.asm'
    ' '
    'Building file: ../c6713dskinit.c'
    'Invoking: C6000 Compiler'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g --define=CHIP_6713 --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/dsk6713/include" --include_path="D:/CodeComposerWork/Chassaing_6713/Support" --include_path="D:/CCStudio_v5.2/ccsv5/tools/compiler/DSK6713(latest)/c6000/bios/include" --display_error_number --diag_warning=225 --mem_model:data=far --abi=coffabi --preproc_with_compile --preproc_dependency="c6713dskinit.pp"  "../c6713dskinit.c"
    'Finished building: ../c6713dskinit.c'
    ' '
    'Building target: Sine8_LED_from_scratch.out'
    'Invoking: C6000 Linker'
    "D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g --define=CHIP_6713 --display_error_number --diag_warning=225 --mem_model:data=far --abi=coffabi -z -m"Sine8_LED_from_scratch.map" --warn_sections --display_error_number -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/lib" -i"D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.4/include" --reread_libs --rom_model -o "Sine8_LED_from_scratch.out"  "./c6713dskinit.obj" "./Vectors_poll.obj" "./Sine8_LED.obj" -l"rts6700.lib" "../C6713_dsk_chassaing.cmd" "../csl6713.lib" "../dsk6713bsl.lib"
    <Linking>
    warning #10210-D: creating ".stack" section with default size of 0x400; use the
       -stack option to change the default size
    'Finished building target: Sine8_LED_from_scratch.out'
    ' '

    **** Build Finished ****


    On comparing dsk6713.gel versus DSK6713.gel.  They are "nearly" identical with the following exception around line 300-303:   There are two versions: 

    The full lower-case one comes from CCS 5, and is found in:

    ..\CCS5_install_directory\ccsv5\ccs_base\emulation\boards\dsk6713\gel

    ...

    reset_pll()
    {
        /* Set the PLL back to power on reset state*/
        *(int *)PLL_CSR     = 0x00000048;
        *(int *)PLL_DIV3    = 0x00008001;
        *(int *)PLL_DIV2    = 0x00008001;
        *(int *)PLL_DIV1    = 0x00008000;
        *(int *)PLL_DIV0    = 0x00008000;
        *(int *)PLL_MULT    = 0x00000007;
        *(int *)PLL_MULT    = 0x00000007;
        *(int *)PLL_OSCDIV1 = 0x00008007;
    }

    ...

    The other version (in CAPS) is in the folder you downloaded from Spectrum Digital:

    D:\CCStudio_v5.2\ccsv5\tools\compiler\DSK6713(spectrum_digital)\cc\gel

    ...

    reset_pll()
    {
        /* Set the PLL back to power on reset state*/
        *(int *)PLL_CSR     = 0x00000048;
        *(int *)PLL_DIV3    = 0x00008001;
        *(int *)PLL_DIV2    = 0x00008001;
        *(int *)PLL_DIV1    = 0x00008000;
        *(int *)PLL_DIV0    = 0x00008000;
        *(int *)PLL_MULT    = 0x00000007;
        *(int *)PLL_MULT    = 0x00000007;
        *(int *)PLL_OSCDIV1 = 0x00080007;
    }

    ...

    Without much reasoning (yet) other than trial-and-error, I went with the version from CCS 5, with PLL_OSCDIV1 = 0x00008007, as this address is more like the others listed.  It seems unlikely that it would be an order of magnitude off the other addresses.

    Hope this works for anyone that needs it.

  • In reply to Darrell Thomas:

    Darrell,

    Wow. Excellent work getting this working! And even better for the Community that you have documented it so well.

    If you would be interested in reformatting this into a TI Wiki Pages article, I would be happy to help a bit with that. The Friend conversation mode may work best, if you are interested.

    On behalf of TI and the entire E2E Community, thank you for your diligence and excellence on this.

    Kind regards,
    RandyP

  • In reply to RandyP:

    would love to write the article.  where do I start?

    dt