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/TM4C1294NCPDT: Event handle not recognized in program

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

I am using CCS v7.2.0.00013, Compiler v16.9.4.LTS RTOS v2.16.1.4 and XDCtools v3.32.0.06_core

I have added an Event_pend  in a task and a corresponding Event_post elsewhere in the program.

I created an event handle for it in the XCONF section under TI-RTOS->Products->SYSBIOS->Synchronization->Event->Instance Settings

But when I compile the program I get an error that the event handle is unidentified. 

I did a full clean but still got the error.

I added an extern processor line with the event handle name and it works fine.

I have never had to add an extern for a handle in the past.  Did I forget something?

The event handle I created is named doSystemReset and I had to add the line   extern ti_sysbios_knl_Event_Handle doSystemReset;

  • Hi Sam,
    I'm able to replicate the error without the extern ti_sysbios_knl_Event_Handle if I create the event statically. I will ask our TI-RTOS expert for comments as you said you didn't encounter the problem before. I'm using the same XDCtools version.
  • I took one of the kernel example in TI-RTOS (Mutex) and added an Event instance in the .cfg:

    var Event = xdc.useModule('ti.sysbios.knl.Event');
    var event0Params = new Event.Params();
    event0Params.instance.name = "myEvent";
    Program.global.myEvent = Event.create(event0Params);

    Then in the main source file (mutex.c) I add the following (note: I did not worry about a working example, just one that built properly.

    #include <ti/sysbios/knl/Event.h>
    #include <xdc/cfg/global.h>

    ...
    //down in one of the tasks
    Event_post(myEvent, 0);

    I expect you did not have the global.h include. This file indirectly includes all the "Program.global" variables from the .cfg file.

    We used to always #include global.h in the examples, but sometimes it has a problem if you are including Hwi.h also. So to avoid this potential issue (and trying to explain it), we removed the global.h include from the files.

    Todd
  • Yes, yes, yes.
    Looking at previous programs that didn't have the problem in fact that #include was present.
    I added it to my new program and sure enough, it worked.

    I had contemplated adding all the includes from the previous program but I hate mucking up source code with unnecessary includes.

    Thanks for the quick answer.
    Sam
  • Cool! Thanks for getting back to us.