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.

Cannot Evaluate Address

Other Parts Discussed in Thread: TMS320F2808

Board = TMS320F2808

I am using sin() function to generate a sin wave a=sin(2 * PI * f * t),  t in between 0.0 and 0.021 with increment of 0.001.

when setting "Start Address" in the "Graph Properties"  shows an error  "Cannot evaluate address". So how can i see the generated sine wave.

Inserting error screen-shoot ..........

  • Hello AartiG

    That link not helping me to overcome.

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -----------------------------------In practical terms you need to load your code with symbolic debug information (-g) and use a global variable to show its contents properly. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    when i followed this line, getting 3 linking error.

    inserting screen-shoot image........

  • asim kumar dey said:

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -----------------------------------In practical terms you need to load your code with symbolic debug information (-g) and use a global variable to show its contents properly. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    when i followed this line, getting 3 linking error.

    The screenshot shows your variables are still local and not global.

    What are the exact linker errors (ie) which symbols are unresolved? I suspect that the errors you are hitting is a common one that has probably been discussed before on this forum.  Please take a look at this wiki for some common build errors and search the forum as well. If you are still unable to resolve it from these resources, then please copy the full output of the CCS build console to a text file and attach it here.

    http://processors.wiki.ti.com/index.php/Build_Errors_in_CCS#General_Tips

  • Hello, AartiG

    I am inserting the full output of the CCS build console text file.........

  • The reason for the unresolved symbol error for "output" is because of the linker option --make_global=output that is being passed to the linker. That option is being incorrectly used here. Please see details about that option in the C28x Assembly Language Tools users Guide, section 8.4.15.1.

    What you really need to do is declare the variables output, t (and others that you may be interested in graphing) as global variables, (ie) place them before main.  

  • ArtiG,
    I declared the variables output before main, there is no single error present.
    but after filling the Single time graph of Graph Properties
    Acquisition Buffer Size = 600
    Dsp Data Type = 32 bit floating point
    Start Address = output
    Display Data Size = 200

    the graph window full of blank. Still the program in running mode.

    Mentioning that code.......

    #include<stdio.h>
    #include<math.h>
    #define PI 3.1415926

    float   t,output;

    void main()
    {
    int  f=50;
    for (t=0; t<600; t+=0.001 )
    {

    output = 300*(1+sin(2* PI* f* t));
    printf( "output = %e t = %e\n", output, t );

    }
    }

    Hint:- Above equation "output" generate a sinusoidal wave.

     

  • There are some important details when setting up the Graph Properties. 

    Acquisition Buffer Size in your case should be 1 since you are processing samples one at a time
    Dsp Data Type = 32 bit floating point
    Start Address = &output
    Display Data Size - you may want to set this to 600 or greater for the size of your display buffer

    More information on the Graph Properties can be found in the CCS Online Help.

    Using these settings I was able to graph data on a F2808 using code similar to what you have shown above. Note that I tested with CCS 6.1, but I am pretty sure it should work the same with CCS 5.5.

    Another important detail to note is that the Graph view is updated only when the target is halted. So in order to see the graph update while the program is running, you can set a breakpoint on the line of code that updates the value of output (or some line of code after the update), and then set the breakpoint Action to "Refresh All Windows". That will refresh the Graph window (and other windows) when the breakpoint is hit (instead of halting the program) and then continue to run the program. This wiki page contains more information on how to set the breakpoint action: 
    http://processors.wiki.ti.com/index.php/GSG:Debugging_projects_v5#Displaying_graphs

  • Thank you AartiG,

    Now Single time graph shows a wave form.

    But corresponding time the "output" value not accurate, i verified from the printed value of the Console window "output" w.r.t "time".

    The Console window output value w.r.t time not matched with the Graph window value.

    I am inserting screen-shoot of console window and Single time graph window, Graph properties window----------

  • AartiG,
    Please respond, generated sin wave not under the rules, had mentioned on the above post. Calculated value of the equation not equal to the Graphical value.
  • Asim,

    The graphing feature itself is working now (after you updated the properties as I suggested). As far as the data values, it looks like a couple of values are being skipped in between the ones it is plotting. I cannot precisely explain why that is, but this may depend on the graph update rate vs variable update rate on the target.