Hello,
I'm using CSS4 for MSP430 projects. I program in C++ and it works quite well. In using static functions and variables I have not recogniced any overhead. However I realized an issue with the debugger. On a code like below:
#include <msp430f5528.h>
class LED
{
public:
static bool Value;
};
bool LED::Value = true;
void main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW+WDTHOLD; // Stop WDT
P1DIR |= BIT7; // P1.7 set as output
while(1) // continuous loop
{
LED::Value = !LED::Value;
if(LED::Value)
P1OUT |= BIT7;
else
P1OUT &= ~BIT7;
for(i=50000;i>0;i--); // Delay
}
}
I can not watch easily the value of variable LED::Value. If I select in the watch window "Add Global Variables ..." and select "'MSP430F552x_1.cpp'::LED::Value" then I get as a value: "identifier not found: 'MSP430F552x_1.cpp'::LED::Value".
The only workaround I found was to remove the filename to a result: "::LED::Value" then I get the value ".". This value can be formated to "Decimal" and I get 0 and 1.
This is quite complicated. Is there a better way? Is there any preset to be changed?
Regards
Guenther
PS: This is a simplified example to show the issue. The issue happens on all static variables of a c++ class.