- /*
- * ======== Dsk5402_ddk.tci ========
- * This script simply sets up the board-specific parameters that are needed
- * for the assorted DDK examples.
- */
- /*
- * Create an empty object and call it with the getProgObjs method to
- * create global variables for every Module and Instance object.
- * For example, instead of
- * prog.module("LOG").instance("LOG_system").buflen = <some value>;
- * we can simply say
- * tibios.LOG_system.buflen = <value>;
- */
- tibios = {};
- utils.getProgObjs(prog, tibios);
- if (environment["config._54f_"] != null) {
- tibios.GBL.CALLMODEL = "far";
- }
- /*
- * enable assorted BIOS features
- */
- bios.enableMemoryHeaps(prog)
- bios.enableRealTimeAnalysis(prog);
- bios.enableRtdx(prog);
- bios.enableTskManager(prog);
- /*
- * initialize LOG objects for user trace and system log
- */
- var trace = tibios.LOG.create("trace");
- trace.bufLen = 128;
- trace.logType = "circular";
- tibios.LOG_system.bufLen = 128;
- tibios.LOG_system.logType = "circular";
- /*
- * Memory segments, their sizes, heaps, and heap sizes.
- */
- /* define base and size of the internal data memory segment */
- tibios.IDATA.base = 0x0080;
- tibios.IDATA.len = 0x2f80;
- tibios.IDATA.space = "data";
- /* allocate heap named "INTERNALHEAP" of size 0x0C00 in internal memory */
- tibios.IDATA.createHeap = true;
- tibios.IDATA.heapSize = 0x0C00; /* 3K */
- tibios.IDATA.enableHeapLabel = true;
- tibios.IDATA.heapLabel = prog.extern( "INTERNALHEAP" );
- /* define base and size of the internal program memory segment */
- tibios.IPROG.base = 0x3000;
- tibios.IPROG.len = 0x1000;
- tibios.IPROG.space = "code";
- /* allocate heap named "EXTERNALHEAP" of size 0x2000 in external memory */
- tibios.EDATA.createHeap = true;
- tibios.EDATA.heapSize = 0x2000; /* 8K */
- tibios.EDATA.enableHeapLabel = true;
- tibios.EDATA.heapLabel = prog.extern( "EXTERNALHEAP" );
- /*
- * Set the size of the application stack. Must be large
- * enough to accomodate worst-case of nested priorities, if any.
- */
- tibios.MEM.STACKSIZE = 0x0200;
- /*
- * Set the default segment for the stack allocated by TSK_create().
- */
- tibios.TSK.STACKSEG = tibios.EDATA;
- /*
- * Set the default segment for the stack allocated by TSK_create().
- */
- tibios.TSK.STACKSEG = tibios.EDATA;
- /*
- * Overriding default section placement
- * assign listed sections to specified memory segments
- */
- /* General */
- /* Set dynamic heap allocation into IDATA */
- tibios.MEM.BIOSOBJSEG = tibios.IDATA; /* Segment for DSP/BIOS Objects */
- tibios.MEM.MALLOCSEG = tibios.IDATA; /* Segment for malloc()/free() */
- /* BIOS data */
- tibios.MEM.GBLINITSEG = tibios.EPROG; /* DSP/BIOS Init Tables (.gblinit) */
- tibios.MEM.TRCDATASEG = tibios.EPROG; /* TRC Initial Value (.trcdata) */
- tibios.MEM.OBJSEG = tibios.EDATA; /* DSP/BIOS Conf Sections (.*obj) */
- /* BIOS code */
- tibios.MEM.BIOSSEG = tibios.EPROG; /* BIOS Code Section (.bios) */
- tibios.MEM.SYSINITSEG = tibios.EPROG; /* Startup Code Section (.sysinit) */
- tibios.MEM.RTDXTEXTSEG = tibios.IPROG; /* RTDX Text Segment (.rtdx_text) */
- /* Compiler Sections */
- tibios.MEM.TEXTSEG = tibios.EPROG; /* Text Section (.text) */
- tibios.MEM.CINITSEG = tibios.EPROG; /* Data Initialization Section (.cinit) */
- tibios.MEM.PINITSEG = tibios.EPROG; /* C Function Initialization (.pinit) */
- tibios.MEM.CONSTSEG = tibios.EDATA; /* Constant Section (.const) */