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.

Link error with CpIntc_dispatch in the CFG file

Other Parts Discussed in Thread: SYSBIOS

Hello all,

(target c6678, sysbios 6.37, XDC tools 3.25, CCSv6 .98, compiler 7.4.5)

In my CFG I have

xdc.useModule('ti.sysbios.family.c66.tci66x.CpIntc');
xdc.useModule('ti.sysbios.family.c64p.Hwi');

...

Hwi.create(11, "&CpIntc_dispatch", hwi_params);

In my C file

#include <ti/sysbios/family/c66/tci66xx/CpIntc.h>
#include <ti/sysbios/family/c64p/Hwi.h>

But when I compile I get a link error saying that

the symbol CpIntc_dispatch is not found.

If I do the HWI creation at runtime (still with CpIntc_dispatch) it links.

I don't get it.

Thank you

Clement

  • Clement,

    The CpIntc_dispatch is your Hwi(ISR) function. Do you have the function defined in your application? The linker will complain if it can't find that function defined elsewhere in your application.

    Moses

  • Moses,

    CpIntc_dispatch is a TI SYSBIOS CpIntc function. It is defined in CpIntc.c, provided by TI. 
    Therefore i can't "define" it in my application.

    It's usage is recommended here :

    http://processors.wiki.ti.com/index.php/Configuring_Interrupts_on_Keystone_Devices

    The example code works for runtime creation but static configuration fails.

    Clement

  • Hi Clement,

    The right way to register CpIntc_dispatch() as a Hwi function in the cfg file is as follows:

    Hwi.create(11, CpIntc.dispatch, hwi_params);

    However, it looks like there is a mismatch between the function signatures of CpIntc_dispatch() and Hwi function which will cause a build failure. A workaround is to use the full function name as follows:

    Hwi.create(11, "&ti_sysbios_family_c66_tci66xx_CpIntc_dispatch__E", hwi_params);

    I have filed a bug to fix the function signature. Here's the link to the bug:

    https://cqweb.ext.ti.com/cqweb/main?command=GenerateMainFrame&service=CQ&schema=SDO-Web&contextid=SDOWP&entityID=SDOCM00112060&entityDefName=IncidentReport&username=readonly&password=readonly

    Best,

    Ashish

  • Hi Ashish,

    Thank you for your reply.

    I'll try your workaround.

    To my knowledge, CpIntc.dispatch use in the CFG is not described anywhere in the documentation (neither cdoc nor wiki). You may want to file a documentation problem report for that.


    Clement

  • Hi Clement,

    I agree, the cdoc should include a cfg script example. I have updated the bug to also add a cfg example to the C66 CpIntc cdoc.

    Best,

    Ashish

  • Thank you Ashish.

    I confirm it works with "&ti_sysbios_family_c66_tci66xx_CpIntc_dispatch__E"

    For others reading this :

    in Tools -> RTOS Object View there is very useful information about how you configured CpIntc.

    On my side I consider this thread closed.

    Clement