Hi,
I am trying to send or recieve multiple bytes in uart,so iI defined uart.h and there put all the declarations.
Code-
-------main.c------
#include "msp430g2553.h"
#include "uart.h"
void string_init()
{
m[]="Hello Ma'am...!!!";
i=0;
a[]=" ";
p[]="Please enter valid command";
return;
}
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; //Stop WDT
if (CALBC1_16MHZ ==0xFF || CALDCO_16MHZ == 0xFF)
{
while(1); // If cal constants erased,
} // trap CPU!!
BCSCTL1 = CALBC1_16MHZ; //Set DCO to 16Mhz+
DCOCTL = CALDCO_16MHZ; //Set DCO to 16Mhz
string_init();
uart_init(); //Initialize the UART connection
__enable_interrupt(); //Interrupts Enabled
__bis_SR_register(LPM0_bits + GIE); // Enter LPM0, interrupts enabled
}
------uart.h------
#ifndef UART_H
#define UART_H
extern volatile unsigned int i;
extern volatile char m[20];
//extern volatile unsigned char gate=0;
extern volatile char a[20];
extern volatile char p[20];
void uart_init(); //Initialize the UART connection
#endif
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Build Logs...---
**** Build of configuration Debug for project nms_test_string_hello_mam ****
"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../main.c'
'Invoking: MSP430 Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.5/bin/cl430" -vmsp --abi=eabi --use_hw_mpy=none --include_path="C:/ti/ccsv6/ccs_base/msp430/include" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.5/include" --advice:power=all -g --embedded_cpp --define=__MSP430G2553__ --diag_warning=225 --diag_wrap=off --display_error_number --printf_support=minimal --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"../main.c", line 16: error #29: expected an expression
"../main.c", line 18: error #29: expected an expression
"../main.c", line 19: error #29: expected an expression
"../main.c", line 34: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
3 errors detected in the compilation of "../main.c".
>> Compilation failure
gmake: *** [main.obj] Error 1
'Building file: ../uart.c'
'Invoking: MSP430 Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.5/bin/cl430" -vmsp --abi=eabi --use_hw_mpy=none --include_path="C:/ti/ccsv6/ccs_base/msp430/include" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.5/include" --advice:power=all -g --embedded_cpp --define=__MSP430G2553__ --diag_warning=225 --diag_wrap=off --display_error_number --printf_support=minimal --preproc_with_compile --preproc_dependency="uart.pp" "../uart.c"
"../uart.c", line 68: remark #1528-D: (ULP 3.1) Detected flag polling using IFG2. Recommend using an interrupt combined with enter LPMx and ISR
"../uart.c", line 107: remark #1528-D: (ULP 3.1) Detected flag polling using IFG2. Recommend using an interrupt combined with enter LPMx and ISR
"../uart.c", line 86: remark #1544-D: (ULP 13.1) Detected loop counting up. Recommend loops count down as detecting zeros is easier
"../uart.c", line 91: remark #1544-D: (ULP 13.1) Detected loop counting up. Recommend loops count down as detecting zeros is easier
'Finished building: ../uart.c'
' '
gmake: Target `all' not remade because of errors.
**** Build Finished ****
After compilation I am getting error #29 in lines 29,38 & 31.
If you could help me a little I would be very pleased.
Regards,
Vivek Agrawal