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.

CCS: DSP/BIOS tconf: Maximum number of objects in a tcf file ?

Tool/software: Code Composer Studio

Hello,

I am using CCSV7 under Linux (Ubuntu 16.04LTS) and working on C55 based design. Currently, am experimenting on an ezDSP board. I am using DSP/BIOS 5.42

and using a text editor to create and update my .tcf file (as the graphical wizard would not run on linux ??)

It all goes well, but i am facing a bizarre limit in the number of objects in my .tcf file.

It seems that, as soon as I define my first HWI, the tool complains with an "Maximum number of objects already created".

Here is the .tcf

utils.loadPlatform("ti.platforms.ezdsp5535");

/* The following DSP/BIOS Features are enabled.  */
bios.enableRealTimeAnalysis(prog);
bios.enableMemoryHeaps(prog);
bios.enableRtdx(prog);
bios.enableTskManager(prog);

/*
 * Enable heaps in DARAM and define label SEG0 for heap usage.
 */

bios.DARAM.createHeap      = true;
bios.DARAM.enableHeapLabel = true;
bios.DARAM["heapLabel"]    = prog.extern("SEG0");
bios.DARAM.heapSize        = 0x500;
bios.MEM.BIOSOBJSEG = prog.get("DARAM");
bios.MEM.MALLOCSEG = prog.get("DARAM");

/* Enable RTA */
bios.GBL.ENABLEINST = 1;

/*
 *  Define the GBL memory model
 */

bios.GBL.MEMORYMODEL = "LARGE";

/* Increase the buffer size of the LOG_system LOG object */

bios.LOG_system.bufLen = 256;

/* Create a trace LOG object for printing basic program output.  */

var trace = bios.LOG.create("trace");
trace.bufLen = 256;


/* Create a SEM object for synchronizing message sending */

var sem = bios.SEM.create("GO_Sema");
sem.count = 0;

/* Create a TSK object and map it to the initTask function */

var init0 = bios.TSK.create("initTsk");
init0.priority = 15;
init0["fxn"] = prog.extern("initTask");

/* Create a TSK object and map it to the DSP_Audio_Task function */

var audio0 = bios.TSK.create("DspAudioTask");
audio0.priority = 13;
audio0["fxn"] = prog.extern("audioProcess");

/* Create one Task to simulate the reading of the samples and scheduling the
DSP_Audio_Task */

var input0 = bios.TSK.create("InputTask");
input0.priority = 5;
input0["fxn"] = prog.extern("inputProcess");

/* Create SWI's for each port and directions */

/* Codec CopySWI */
var SWI0 = bios.SWI.create("CodecULSWI");
SWI0.priority = 1;
SWI0["fxn"] = prog.extern("CodecUL_SWI");

/* ARM CopySWI */
var SWI2 = bios.SWI.create("ArmULSWI");
SWI2.priority = 1;
SWI2["fxn"] = prog.extern("ArmUL_SWI");

/* create HWI's for the Codec and ARM I2S DMA interrupts */

var HWI0 = bios.HWI.create("CodecDMAHWI");
HWI0.priority = 1;
HWI0["fxn"] = prog.extern("CodecDma_HWI");

var HWI2 = bios.HWI.create("ArmDMAHWI");
HWI2.priority = 1;
HWI2["fxn"] = prog.extern("ArmDma_HWI");






// !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!

prog.gen();

and the error message :

line 77: Maximum number of objects already created

I browsed in all the docs I had (tconf, dsp/bios, etc ..) but could not find anything.

I am forgetting something in the setup ?

Thanks,

Jacques

  • Hi Jacques,

    All the HWIs are already created. You need to change the function (defaults to "HWI_unused") instead of creating new ones. You can do this graphically by selecting the interrupt to plug and right-click and select properties. Then change the function.

    You can change it textually also. For example
    bios.HWI.instance["HWI_INT2"] .fcn = prog.extern("foo", "asm"); // or "C" if "foo" is a C function.

    Todd
  • Hi Todd,
    thanks for this, it actually does make sense.
    However, i just couldn't find a way to hook the existing HWI to my DMA handler.

    bios.HWI.instance["HWI_DMA"].fxn = prog.extern("Dma_HWI"); ==> NOK
    bios.HWI.instance["HWI_SINT8"].fxn = prog.extern("Dma_HWI"); ==> NOK neither

    interestingly, i also tried your line as is

    bios.HWI.instance["HWI_INT2"].fxn = prog.extern("Dma_HWI"); ==> this one didn't work neither

    each time failing with
    js: TypeError: Cannot set property "fxn" of undefined to "config.Extern@4b035d"

    So there is still something i miss, i guess.
    regards,
    Jacques
  • Hi,

    I think I finally got it right .....
    The DMA interrupt is called, in the C55x TRM, "DMA" and said to be equivalent to "SINT8".
    on the DSP/BIOS API Reference, this is quite vague, but table 2.3 gives a small hint :(

    Also googling A LOT, i found on example on C54x, so i concluded this must be HWI_INT8.

    therefore the following lines:

    var HwiDMA = bios.HWI.instance("HWI_INT8");
    HwiDMA["fxn"]= prog.extern("Dma_HWI");
    HwiDMA.useDispatcher = true;

    (btw, instance method uses ( and not [ . :) )
    Thanks for the help,
    Jacques (learning C55x/DSPBIOS the hard way ....)