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.

Curious are some things not supported in the GUI configurator?

Other Parts Discussed in Thread: SYSBIOS

In the cfg file I had.

var Swi = xdc.useModule('ti.sysbios.knl.Swi');
var emifatm_txParams = new Swi.Params();
emifatm_txParams.instance.name = "emifatm_tx";
Program.global.emifatm_tx = Swi.create("&emifatm_tx_swi", emifatm_txParams);

In the c code I had

extern  SWI_Obj emifatm_tx;
...
SWI_post(&emifatm_tx);

This compiled and ran, but never hit seemed to go into the swi.

In the end I gave up on the gui and removed the swi definition in the cfg file and added this to the c file

Swi_Handle emifatm_tx_h = NULL;
...
xdc_runtime_Error_Block eb;
xdc_runtime_Error_init(&eb);
emifatm_tx_h = Swi_create(emifatm_tx_swi, NULL, &eb);
if (emifatm_tx_h == NULL) { edma_abort("Swi create failed"); }

Then changed my swi_posts to

if(emifatm_tx_h) Swi_post(emifatm_tx_h);

 

Everything sprung to life!

Is there something like statically created swi's needed to be activated somehow?

Did I get the extern wrong somehow - and still got past the linker?

Is there a big list of gotchas that I missed?

All the threads I created statically are running so I am sure I called dsp_start.

 

(Everything is the current version so far as I can tell bios_6_33_02_31)

 

  • Chris,

    I think your static creation case will work if you: 1) remove the explicit extern declaration for the Swi object in the C file, and 2) include this header to allow access to global configuration values:

    #include <xdc/cfg/global.h>

    In the C code you can then post the Swi like this:

       Swi_post(emifatm_tx);

    You may want to look at the “static” or “stairstep” SYS/BIOS example templates, which use similar static Swi creation.

    Scott

  • Thanks for the quick accurate reply.