Other Parts Discussed in Thread: MSP430G2553
Hello,
I am having some trouble with an error and recompiling after I remove the error (using CCS). I was trying to write some code to send the MSP430G2553. I was using example msp430g2XX3_ta_01.c noted below
#include <msp430g2553.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1DIR |= 0x01; // P1.0 output
CCTL0 = CCIE; // CCR0 interrupt enabled
CCR0 = 50000;
TACTL = TASSEL_2 + MC_2; // SMCLK, contmode
_BIS_SR(LPM0_bits + GIE); // Enter LPM0 w/ interrupt
}
// Timer A0 interrupt service routine
#pragma vector=TIMER0_A0_VECTOR
__interrupt void Timer_A (void)
{
P1OUT ^= 0x01; // Toggle P1.0
CCR0 += 50000; // Add Offset to CCR0
}
Basically, I want to add the relevant parts of this to my code so that my code would execute some stuff, pause in low power mode for a set amount of time and then execute some other stuff. I worked the sample code into my code, compiled and got an error. I tried to debug the error, but even after removing all of the new code, my original code will not compile. I get the error "#10099-D program will not fit into available memory. placement with alignment fails for section "TIMER0_A0" size 0x4 . Available memory ranges: lnk_msp430g2553.cmd /my_project_name line 86 C/C++ Problem". I suspect I have to delete a file that is created during the compiling operation (a *.out file perhaps?), but I don't know which one. I can get around this error if I create a new project and copy/paste all of my original code in the new project, but creating a new project every time I have to debug will get time consuming.
Thanks
Jeff