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.

SYS/BIOS: Difference between 'hal/Hwi.h' and 'family/c64p/Hwi.h' ?

Other Parts Discussed in Thread: SYSBIOS

Hi

I am developing for a C6670 dsp and am using SYS/BIOS 6_32_04_49.

I have adapted a TI example that #includes ti/sysbios/family/c64p/Hwi.h".

I am now merging in code from another application that uses /ti/sysbios/hal/Hwi.h

This results in warnings similar to:

"C:/TI/bios_6_32_04_49/packages/ti/sysbios/hal/Hwi.h", line 715: warning: incompatible redefinition of macro "Hwi_Instance" (declared at line 892 of "C:/TI/bios_6_32_04_49/packages/ti/sysbios/family/c64p/Hwi.h")

Which of these two header files should I be using?  What is the difference between them please?

I should add that the TI example uses the c64p folder because it requires EventCombiner.h, which is not available in the hal folder.

Best regards

David

  • Hi David,

    hal/Hwi.h corresponds to a Hwi interface that is standardized across all device families supported by SYS/BIOS.  This standard Hwi interface is often extended in a “family specific” way, which leverages additional interrupt control mechanisms for a specific family of devices.  For example, for c64p, there is additional support for event mapping, that is not in hal/Hwi.h.

    To maximize code portability it is best to stick to the hal/Hwi.h interface if possible.  But often the additional family specific interrupt mechanisms indeed need to be used, so the family specific header is included.

    I think for your case, if you have code that intentionally included the family-specific interface for some reason, you’ll want to stick with that header file as you merge the code.

    Scott