This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

graph in ccsv6

Hi,

Am using dsp6713 for my project. I started running a small program from Rulph Chassaing book but unable to get the required wvaeform. the program has no errors...can anyone suggest me whats wrong with it?

Am attaching the ccs proj folder3225.sine8_buff.rar

i got the waveform as shown below:

  • Hi Jythoi,

    Did you changed the source code which you got from text book ?

    Have you got any "warnings" while building the project ?

  • Hi,

    I made some changes but again i used the same program fro the text book. Following is the code what am using.

    #include "DSK6713_AIC23.h" //codec support
    #include "c6713dskinit.c"
    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
    #define BUFFERLENGTH 256
    int loopindex = 0; //table index
    int bufindex = 0; //buffer index
    short sine_table[LOOPLENGTH]={0,707,1000,707,0,-707,-1000,-707};
    int out_buffer[BUFFERLENGTH]; //output buffer
    short gain = 10;
    short i;
    interrupt void c_int11() //interrupt service routine
    {
    short out_sample;
    out_sample = sine_table[loopindex++]*gain;
    output_left_sample(out_sample); //output sample value
    out_buffer[bufindex++] = out_sample; //store in buffer
    if (loopindex >= LOOPLENGTH) loopindex = 0; //check end table
    if (bufindex >= BUFFERLENGTH) bufindex = 0; //check end buffer
    return;
    } //return from interrupt
    void main()
    {
    comm_intr(); //initialise DSK
    while(1); //infinite loop

    }

    I have build and debugged the program. I right clicked on the last line and selected run  to line. It is showing Run to Line failed.

    Run To Line failed.
    Failed executing run to line
    Failed executing run to line
    org.eclipse.core.runtime.CoreException: Failed executing operation on line 32 in file main.c. Make sure the selected line number is an executable line.

  • I got following warnings:

    Description Resource Path Location Type
    #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 = "./main.obj", offset = 0x00000414, section = ".text") .ccsproject /sine8_buff line 15, external location: C:\Users\Jyothi\workspace_v6_0\DSK6713\src\c6713dskinit.c C/C++ Problem

  • Hi Jythoi,

    Have you configured the CCS graph (single time) as per your sine wave configuration ?

    Acquisition Buffer Size  : 256

    Sampling Rate Hz  : 8000

    Dsp Data Type  : 16 bit signed integer

  • Hi,

    Try to use the below table as sine wave values and LOOPLENGTH value.

    #define LOOPLENGTH 48

    sine_table[LOOPLENGTH] = {

    0x0000 , 0x10b4 , 0x2120 , 0x30fb , 0x3fff, 0x4dea ,

    0x5a81 , 0x658b , 0x6ed8 , 0x763f , 0x7ba1 , 0x7ee5 ,

    0x7ffd , 0x7ee5 , 0x7ba1 , 0x76ef , 0x6ed8 , 0x658b ,

    0x5a81 , 0x4dea , 0x3fff , 0x30fb , 0x2120 , 0x10b4 ,

    0x0000 , 0xef4c , 0xdee0 , 0xcf06 , 0xc002 , 0xb216 ,

    0xa57f , 0x9a75 , 0x9128 , 0x89c1 , 0x845f , 0x811b ,

    0x8002 , 0x811b , 0x845f , 0x89c1 , 0x9128 , 0x9a76 ,

    0xa57f , 0xb216 , 0xc002 , 0xcf06 , 0xdee0 , 0xef4c

    } ; 

  • Yes i have use but no reslts moreover i got an error:

    I have build and debugged the program. I right clicked on the last line and selected run  to line. It is showing Run to Line failed.

  • Hi Jyothi,

    I have attached an old lab material to create and run a sinewave generation project. Please do check whether it works out for you.

    8611.Lab.pdf

    #include "dsk6713.h"
    #include "dsk6713_aic23.h"
    #include "dsk6713_led.h"
    #include "dsk6713_dip.h"
    
    // t a b l e inde x
    short loop = 0 ;
    // gain f a c t o r
    short gain = 10 ;
    // output b u f f e r
    Int16 out_buffer[256];
    // s i z e o f b u f f e r
    const short BUFFERLENGTH = 256;
    // counter f o r b u f f e r
    int i = 0 ;
    
    
    DSK6713_AIC23_Config config = { \
    0x0017 , /* 0 DSK6713 AIC23 LEFTINVOL*/\
    0x0017 , /* 1 DSK6713 AIC23 RIGHTINVOL*/\
    0x00d8 , /* 2 DSK6713 AIC23 LEFTHPVOL*/\
    0x00d8 , /* 3 DSK6713 AIC23 RIGHTHPVOL*/\
    0x0011 , /* 4 DSK6713 AIC23 ANAPATH*/\
    0x0000 , /* 5 DSK6713 AIC23 DIGPATH*/\
    0x0000 , /* 6 DSK6713 AIC23 POWERDOWN*/\
    0x0043 , /* 7 DSK6713 AIC23 DIGIF*/\
    0x0081 , /* 8 DSK6713 AIC23 SAMPLERATE*/\
    0x0001 /* 9 DSK6713 AIC23 DIGACT*/\
    } ;
    // Lookup t a b l e
    //Int16 sinetable[8]={0,707,1000,707,0,-707,-1000,-707};
    
    Int16 sine_table[48] = {
    0x0000 , 0x10b4 , 0x2120 , 0x30fb , 0x3fff, 0x4dea ,
    0x5a81 , 0x658b , 0x6ed8 , 0x763f , 0x7ba1 , 0x7ee5 ,
    0x7ffd , 0x7ee5 , 0x7ba1 , 0x76ef , 0x6ed8 , 0x658b ,
    0x5a81 , 0x4dea , 0x3fff , 0x30fb , 0x2120 , 0x10b4 ,
    0x0000 , 0xef4c , 0xdee0 , 0xcf06 , 0xc002 , 0xb216 ,
    0xa57f , 0x9a75 , 0x9128 , 0x89c1 , 0x845f , 0x811b ,
    0x8002 , 0x811b , 0x845f , 0x89c1 , 0x9128 , 0x9a76 ,
    0xa57f , 0xb216 , 0xc002 , 0xcf06 , 0xdee0 , 0xef4c
    } ;
    
    Uint32 fs = DSK6713_AIC23_FREQ_48KHZ ;
    // main ( ) − Main code rout ine , i n i t i a l i z e s BSL and
    // runs LED a p p l i c a t i o n
    void main ()
    {
    DSK6713_AIC23_CodecHandle hCodec ;
    // I n i t i a l i z e the board suppor t l i b r a r y , must be f i r s t
    // BSL c a l l
    DSK6713_init () ;
    // I n i t i a l i z e the LED and DIP swi t c h modules o f the BSL
    DSK6713_LED_init () ;
    DSK6713_DIP_init () ;
    // St a r t the codec
    hCodec = DSK6713_AIC23_openCodec (0, &config ) ;
    // DIP Swi tch API
    // DSK6713 DIP get ( Uint32 dipNum)
    // Return v a lue 0 S p e c i f i e d swi t c h i s o f f
    // Return v a lue 1 S p e c i f i e d swi t c h i s on
    // i n f i n i t e loop
    while ( 1 )
    {
    if (DSK6713_DIP_get(0) == 0)
    {
    // turn LED#0 on
    DSK6713_LED_on( 0 ) ;
    outbuffer[i] = sinetable[loop] ;
    // wh i l e ( r e t u r n v a l u e i s not z e ro )
    // s e e DSK6713 AIC23 write ( . . . )
    // send data to l e f t channel
    // output e v e ry Ts SW0
    while ( !DSK6713_AIC23_write (hCodec , sinetable [loop] * gain ) ) ;
    // send data to r i g h t channel
    while ( !DSK6713_AIC23_write (hCodec , sinetable[loop ] * gain ) ) ;
    i++;
    if ( i==BUFFERLENGTH) i =0;
    // check f o r end of t a b l e
    if ( ++loop > 47) loop = 0 ;
    }
    //LED#0 o f f
    else DSK6713_LED_off(0) ;
    } //end o f wh i l e (1)
    }
    

     

    Regards,

    Shankari

     

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • jyothi sandri,

    1. Try the example Shankari sent to you. If this works, you will know your board is okay and your method of running the program is okay.

    2. Run the example from the Chassaing without making any changes. Use the Debug Build Configuration so you can actually debug it.

    3. What do you mean when you say you "debugged the program". When I hear "debugged", I think it means you found the problem and fixed it so it does not have any bugs anymore. That does not appear to be the case in your post.

    4. Which Build Configuration did you use for your build step, Debug or Release? The default is Debug, if you did not make any change. The name will be on the highlighted name of the project in the Project Explorer window.

    5. It is not obvious which line you put the cursor on when you did the right-click / Run to Line. Which line was this? Instead, just run/resume the program and then stop it with the Suspend icon. You should be on the while(1) statement if everything goes right.

    #2 is critical for you. You have to start from a known working position. Any code changes that result in the bad warning you listed above are going to break the program. Start with the book example without any changes and get that working before moving forward.

    Regards,
    RandyP

  • Hi,

    I tried the program given but still i dint get the rsults. The steps what i followed:

    save prgrm-> add path of the header files and lib files-> build-> debug->graph

  • I got the following warnings:

    Description Resource Path Location Type
    #10015-D output file "sinegrpah-new.out" cannot be loaded and run on a target system sinegrpah-new C/C++ Problem

    Description Resource Path Location Type
    #16002-D build attribute vendor section TI missing in "C:/Users/Jyothi/workspace_v6_0/DSK6713/c6000/csl/lib/csl6713.lib<csl_irq.obj>": compatibility cannot be determined sinegrpah-new C/C++ Problem

    what should i do?

  • Hi,

    When i debug the program i mean that the program is has no errors and the .out file is loaded into the target. Am i right? I use Debug configuration and i never use Release.

  • Hi, 

    Whatever programming i done till now is enough exercise i hope. Now i got very limited time to submit my project. 

    I just have to give an external signal to the processor, store it in a buffer. Do some manipulations with the data stored in the buffer and see the result. For this i used a small sample program shown below.

    #include "C6713dskinit.c"
    #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 BUFSIZE 512
    int buffer[BUFSIZE];
    int buf_ptr = 0;
    interrupt void c_int11() //interrupt service routine
    {
    int sample_data;
    sample_data = input_left_sample(); //read input sample
    buffer[buf_ptr] = sample_data; //store in buffer
    if(++buf_ptr >= BUFSIZE) buf_ptr = 0; //update buffer index
    output_left_sample(sample_data); // write output sample
    return;
    }
    void main()
    {
    comm_intr(); //init DSK, codec, McBSP
    while(1); //infinite loop
    }

    The problem is when i plot the "buffer" i can see some random garph. The thing is i dint give any input to it. What should  be done please help me out.

  • jyothi,

    jyothi sandiri said:
    Whatever programming i done till now is enough exercise i hope. Now i got very limited time to submit my project. 

    Whatever work you have done until now has not led to the correct result. You have been offered a lot of help, because we want you to succeed. We define success meaning you know how to program the DSK6713, and our comments, questions, and suggestions are all aimed toward that result.

    When you post a reply by clicking on a post other than the most recent post, the forum thread does not show which post you were replying to. It will help if you use names or mention the item you are commenting about. For example, I have to guess that your "build attribute vendor" warning was related to the inline code that Shankari offered, but that is only a guess - in fact, it seems impossible since you said you tried his code and did a build->debug->graph, which would not be possible if the .out file was not generated.

    As you are learning, it is very difficult to start from modified code and figure out what is wrong. It may be something very simple, or it could be a problem with the unmodified version. That is why you have to start with the unmodified code from the Chassaing book or from Shankari's code. If you cannot get those to work, then there is no chance you can get your modified code to work since it modified something that you cannot get to work.

    I never use the "bug" icon. It does up several things automatically, and if something has a problem then that problem can be hidden from you. The "bug" icon launches the Target Configuration, connects to the relevant target processor, loads the active program (or maybe the most recent successfully built program?), and then runs to main().

    jyothi sandiri said:

    I tried the program given but still i dint get the rsults. The steps what i followed:

    save prgrm-> add path of the header files and lib files-> build-> debug->graph

    My assumption is that the "debug" step you mention means that you clicked the "bug" icon that loads the program and runs to main(). Is that true? Since you also said earlier that you tried run-to-line, which did not work, I am not sure what other steps you have attempted in here. Without understanding what you are doing, it is harder to help you.

    For example, when you do the graph step, where is the Program Counter cursor? Did you use the run/resume button and then the halt/pause button?

    Please consider backing up and getting Shankari's code or the unmodified Chassaing code working before continuing with your modified code. If you get the Chassaing code working but you modified code does not work, then you will want to look at your modifications; I do not speak for Shankari, but I do not have the Chassaing book but have heard many people who have used it successfully. You can search this forum for the discussions others have had, possibly about this same example you are trying to get working. Maybe one of their comments will help you solve your problem here.

    Regards,
    RandyP

  • Hi RandyP,

    I appreciate for your reply.

    Firstly i started working on TMS320C6713 on CCS3.1 where i faced few problems so now am working on CCSv6 when i was suggested to use this. In ccs3.1 I generally compile,build,load the .out file,reset,restart,go main, set the breakpoints and run. This is what i followed.

    Coming to CCSV6 I build the program in edit perspective,debug it. When i debug, the .out file is loaded and run to main as you said.  Then i place cursor at the end of the main program and right click for Run to Line. So you say that the 'bug' icon should'nt be used as few problems will be hidden?

    You mean that the .out file should be loaded manually ? I tried to load the .out file in debug perspective and tried clicking the run/resume button and stop/suspend button. Is this the right way?

    Moreover I get three constant warnings in multiple. :

    1. the .out file of my project cannot be loaded on the target

    2. the ti vendor files missing

    3. lib files has no compatibility

    Does CCSv6 on Windows8 has any compatibility problems in using TMS320C6713?

  • I am an EE undergraduate student. I am doing a research on Digital filtering of audio signals. I am using  the OMAP-LCDK with CCSv6. I followed exactly the tutorials that are posted on rt-dsp.com website on how to use the board with CCS. For some reasons, I have not been able to load the  C codes into the target. Each time, I get an error about the linkcdm file. Please, can somebody help me?

    Below is what I get when io try to load the code into the target

    Please provide me with any suggestion.

    Thanks,

  • jyothi,

    I believe you need more basic help to get started on your project. It is very possible that all you need to get your project working is to learn how to use CCS. We have training material that you should start with. I assume that you know the tools and how to build a program and run it before you come to this forum for help with DSP specific issues. It will save you a lot of time if you will search for training material and go thorugh the ones that fit for you.

    You can search in this forum for the experiences that others have had with similar exercises. But to start, you can search at TI.com and in the TI Wiki Pages for keywords like "CCSv6 training"; the fundamentals will be useful to you. It is also my understanding that there are some good tutorials included with CCSv6, but I have not used them and they would not be directly related to the C6713 or Chassaing's book. But the process of building and running and analyzing the problems in your code, those things will be pretty common in all processor targets.

    Some of the basic things are what you are asking about above. For example, I cannot figure out what is happening on your computer because of the contradictions between

    - "the .out file is loaded and run to main"
    - "the .out file of my project cannot be loaded on the target"

    and between

    - "Then i place cursor at the end of the main program and right click for Run to Line."
    - "I right clicked on the last line and selected run  to line. It is showing Run to Line failed.
       "Run To Line failed.
       "Failed executing run to line
       "Failed executing run to line
       "org.eclipse.core.runtime.CoreException: Failed executing operation on line 32 in file main.c. Make sure the selected line number is an executable line."

    The build warnings should never show up with the process you are going through. The training material will get you working successfully much more quickly than by me making uneducated guesses.

    The Run to Line issue seems self-explanatory, but I asked for more detail from you in a previous post.

    Please let us know if you have any questions when you are studying the training material.

    Regards,
    RandyP

  • Sadrac,

    My suggestion is to post your issue to a new thread. Your post is not on-topic to this thread, so addressing you here would be a distraction from getting help to jyothi. Please always post new questions on a new thread.

    Does your college or university have Teaching Assistants who can help you with getting started? Otherwise, you may want to start with the training information I posted for jyothi in my recent reply. But please do any replies or posts to a new thread in this forum.

    I am very glad to see that your university is using a more recent board than many schools. But in your new post, you may want to be more specific on the board name (as well as in describing your problem). I do not see OMAP-LCDK on TI.com, other than in some forum posts. Precision is key to getting help with technical questions.

    Regards,
    RandyP