I want to change the SFR bits with the SFR_CMD. But the compile reported
many error. What is wrong in my source code?

#include <io.h>
#include <signal.h>

 int main (void) {

   P1DIR |= 0x01;
   P1DIR |= 0x10;
   P1OUT |= 0x01;
   P1OUT &= ~0x10;

   SFR_CMD(bic.b, P1OUT, 0x10);
   SFR_CMD(bis.b, IE1, WDTIE);

   return(0);

 }

The Compiler OUTPUT:

D:\Projekte\MSP430\C_TEST>msp430-gcc -mmcu=msp430x149 -O2 -Wall -g   -c -o
bugdemo.o bugdemo.c
bugdemo.c: In function `main':
bugdemo.c:12: typedef `_ts' is initialized (use __typeof__ instead)
bugdemo.c:12: invalid lvalue in asm statement
bugdemo.c:13: typedef `_ts' is initialized (use __typeof__ instead)
bugdemo.c:13: invalid lvalue in asm statement
bugdemo.c:12: output number 0 not directly addressable
bugdemo.c:13: output number 0 not directly addressable
>Exit code: 1


I start the compiler with this options:

msp430-gcc -mmcu=msp430x149 -O2 -Wall -g   -c -o bugdemo.o bugdemo.c



Reply via email to