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.

Stack Questions

  a. The javascript bios.MEM object (in the .tcf file) has a "global
  stack" that can be manipulated with bios.MEM.STACKSIZE and
  bios.MEM.STACKSEG. What is the "global stack" used for?

  b. Where does the C compiler stack get initialized prior to main()?

  c. Tasks (and probably other threads) have their own stacks, but
  what stack does DSP/BIOS use for it's own execution? For example,
  inside a TSK_switch() call, there must be a "system" stack - where
  does this stack reside and what sets its size?

  d. From which heap or stack does DSP/BIOS take memory from for
  dynamically-created objects, such as semaphores and tasks?

This is DSP/BIOS 5.33.06 under CCS 3.3 SR 11.
 
--Randy

  • Randy Yates said:
      a. The javascript bios.MEM object (in the .tcf file) has a "global
      stack" that can be manipulated with bios.MEM.STACKSIZE and
      bios.MEM.STACKSEG. What is the "global stack" used for?

    The global stack is used for the system, SWIs, HWIs, etc (everything but TSK - each TSK has a individual stack)

    Randy Yates said:
      b. Where does the C compiler stack get initialized prior to main()?

     please see section 2.5 fo the:

    http://www-s.ti.com/sc/techlit/spru303

    Randy Yates said:
    c. Tasks (and probably other threads) have their own stacks, but
      what stack does DSP/BIOS use for it's own execution? For example,
      inside a TSK_switch() call, there must be a "system" stack - where
      does this stack reside and what sets its size?

    in the globack stack: bios.MEM.STACKSIZE and   bios.MEM.STACKSEG

    Randy Yates said:
    d. From which heap or stack does DSP/BIOS take memory from for
      dynamically-created objects, such as semaphores and tasks?

    please see page 270 of the:

    http://www-s.ti.com/sc/techlit/spru403

    You can put the dynamically created objects in any memory that has a heap. This is selectec by the field "Segment For DSP/BIOS Objects" in the DSP/BIOS configuration file (.tcf).

    See related post:

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/29585/102867.aspx#102867