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.

Instance Names in BIOS 6

Guru 15580 points
Other Parts Discussed in Thread: SYSBIOS

When creating an instance of a module in xgconf, it appears that bios 6 gives the instance a (very long) default name. The on-line xgconf user guide says "If you want to change the name property of an instance, you must do that in the Source tab.". Since the guide gives no example, I tried to following. Note that I somehow managed to get timer1's name to show up properly in the outline. However, timer2 still has the old default name.

var ti_sysbios_hal_Timer = xdc.useModule('ti.sysbios.hal.Timer');

 

var instti_sysbios_hal_Timer1Params0 = new ti_sysbios_hal_Timer.Params();

instti_sysbios_hal_Timer1Params0.period = 500;

instti_sysbios_hal_Timer1Params0.instance.name = "timer1";

Program.global.timer1 = ti_sysbios_hal_Timer.create(1, "&myISR", instti_sysbios_hal_Timer1Params0);

 

var instti_sysbios_hal_Timer1Params1 = new ti_sysbios_hal_Timer.Params();

instti_sysbios_hal_Timer1Params1.period = 2000;

instti_sysbios_hal_Timer1Params1.instance.name = "timer2"; // *** this is my attempt to rename this timer

var instti_sysbios_hal_Timer1 = ti_sysbios_hal_Timer.create(2, null, instti_sysbios_hal_Timer1Params1);

And here is the outline showing timer2 with the old default name:

What am I doing wrong? How do I rename the timer so that it shows up properly in the outline?

Thx

MikeH

 

 

 

  • MikeH,
    the outline displays local script variables that reference objects. The lines that determine the names that you see in the outline are:

    Program.global.timer1 = ti_sysbios_hal_Timer.create(1, "&myISR", instti_sysbios_hal_Timer1Params0);
    and
    var instti_sysbios_hal_Timer1 = ti_sysbios_hal_Timer.create(2, null, instti_sysbios_hal_Timer1Params1);

    The parameter 'name' that you are setting determines the instance name seen at the runtime. For xgconf, that parameter does not have any special meaning, so it's not being used as a name to display in the outline. But, you can always use a local variable 'timer2' to reference the object with the parameter 'name' set to 'timer2'. Then, the second line quoted above would be

    var timer2 = ti_sysbios_hal_Timer.create(2, null, instti_sysbios_hal_Timer1Params1);

  • Thanks Sasha.