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.

Want help error message IAR+launch pad



Im using Launchpad+msp430g4331+ IAR kick start. IDE displays this error message 

 

"processing the segment placement command "-Z(DATA)CSTACK+_STACK_SIZE#",

where at the moment of placement the available memory rangeswere "CODE:250-27f"Reserved ranges relevant to this placement:

200-24f DATA16_Z250-27f CSTACK

Error while running Linker"

 

what does this mean ? does it says about stack over flow? How can i fix this?

How can i check used programme memory using IAR?

 

 

  • Pradeep Wijayasene said:
    what does this mean ? does it says about stack over flow?

    Sort of.

    It means that after putting all your variables into ram, there is not enough unused ram available for a stack of the size you defien din the project settings (80 bytes is the default I think)

    Keep in mind that this setting is just a hint that causes a linker error. It does not in any way define or limit the stack usage of your program. If your code uses local variables or recursion, the stack will grow to any size, overwriting all variables and finally growing into the void (crashing the system).

    Pradeep Wijayasene said:
    How can i fix this

    Use less variables, use char isntead of int where it is appropriate. Don't use float/double if not really necessary (it usually isn't, even if people think it is).
    Declare constant values as constants and not as normal variables. Especially if it are arrays.

    You may reduce the stack size setting in the project. But this will only remove the linker error. But it doesn't change the resulting binary and will not influence the stack usage of your program.

**Attention** This is a public forum