You sample code works for me with msp430-gcc 4.5.3 (in your comment you suggest that it wasn't compiling successfully with the pullup/pulldown resistor code). I used the commands:
> msp430-gcc -mmcu=msp430g2553 -o a.out msp430.c > mspdebug rf2500 'prog a.out' I used mspdebug version 0.18. Don On Sat, Jan 14, 2012 at 11:01 AM, Jason Felice <jason.m.fel...@gmail.com> wrote: > I'm trying to use the same approach as here: > http://dbindner.freeshell.org/msp430/demo.html (the second example). I > tried using a basic example from the TI wiki, and that also would not > trigger. I can't get one piece of the example to compile (see below). > I'm using the latest and greatest of everything from sourceforge, > installed last night, on Mac OS X. MCU is MSP430G2553. > > Disassembly shows the ISR is installed, and using the same basic > approach but triggered with the timer works. The chip was loaded with a > sample program that did this (and it looks like one of the programs > which appears on that demo page). > > Thanks in advance! (By the way, installing mspgcc from source was a > breeze once I stopped trying to using package managers. The attention > to detail here was really appreciated.) > > The code is: > > #include <msp430.h> > > #define RED_LED BIT0 > #define GRN_LED BIT6 > #define BUTTON BIT3 > > void enable_button() > { > P1OUT |= BUTTON; > P1DIR &= ~BUTTON; > P1REN |= BUTTON; // Won't compile: undefined reference to `__P1REN' > P1IES |= BUTTON; > P1IFG &= ~BUTTON; > P1IE |= BUTTON; > } > > void enable_leds() > { > P1DIR |= (RED_LED|GRN_LED); > P1OUT |= RED_LED; > P1OUT &= ~GRN_LED; > } > > void port1_isr(void) __attribute__((interrupt (PORT1_VECTOR))); > void port1_isr(void) > { > P1IFG = 0; > P1OUT ^= (RED_LED + GRN_LED); > } > > void main(void) > { > WDTCTL = WDTPW+WDTHOLD; > enable_button(); > enable_leds(); > __enable_interrupt(); > } > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users