I see you've fixed it.  FWIW, you probably ought to remove the includes for
<in430.h> and <iomacros.h>, even if that wasn't the problem.   <msp430.h>
covers what they do.

Peter


On Sun, Dec 2, 2012 at 9:05 AM, Ian Chapman <ichap...@videotron.ca> wrote:

> Hi,
> I'm trying to get the I2C working on an msp439f5438 and I have the
> following code in my source file.
>
> UCB0CTL0 = 0;
> UCB0CTL1 = 0;
> This gives the following compile errors.
> make
> msp430-gcc -Os -Wall -g -mmcu=msp430f5438 -c main.c
> main.c:117:2: warning: data definition has no type or storage class
> main.c:117:2: warning: type defaults to ‘int’ in declaration of
> ‘UCB0CTLW0_H’
> main.c:117:2: error: conflicting type qualifiers for ‘UCB0CTLW0_H’
> /usr/lib/gcc/msp430/4.5.3/../../../../msp430/include/msp430f5438.h:3557:1:
> note: previous declaration of ‘UCB0CTLW0_H’ was here
> main.c:118:2: warning: data definition has no type or storage class
> main.c:118:2: warning: type defaults to ‘int’ in declaration of
> ‘UCB0CTLW0_L’
> main.c:118:2: error: conflicting type qualifiers for ‘UCB0CTLW0_L’
> /usr/lib/gcc/msp430/4.5.3/../../../../msp430/include/msp430f5438.h:3556:1:
> note: previous declaration of ‘UCB0CTLW0_L’ was here
> make: *** [main.o] Error 1
> I'm able to compile P3DIR etc no problems so I find this error strange
> and I'm lost with it. Maybe I should define them myself.
>
> I have these headers and I must be missing something. Please can you
> help me. Regards Ian.
> #include <msp430.h>
> //#include <legacymsp430.h> //for interrupts
> #include <alloca.h>
> #include <stdint.h>
> #include <in430.h>
> #include <string.h>
> #include <iomacros.h>
>
>
>
> ------------------------------------------------------------------------------
> Keep yourself connected to Go Parallel:
> DESIGN Expert tips on starting your parallel project right.
> http://goparallel.sourceforge.net/
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to