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 include guard resulting app.cfg header file

Other Parts Discussed in Thread: SYSBIOS

Hi,

Is there a possibility to get standard include guards for the resulting header files that is created by parsing the app.cfg java script file for all bios specific elements?

I create global defines by using "Program.global." which are used in the app.cfg to control the creation of bios elements and in the code to include and exclude code using preprocessor conditionals #if (Program.global.foo == 1)  #endif.

I got a waring from PC-lint that the app_p28FP.h is repeatedly included but does not have a standard include guard

I use:

CCS6.1.3

SYS/Bios 6.45.1.29

XDCtools 3.32.0.06

TI28335 controller

  • I'm not understand what you are asking or trying to do.

    Are you trying to create a app.cfg that has #if statements in there?

    Can you post some example of what you are trying to do.

  • judahvang,

    because the parsing of the app.cfg java script leads to a app_p28FP.h and .c where all SYS/Bios specifics are defined, the resulting app_p28FP.h file has no include guards.

    e.g.

    #ifndef _APP_P28FP

    #define _APP_P28FP

    #endif

    I defined some definitions by using "Program.global.xxx" in the app.cfg script. Because there is no include guard PC-lint will complain, that the file is repeadetly included without such guards. The top of my resulting header file looks like below.

    /*

    * Do not modify this file; it is automatically

    * generated and any modifications will be overwritten.

    *

    * @(#) xdc-B06

    */

    #include <xdc/std.h>

    #define Global_FW_PART_NUMBER "N39yyy"

    #define Global_FW_TYPE "TC"

    #define Global_FW_REVISION "2"

    #define GlobalTraceActive 0x1

    #define GlobalAdamMasterConfig 0x0

    #define GlobalIntfConfig 0x0

    #include <ti/sysbios/knl/Task.h>

    extern const ti_sysbios_knl_Task_Handle adamMsgHandlerTask;

    #include <ti/sysbios/knl/Task.h>

    extern const ti_sysbios_knl_Task_Handle adamSciHandlerTask;

    #include <ti/sysbios/knl/Task.h>

    extern const ti_sysbios_knl_Task_Handle SystemController;

    #include <ti/sysbios/knl/Task.h>

    extern const ti_sysbios_knl_Task_Handle diagTask;

  • Hi,

    Okay, I think I understand what you are saying now....I believe there's a mechanism for doing what you are trying to do.
    It involves including.

    #include <xdc/cfg/global.h>

    You can look in your <XDCTOOLS INSTALL>/packages/xdc/cfg/global.h for a description of what needs to be done.

    Judah

  • Hi Judah,
    works for me, thanks for your help.
    I also looked on the web site
    rtsc.eclipse.org/.../Program.html
    where some more information are posted than in the global.h

    Patrik