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.

CCS/TMS320F28335: appropriate stack size

Part Number: TMS320F28335


Tool/software: Code Composer Studio

 

How can we find out, how many of stack size does our program have occupied?

I want to be sure that the stack size that I have assigned is enough for my local functions and variables.i want to know does CCS   inform us after compiling the project about amount of minimum stack size for our project?

  • Hi Marjan,

    You can check the Stack memory under Memory Browser Window.

    Regards,
    Gautam
  • hi Gautam

    i know that I have assigned the stack memory of my project from address 0x400 to 0x700 ,but i do not know that this amount is enough or not for my project.if I run my project, different stack size is needed in every function in the middle of processing.if my local functions and variable need more than 0x300 word memory, my program will not work properly,how can I be aware of my program's usage from stack memory?
    I am looking forward a file that CCS give me after compiling and linking that my project usage from stack have been written in it.for exampe it says me :minimum stack size for my project is 0x230 word and then I will be confident that 0x300 is enough for my project.


    regards
    marjan
  • marjan gh said:
    ,how can I be aware of my program's usage from stack memory?

    That's what I mentioned above, you can check the Stack memory real-time in Memory Browser during the debug session.

  • Dear Gautam,thank you for your reply

    Is "checking the memory browser" the only way?
    for example Keil IDE for ARM micro controllers produce a .htm file that mention the maximum stack usage in it.
  • marjan gh said:
    Is "checking the memory browser" the only way?
    for example Keil IDE for ARM micro controllers produce a .htm file that mention the maximum stack usage in it.

    Good question, here we've something called as .map file. Once you successfully build the project, .map file gets created under Debug folder in your project folder. You can have a look at stack allocation here too.

    Regards,

    Gautam

  • Dear Gautam

    I am familiar with .map file ,as you know it just includes the amount of stack that we have assigned for project, it does not include maximum stack usage,
    As you have mentioned ,maybe ''checking the Stack memory real-time in Memory Browser during the debug session" would be the best way to be aware of maximum stack usage to prevent stack overflow during program running.

    Regards
  • marjan gh said:
    As you have mentioned ,maybe ''checking the Stack memory real-time in Memory Browser during the debug session" would be the best way to be aware of maximum stack usage to prevent stack overflow during program running.

    That's how I verify my stake usage.

    Regards,

    Gautam