Tool/software: Code Composer Studio
I have the following:
#include <msp430.h>
#include <string.h>
#include "test.h"
volatile uint rxCount = 0;
volatile char RXData[20], *rxMssg;
volatile uint timerb1_ISR_cntr = 0;
int main(void)
{
char *mssg;
unsigned int ATest;
mssg = "ER_CMD#W?";
rxMssg = &RXData[0];
ATest = strlen(mssg);
if (ATest == 19)
LPM0;
LPM3;
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
P2SEL1 |= (BIT6 | BIT7); P2SEL0 &= ~(BIT6 | BIT7); //LFXT
PM5CTL0 &= ~LOCKLPM5;
initClockTo16MHz();
P1OUT = 0; P1DIR |= BIT0;
.....
If I remove the if (ATest ..... condition my Expressions window shows ATest = 0. If I remove both if (ATest.... and LPM3 my Expressions window shows "identifier not found: ATest". If I leave both in as seen I get the correct length ATest = 9. I've changed my Compiler Optimizations as suggested to 0. Can someone please tell me what is going on here?
Thanks