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.

About SYSBIOS header file for C6670

Guru 15520 points
Other Parts Discussed in Thread: SYSBIOS

Hi,

I have question about MCSDK and SALLD for C6670.

Our system are using PCIe and Security Accelerator(SA) which are integrated in C6670.
We are developing PCIe and SA software based on MCSDK and SALLD sample program.

When we compiled the software, the following error message occured:
//////////////////////////////////////////////////////////////////
"C:/ti/bios_6_33_06_50/packages/ti/sysbios/hal/Hwi.h", line 727: warning #48-D: incompatible redefinition of macro "Hwi_Instance" (declared at line 912 of "C:/ti/bios_6_33_06_50/packages/ti/sysbios/family/c64p/Hwi.h")
"C:/ti/bios_6_33_06_50/packages/ti/sysbios/hal/Hwi.h", line 728: warning #48-D: incompatible redefinition of macro "Hwi_Handle" (declared at line 913 of "C:/ti/bios_6_33_06_50/packages/ti/sysbios/family/c64p/Hwi.h")
"C:/ti/bios_6_33_06_50/packages/ti/sysbios/hal/Hwi.h", line 729: warning #48-D: incompatible redefinition of macro "Hwi_Module" (declared at line 914 of "C:/ti/bios_6_33_06_50/packages/ti/sysbios/family/c64p/Hwi.h")
"C:/ti/bios_6_33_06_50/packages/ti/sysbios/hal/Hwi.h", line 730: warning #48-D: incompatible redefinition of macro "Hwi_Object" (declared at line 915 of "C:/ti/bios_6_33_06_50/packages/ti/sysbios/family/c64p/Hwi.h")
//////////////////////////////////////////////////////////////////

In PCIe and SA sample program, it include "Hwi.h".
But include path for "Hwi.h" is different between PCIe and SA sample program.
Each include path is as following:
//////////////////////////////////////////////////////////////////
*SA sample program(unitest.h)
 #include <ti/sysbios/hal/Hwi.h>

*PCIe sample program(pcie_sample.h)
#include <ti/sysbios/family/c64p/Hwi.h>
//////////////////////////////////////////////////////////////////

*Question
1.Should it unify into one of Hwi.h?

2.What is the difference between <family/c64p/Hwi.h> and <hal/Hwi.h> ?

best regards,
g.f.

  • Hi,

    The ti.sysbios.family package contains family-specific implementations of modules in the Hardware Abstraction Layer (HAL) package.

    The SYS/BIOS ti.sysbios.hal package requires target/device-specific API implementations to achieve their functionality.
    To provide a common set of APIs for these modules across all supported families/devices, SYS/BIOS uses the RTSC proxy-delegate module mechanism.
    That is, the HAL modules serve as a proxies for a corresponding family-specific module implementation.

    However, if the generic APIs cannot enable use of a device-specific hardware feature that is advantageous to the software application, you may choose to use the target/device-specific APIs.

    For example, if your config.bld file specifies that one of your build targets is the C64P family, the ti.sysbios.hal.Hwi knows to bind itself to the ti.sysbios.family.c64p.Hwi implementation.

    g.f: said:
    What is the difference between <family/c64p/Hwi.h> and <hal/Hwi.h> ?

    hal/Hwi.h

    This module provides APIs for managing hardware interrupts. These APIs are generic across all supported targets and devices and should provide sufficient functionality for most applications.

    family/c64p/Hwi.h

    This Hwi module provides C64+ family-specific implementations of the APIs defined in IHwi

    Go through the sections "3.3 Hardware Interrupts" & "7.2.8 Additional Target/Device-Specific Hwi Module Functionality" at TI SYS/BIOS Real-time Operating System User's Guide to get detailed info.

  • Hi pubeshi,

    Thank you for the details.

    Sorry, but let me ask again to make me sure.
    So, <family/c64p/Hwi.h> is extended version of <hal/Hwi.h> and
    it is target-specific module.

    From the following TI wiki page,  family/c64p/Hwi module provides APIs that implement
    HWI function specific to the C66x devices.
    http://processors.wiki.ti.com/index.php/Configuring_Interrupts_on_Keystone_Devices#HWI

    Our device is C6670 so that we should use family/c64p/Hwi module and
    inlude <family/c64p/Hwi.h>, is it correct?

    By the way, I checked the SYSBIOS cfg file of SA sample program and
    it's using family/c64p/Hwi module. But <hal/hwi.h> was inluded in unitest.h.
    Should not <family/c64p/HwiI.h> be included?

    best regards,
    g.f.

  • Hi,

    On the interrupt routines that BIOS provides. I would suggest looking at the BIOS User's Guide, specifically the "Hardware Abstraction Layer" section. This talks about using the HWI module, that provides a collection of APIs for managing hardware interrupts.

    And also have a look at the below E2E post,
    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/146768/530454.aspx#530454
    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/262380/917668.aspx#917668

  • Hi Pubesh,

    Thank you for the reply.

    I understood.

    best regards,
    g.f.