Hello,
I have been trying to use msp430-gcc on my ubuntu 14.04 for writing programs for msp430. But I noticed that, my sample program was behaving differently under the above two compilers. My program was to toggle LED, which is given below. The difference is with the rate of blinking which is slower in the msp430-gcc when compared to cl430. Please let me know if anything is missing here.
My Program :
#include<msp430g2553.h>
void main()
{
WDTCTL = WDTPW + WDTHOLD;
P1OUT |= BIT0;
P1DIR |= BIT0;
for(;;)
{
P1OUT ^= BIT0;
__delay_cycles(1000000);
}
}
Compiler options that I Used :
CL430 :
/SNS/ti/ccsv5/tools/compiler/msp430_4.1.1/bin/cl430 filr.c -I /SNS/TI/TI_CGT_TMS470_4.6.6/include -I /SNS/ti/xdctools_3_23_03_53/packages/ti/mcu/msp430/include/ --run_linker --library /SNS/ti/xdctools_3_23_03_53/packages/ti/mcu/msp430/include/msp430g2553.cmd -l /SNS/ti/ccsv5/tools/compiler/msp430_4.1.1/lib/libc.a --output_file=myprog.out
MSP430-GCC :
msp430-gcc -mmcu=msp430g2553 filr.c -o myprog2.out
Thanks in Advance.
--
Regards,
VKSALIAN.