CCS Debug Variables

The Variables view has real problems with displaying function values.  As the screen shot shows, setting int dx also changed int newX.  This becomes even more problematic with floats and doubles.  I can see the code changes register usage, and thus the variables assigned to those registers change, but this makes the debugger almost useless for my students.  Any thoughts??

Paul Roper

 

  • In reply to Paul Roper:

    Hi Paul,

    what code generation tool version is your project using?  I took that screen shot right from the same CCS version.  I did nothing special at all.

    Best Regards,

    Lisa

  • In reply to Lisa TI:

    Lisa,

    I'm also sending you screen shots from v5.1.  Just a quick history, I'm frankly not sure of my configuration, but I've tried this on several machines.  We down loads from the TI website v51. and installed it on all our lab machines.  After installation on my machine, I discovered that I could not compile my demo program because of RAM errors.  (It complies and runs just fine under v4.0.)  I was instructed by TI to try earlier compiler tools.

    So, I installed v5 again from my CCS IDE UNIVERSITY CD w/Floating Site License.  It seems like I can't go back or forward.  You obviously have something different from me - I just don't have an advanced optimization menu.  Shouldn't there be something somewhere??

    I've taken my demo code and really isolated the problem to a small amount of code.  Here it is:

    main.c:

    #include "msp430x22x4.h"

    #include "RBX430_lcd.h"

    #include <stdlib.h>

    #include <math.h>

     

    #define PI 3.1415926

    void draw_line(int x0, int y0, int x1, int y1)

    {

           lcd_point(abs(x0), x0, 1);

    } // end lcd_draw_line

     

    void main(void)

    {

      
    float i;

      
    for (i = 0; i < PI*2;
    i += PI/16)

      
    {

         
    int x = cos(i) * 45;

         
    int y = sin(i) * 45;

         
    draw_line(80, 50, 80 + x, 50 + y);

      
    }

    }

     

    RBX430_lcd.h:

    #ifndef
    LCD_H_

    #define LCD_H_

     

    typedef char int8;

    typedef int int16;

    typedef unsigned char uint8;

    typedef unsigned int uint16;

     

    uint8 lcd_point(int16 x, int16 y, uint8 flag);

     

    #endif /*LCD_H_*/

     

     

    RBX430_lcd.c:

    #include "msp430x22x4.h"

    #include "RBX430_lcd.h"

     

    uint8 lcd_point(int16 x, int16 y, uint8 flag)

    {

           return 0;                                // return success

    } // end lcd_point

     Here is what I get:

     

     

  • In reply to Paul Roper:

    Hi Paul,

    odd.  I took that capture directly from an installation of 5.1.09 .. the version you posted you were using.  I simply created a new CCS Project and opened a basic MSP blink the LED example.  I think went into project properties and I always get the advanced.

    I am using code generation tools version 4.0.0 which seems to have come with 5.1.09.

    As mentioned I have filed this and found it to be at least partially related to the optimization.

    Best Regards,
    Lisa