Hi,

I have a compilation error when try to build a sample with USCI for 5418:

led.c: In function `main':
led.c:71: `UCA1CTL1' undeclared (first use in this function)
led.c:71: (Each undeclared identifier is reported only once
led.c:71: for each function it appears in.)
led.c:72: `UCA1BR0' undeclared (first use in this function)
led.c:73: `UCA1BR1' undeclared (first use in this function)
led.c:75: `UCA1MCTL' undeclared (first use in this function)
led.c:77: `UC1IE' undeclared (first use in this function)
led.c:77: `UCA1RXIE' undeclared (first use in this function)

It seem that there is no __HAS__USCI__ or __HAS__USCI0__ macro defined.

However, when I try to fix it, say by defining 

#define __MSP430_HAS_USCI__
#define __MSP430_HAS_USCI0__
#define __MSP430_HAS_USCI1__

I get the following error:


$ msp430-gcc -Os -mmcu=msp430x5418 ./led.c -o led.elf 
In file included from /opt/mspgcc/msp430/include/msp430x54xx.h:51,
                 from /opt/mspgcc/msp430/include/io.h:152,
                 from led.c:8:
/opt/mspgcc/msp430/include/msp430/usci.h:426: conflicting types for `UCB0I2COA'
/opt/mspgcc/msp430/include/msp430/usci.h:303: previous declaration of 
`UCB0I2COA'
/opt/mspgcc/msp430/include/msp430/usci.h:428: conflicting types for `UCB0I2CSA'
/opt/mspgcc/msp430/include/msp430/usci.h:305: previous declaration of 
`UCB0I2CSA'
In file included from led.c:9:
/opt/mspgcc/msp430/include/signal.h:39:2: warning: #warning X2 ist da

Is there any solution for this problem?


BTW, there were alse errors during build libc from the latest CVS snapshot - 
see diff:

d...@x200 ~/prj/mspgcc-2/msp430-libc/include $ diff -p ./msp430x47xx.h 
/home/dmz/prj/mspgcc/msp430-libc/include/msp430x47xx.h 
*** ./msp430x47xx.h     2009-06-05 01:34:29.000000000 +0400
--- /home/dmz/prj/mspgcc/msp430-libc/include/msp430x47xx.h      2009-06-22 
14:27:17.000000000 +0400
***************
*** 53,65 ****
  #define __MSP430_HAS_SD16_CH3__
  #endif  /* __MSP430_47x3__ */
  
! #if defined(__MSP430_47166__) || defined(__MSP430_47176__) || 
  defined(__MSP430_47186__) || defined(__MSP430_47196__)
  #define __MSP430_HAS_SD16_CH3__
  #define __MSP430_HAS_SD16_CH4__
  #define __MSP430_HAS_SD16_CH5__
  #endif
! #if defined(__MSP430_47167__) || defined(__MSP430_47177__) || 
  defined(__MSP430_47187__) || defined(__MSP430_47197__)
  #define __MSP430_HAS_SD16_CH3__
  #define __MSP430_HAS_SD16_CH4__
--- 53,65 ----
  #define __MSP430_HAS_SD16_CH3__
  #endif  /* __MSP430_47x3__ */
  
! #if defined(__MSP430_47166__) || defined(__MSP430_47176__) || \
  defined(__MSP430_47186__) || defined(__MSP430_47196__)
  #define __MSP430_HAS_SD16_CH3__
  #define __MSP430_HAS_SD16_CH4__
  #define __MSP430_HAS_SD16_CH5__
  #endif
! #if defined(__MSP430_47167__) || defined(__MSP430_47177__) || \
  defined(__MSP430_47187__) || defined(__MSP430_47197__)
  #define __MSP430_HAS_SD16_CH3__
  #define __MSP430_HAS_SD16_CH4__
*************** defined(__MSP430_47187__) || defined(__M
*** 71,79 ****
      || defined(__MSP430_4783__) || defined(__MSP430_4793__)
  #define __MSP430_SD16IV_BASE__    0x110
  #define __MSP430_SD16MEM_BASE__   0x112
! #elif defined(__MSP430_47166__) || defined(__MSP430_47176__) || 
  defined(__MSP430_47186__) || defined(__MSP430_47196__) \
!     || defined(__MSP430_47167__) || defined(__MSP430_47177__) || 
  defined(__MSP430_47187__) || defined(__MSP430_47197__)
  #define __MSP430_SD16IV_BASE__    0x1AE
  #define __MSP430_SD16MEM_BASE__   0x110
--- 71,79 ----
      || defined(__MSP430_4783__) || defined(__MSP430_4793__)
  #define __MSP430_SD16IV_BASE__    0x110
  #define __MSP430_SD16MEM_BASE__   0x112
! #elif defined(__MSP430_47166__) || defined(__MSP430_47176__) || \
  defined(__MSP430_47186__) || defined(__MSP430_47196__) \
!     || defined(__MSP430_47167__) || defined(__MSP430_47177__) || \
  defined(__MSP430_47187__) || defined(__MSP430_47197__)
  #define __MSP430_SD16IV_BASE__    0x1AE
  #define __MSP430_SD16MEM_BASE__   0x110




---
Regards,
Dmitry
[email protected]



Reply via email to