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.

Conditionally include NDK in project

Other Parts Discussed in Thread: TM4C129ENCPDT

Hi,

I am using CCS V6 for a TIVA tm4c129encpdt processor.

What is the proper way (if any) to conditionally include or exclude NDK for a TI-RTOS project with a separate build configuration?

I have a project that can be compiled with several different build configurations depending on variations in functionality. Now I need to add a new build configuration for a new model that is going to communicate with a device with Modbus RTU over TCP and therefore I need to add the NDK. But I would only like to add it for just that build configuration. Is that possible? Can I use predefined symbols to conditionally include modules in app.cfg or perhaps have several app.cfg which can be set to be excluded from build so that different configurations uses different app.cfg?

Or do I need to include NDK for all configurations or make a new project and link the files from the other project into that?

/Ruben

  • Hi Ruben,

    You could try the following trick that I often use.  It takes advantage of "cfgArgs".  I use the following value for "cfgArgs" in order to build different apps using a shared configuration file:

            /* build config for static IP, ARM9 MMU settings, & IPv6 enabled */
            cfgArgs: "{IPv6:true, staticIP_10_90_90_3:false, ARM9:true}",

    Then in my config file, I use these variables to configure what I want.  For example:

    /* use args set in package.bld to determine IPv6 settings */
    if (typeof(Program.build.cfgArgs) != "undefined") {
        if (Program.build.cfgArgs.IPv6) {
            Global.IPv6 = true;
        }
        else {
            Global.IPv6 = false;
        }
    }

    You could do something similar to filter out your NDK config settings and useModule()'s.

    I'm assuming you're building in CCS.  In that case, you would need to open your project's build settings (right click on project, select build options or build settings).  "cfgArgs" can be input under the XDC tools options:

    Steve

  • Thanks, exactly what I want and seems to be working fine.

    /Ruben