Hello,
I am new in this field. I am trying to run simple code in CCS5.1.0 which is given below.
#include "msp430x22x4.h"
volatile unsigned int i; // volatile to prevent optimization
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // Set P1.0 to output direction
for (;;)
{
P1OUT ˆ= 0x01;
i = 50000; // Delay
while (i != 0)i--;
}
}
But when I run, it gives me error :
**** Build of configuration Debug for project HelloWorld ****
C:\ti\ccsv5\utils\bin\gmake -k all
'Building file: ../main.c'
'Invoking: MSP430 Compiler'
"C:/ti/ccsv5/tools/compiler/msp430/bin/cl430" -vmspx --abi=coffabi -O0 -g --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430/include" --define=__CC430F5123__ --diag_warning=225 --display_error_number --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"../main.c", line 12: error #7: unrecognized token
"../main.c", line 12: error #66: expected a ";"
2 errors detected in the compilation of "../main.c".
>> Compilation failure
gmake: *** [main.obj] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
I tried to find out it solution online, i tried many steps like firewall off, reinstall. but i am getting error continuously. I will be very thankful to you, if you can help me to solve my problem.
Thanks