Other Parts Discussed in Thread: MSP-FET
Tool/software: Code Composer Studio
Hello,
I am using MSP430F6638 and I am trying to run a really simple code with ccs studio. Here is the code below :
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
UCSCTL4|=SELA__XT1CLK|SELS__XT2CLK;
UCSCTL6|=XT2DRIVE_0|XCAP_0;
UCSCTL6&=~XT2OFF; // turn on XT2
UCSCTL6&=~XT1OFF; // turn on XT1
P3SEL&=~BIT7;
P3DIR&=~BIT7;
P4SEL&=~BIT1;
P4DIR|=BIT1;
return 0;
}
while (1) // line 26
{
if ((P3IN>>7) & (0x01) == 1)
{
P4OUT|=BIT1;
}
else
{
}
}
But while building I have this "../main.c", line 26: error #171: expected a declaration error (line 26 is the while line).
I don't see any error of "} " or ";" here so I am really confused about that. I have searched a lot about this error on TI forum and on the net and tried many things such as adding verbose diagnstics option but nothing has changed. Here is below the diagnostics options :
You will also find attached the zip folder of the project.
Can someone help please ?
Thank you very much,
Best regards,
Mike