Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2231: " .stack " section size problem

Part Number: MSP430G2231

#include "msp430.h"



void main(void) 
{
    WDTCTL = WDTPW | WDTHOLD;   // stop watchdog timer

    // We need to make a variable to generate a Delay

    volatile unsigned int i;

    P1DIR |= BIT0; //Declare the Direction of P1.0

    while(1){

            P1OUT |= BIT0; //Set P1.0 to logic = 1

            for(i=0; i<100;i++);

            P1OUT &= ~BIT0; //Set P1.0 to logic = 0

            for(i=0; i<100;i++);
            }

 }


Hi, 

I'm using MSP430G2 launchpad & MSP430G2231 microcontroller.

I'm trying to compile the code above on Code Composer Studio, but it keeps giving me the following warning:

#10443-D The ".stack" section size is required to be aligned to 4 bytes, but the specified size, 0x32, is not. The aligned size is 0x34		 	C/C++ Problem

I searched for the same problem on the forum but couldn't find any useful solution 

  • It shouldn't be a problem. I have no idea why it thinks long word alignment is required. Word alignment is sufficient.

    You should be able to work around this by editing the linker command script. Changing 0x32 to 0x30 should keep it happy. (Each device has a script, msp430g2331.cmd or some such. Use your preferred text editor.)

  • Hi David,

    Thanks for your update here.

    Please click on "This resolved my issue" with your reply and then it will close the thread.

    If you have further issue need discuss, you can relply to this thread or file a new one.

    B.R.

    Sal

**Attention** This is a public forum