Hi James,

On Sun, Jan 30, 2011 at 07:48:00AM -0800, James Joyce wrote:
> I've been trying to compile code using msp430-g++ or msp430-c++. However, 
> I'm getting errors and I'm not sure how to proceed. Could you point me in 
> the right direction? I haven't found any information on using C++ for either 
> MSPGCC or MSPGCC4.
> 
> Thank you
> 
> My error is shown below:
> 
> /opt/msp430-gcc-4.4.5/lib/gcc/msp430/4.4.5/../../../../msp430/include/msp430x22x4.h:473:
>  error: uninitialized const ‘P1IN’

[snip]

> My code is in fact all C for now:
> 
> #include "msp430x22x4.h"

Shouldn't this be
#include <msp430x22x4.h>
?

> volatile unsigned int  i;      // volatile to prevent optimization
> 
> int main(void)
> {
>   WDTCTL = WDTPW + WDTHOLD;   // Stop watchdog timer
>   P1DIR |= 0x01;              // Set P1.0 to output direction
>  
>   for (;;)
>   {
>     P1OUT ^= 0x01;     // Toggle P1.0 using exclusive-OR
>     i = 10000;         // Delay
>     do (i--);
>     while (i != 0);
>   }
>     return 1;
> }

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to