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.

Unresolved symbols for Event related functions

Other Parts Discussed in Thread: SYSBIOS

Hi,

I am getting unresolved symbols error from the CCS for Event related functions as given below,

undefined                                          first referenced
symbol                                                in file
---------                                              ----------------
ti_sysbios_knl_Event_create        <whole-program>
ti_sysbios_knl_Event_post__E    <whole-program>

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "simple_peripheral_cc2650lp_app.out" not built
gmake: *** [simple_peripheral_cc2650lp_app.out] Error 1

How can I avoid such an error?

But one interesting thing is that I have a different workspace where I am using Events to communicate between the Tasks. I my second workspace the build was successful.

Regards,

Danish

  • Hi Danish,

    Have you compared the .cfg  files? Most likely, you are missing the Event module in your configuration.

    If you are using CCS, it will be under TI-RTOS->Products->SYSBIOS->Synchronization->Events

    If you use IAR or open the text version of the file, make sure that this line is included in your .cfg file.

    var Event = xdc.useModule('ti.sysbios.knl.Event');

    Regards,

    Michel

  • Hi Michel,

    Thanks for the reply.

    Unfortunately this line is also there in the .cfg file.

    I am using BLE stack version 2.2 and its .cfg file contains Event part is like this

    /*
     * Allows for the implicit posting of events through the semaphore,
     * disable for additional code saving.
     *
     * Pick one:
     *  - true
     *      This allows the Semaphore module to post semaphores and events
     *      simultaneously.
     *  - false (default)
     *      Events must be explicitly posted to unblock tasks.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsEvents = true;
    Semaphore.supportsEvents = false;
    
    
    
    
    /* ================ Events configuration ================ */
    if (typeof USE_EVENTS != 'undefined' && USE_EVENTS != 0)
    {
      var Events = xdc.useModule('ti.sysbios.knl.Event');
    }
    

    According to this file, what can I do to include Events to my project. 

    Where should I include the Macro USE_EVENTS ?

    Regards,

    Danish

  • Hi Danish,

    Have you tried simply moving the Events statement outside of the if block?

    I'm not quite sure whether USE_EVENTS is a macto or something else (because of the typeof  statement). Nevertheless, if it is a macro, then it should be in the pre-compiler options.

    In CCS, it would in the project options under Predefined symbols.

    In IAR, in project options, in the C/C++ compiler options under the pre-processor tab.

    Regards,

    Michel

  • Hi Michel,

    I solved the problem by adding  USE_EVENTS=1 to "Project→Properties→Build→XDCtools→Advanced" as in the figure below

    Thanks for the suggestion 

    Regards,

    Danish

  • Glad to see that you resolved your issue.
    I suggest that you click on "Verify Answer" on your own answer so others can benefit from it.
    Michel
  • I m getting following unresolved symbol error for following events in ccs

    undefined                                                              first referenced
    symbol                                                                              in file 
    ---------                                                                           ----------------
    ti_sysbios_knl_Event_Params__init__S         <whole-program> 
    ti_sysbios_knl_Event_construct                       <whole-program> 
    ti_sysbios_knl_Event_pend__E                       <whole-program> 
    ti_sysbios_knl_Event_post__E                         <whole-program>

    Also my app_ble.cfg file contains

    //Semaphore.supportsEvents = true;
    Semaphore.supportsEvents = false;


    /* ================ Events configuration ================ */
    if (typeof USE_EVENTS != 'undefined' && USE_EVENTS != 0)
    {
    var Events = xdc.useModule('ti.sysbios.knl.Event');
    }

    I have also defines USE_EVENTS=1 in XDCtools->advanced options

    Still this error persists.

    can u suggest a solution? 

  • Hi Pavithra,

    Apology for late reply.

    If you are not solved your problem, clean and build again. Cleaning most likely solve the problem. Worked for me.

    Reason - Configuration files is already imported and build for you when you click the build button for the first time. To reflect changes applied to the configuration in your project, need to import the file again.

    Regards,
    Danish
  • Hi,

    Thanks for reply

    I got it resolved by adding following lines in app_ble.cfg

    utils.importFile("../../../../../src/common/cc26xx/kernel/cc2640/config/cc2640.cfg");

    //Semaphore.supportsEvents = true;

    Semaphore.supportsEvents = false;

    /* ================ Events configuration ================ */

    if (typeof USE_EVENTS != 'undefined' && USE_EVENTS != 0)

    {

        var Events = xdc.useModule('ti.sysbios.knl.Event');

        print("Howdy!!!!!!");  // shows up in the build log...used to verify that it was included:)

    }

    Also add USE_EVENTS=1 in the XDCtools->Advanced->Config Script args

    Then clean and build the project.

     

  • Glad to hear that you solved it.

    Regards,
    Danish