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.

The stack 'XdataStack' is filled to 100 - CC1110



Hello,

I have a problem with IAR and CC1110. In debug mode i have this message :

Tue Jul 10 12:10:31 2012: The stack 'XdataStack' is filled to 100% (511 bytes used out of 511). The warning threshold is set to 90.%

I understand that the Stack is too short but how i can solve it ?

I used CC1110f32 and IAR C/C++ Compiler for 8051 8.10.4 (8.10.4.40412)

My program works only when there is not functions call.

Thanks to help me....

Anthony

  • You can make adjustments to the Stack by doing the following:

    Right click on your project in the workspace and goto options.

    Under General click on the stack/heap tab. You can adjust xdata stack from there.

    -JAson

     

  • Hi Jason,

    Thanks for your response.

    I tried to modify the stack size, but i don't know the the right values.

    I have this :

    STack sizes :

    IDATA = 0x40

    PDATA = 0x80

    XDATA = 0x1FF

    Heap sizes :

    XDATA = 0xFF

    Far = 0xFFF

    Far22 = 0xFFF

    Huge = 0xFFF

    thanks a lot for your help

    Anthony

  • Your error message suggests that it is the XDATA stack that is too small, thus you can try to increase the XDATA stack size.

    That said, you should try to find out why your application uses so much of stack. A common case is that large variables (e.g. arrays) are declared inside the scope of a function. Variables declared inside a function are stored on the stack, thus a large array may fill the stack quickly. Instead, declare arrays outside the scope of your function. Variables declared outside the scope of a function are not stored on the stack, and does thus not fill up the stack. Instead, the function can work on a pointer to the variable.

    Br,
    ABO 

    --
    PS. Thank you for clicking  Verify Answer  below if this answered your question!

  • Hello ABO,

    thanks for your answer. I understand what you said but the problem is, with the software provide by TI (example_sw_swrc085a) there is the same problem.

    I have only one array as global variable.

  • What version of IAR are you using? I just tried the example_sw_swrc085 using IAR 7.51 and it compiles without any errors and I did not see any XdataStack warnings.

    Br,
    ABO 

  • I used  CC1110f32 and IAR C/C++ Compiler for 8051 8.10.4 (8.10.4.40412)

    thanks,

    Anthony

  • The example project is built with an old version of IAR (<7.51). When converting the from IAR projects built with IAR 7.51 or older, the following changes must be done manually.

    Under Project Options:

    • General Options > Target > Device: Select CC1110F32 (or whichever flash version is applicable) from the <IAR install dir>\8051\config\devices\Texas Instruments\
    • Linker > Config > Linker configuration file: Uncheck "Override default" (at least for the sample project, which uses the default linker file)
    • Debugger > Setup > Driver: Make sure Texas Instruments is selected (is sometimes "Simulator")
    • Debugger > Setup > Device Description file: Uncheck "Override default" (should show $TOOLKIT_DIR$\config\devices\Texas Instruments\ioCC1110F32..."

    To get the sample project to build without errors, I changed the data model from Small to Large under General Options > Target > Data model.

    Br,
    ABO

  • It is very strange.

    When i download the software  example_sw_swrc085a, i set the configuration as you said. It works, There is no more warning about XdataStack but if i just had after INIT_LED1();
    halWait(3);

    the warning comes back and if i delete halWait(3); the warning is present.

    And in my project if i set setup as you said there is a warning on PdataStack is filled to 100% (128 bytes used out of 128).

    I don't understand anything.

    Thanks again for your help.

    Br,

    Anthony

  • Anthony Bernabeu said:
    the warning comes back and if i delete halWait(3); the warning is present.

    Try deleting temporary files in your project directory.

    When you debug, run to main - do you then see the stack overflow warning? In memory view, what is the content of the stack (memory view or Stack view should show the same).

    Br,
    ABO