...find out how much stack my program uses? [ARM]

Comments

6 comments

  • Avatar
    Ben Stuyts

    I'm not seeing INITIALIZE_STACKS in the AVR compiler. I something similar available there?

    Ben

    0
    Comment actions Permalink
  • Avatar
    Michael Jones

    Hey, guys.

    Is there a way to make this work for the Cortex-M4's process stack? I'm finding that keeping tabs on the process stack is even more valuable in my situation.

    I've checked documentation, but most references are for the main stack.

    MAJ

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    Hi Michael,

    You can use the __stack_process_start__ and __stack_process_end__ symbols.

    I've now modified the example above to do this.

    Regards,

    Jon

    0
    Comment actions Permalink
  • Avatar
    Michael Jones

    Oh, cool. Thanks, Jon!

    I guess I could have tried out some combinations to see if they worked.

    Is there a list of these in our documentation somewhere? I just see the standard macros.

    MAJ

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    Hi Michael,

    The linker script generator adds start and end symbols for all sections described in the project's section placement file (it also adds start, end and used symbols for all segments described in the project's memory map file). You can use the symbol browser window to view your program's symbols.

    Regards,

    Jon

    0
    Comment actions Permalink
  • Avatar
    Miguel Gomes

    Hello.

    Is this feature (stack initialization option) available in CrossStudio for MSP430? I'm asking because I searched for INITIALIZE_STACKS in the msp430 crossworks reference manual but found nothing. If it is available, where is the code that actually fills the stack? Is it in the crt0.asm file? I see the stack pointer initialization there but not the stack initialization code.

    Thanks a lot.

    Regards,

    Miguel

    0
    Comment actions Permalink

Please sign in to leave a comment.