stack/heap usage of PSoC5 - Cypress.com Forums http://www.cypress.com/? Re: stack/heap usage of PSoC5 http://www.cypress.com/?rID=56490 The Stack Pointer value changes dynamically in the run time depending on how your code is structured. Could you tell us what kind of tool you are expecting ?

]]>
Sun, 27 Nov 2011 23:59:14 -0600
Re: stack/heap usage of PSoC5 http://www.cypress.com/?rID=56402 Thanks,

 
1.& 2 : I have no problem changing the size and location the address of the stack and heap from the map file.
3. I don’t want to access the SP directly unless needed to. Just wondering if anyone has done this before or Cypress already have tools to do this.
]]>
Thu, 24 Nov 2011 16:12:21 -0600
Re: stack/heap usage of PSoC5 http://www.cypress.com/?rID=56386
  • The default for a PSoC 5 project is the stack size = 16K (0x4000) and the heap size to be 4K (0x1000).  These are settable parameters, in the .cydwr file, System tab, Configuration node.
  • In order to see the allocation of stack and heap look in to the .map file. In the .map file you can see that the stack space is located at the top of SRAM (the stack/SP/R13 grows downward), and the heap space is located under the stack space. The amount of SRAM being used for the stack at any particular time is just the top of SRAM address minus the value in R13.
  • Don't forget that the Cortex-M3 has two stack pointers, both sharing the R13 space - check PSoC 5 datasheet Table 4-2 for details. In most simple projects only the main stack pointer (MSP) is used.
  • ]]>
    Thu, 24 Nov 2011 03:07:41 -0600