Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Creating Dynamic Objects and Threads in BIOS

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

Functions such as SEM_create(), TSK_create() and SWI_create() are used in DSP/BIOS for dynamically creating objects/threads. All of these *_create() functions ultimately depend on dynamic memory allocation. It is critical that you properly configure dynamic memory allocation in your tcf file in order for these functions to work.

Procedure

Allow Heaps

  • Open your tcf file in the configuration tool.
  • Right click on Memory Section Manager and go to Properties.
  • Uncheck the "No Dynamic Heaps" box if it is not already unchecked. Click OK to exit the dialog.
bios.MEM.NOMEMORYHEAPS = 0;
BIOS Dynamic1.png




Create one or more heaps

  • Right-click on the memory section where you would like to create a heap, e.g. DDR2 and go to Properties.
  • Click the "Create a heap in this memory" box and enter the size. Click OK to exit the dialog.
bios.MEM.instance("DDR2").createHeap = 1;
BIOS Dynamic2.png




Specify placement of DSP/BIOS objects

  • Right-click once again on Memory Section Manager and set the "Segment for DSP/BIOS Objects" to a valid section.
bios.MEM.BIOSOBJSEG = prog.get("DDR2");
bios.MEM.MALLOCSEG = prog.get("DDR2");
BIOS Dynamic3.png




Specify placement of dynamic tasks

  • Expand the Scheduling section, right click on "TSK - Task Manager" and select Properties. Select a valid heap for the option "Stack segment for dynamic tasks"

syntaxhighlight lang='javascript'> bios.TSK.STACKSEG = prog.get("DDR"); </syntaxhighlight>

BIOS Dynamic4.png