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.

SIMPLELINK-CC13X2-26X2-SDK: SDK always includes grlib.a in ti_utils_build_linker.cmd.genlibs

Part Number: SIMPLELINK-CC13X2-26X2-SDK
Other Parts Discussed in Thread: SYSCONFIG
function getLibs(mod)
{
// ... snip ...

    if (family != "") {
        family = family.replace(/^DeviceFamily_/, "").toLowerCase();
        if (family.indexOf("msp432e") == 0) {
            family = "msp432e4";
        }
        else if (family.indexOf("cc32") == 0) {
            family = "cc32xx";
        }

        libs.push(libPath("ti/drivers","drivers_" + family + ".a"));
        // libs.push(libPath("ti/grlib", "grlib.a"));

        if (rtos == "TI-RTOS") {
            libs.push(libPath("ti/dpl","dpl_" + family + ".a"));
        }
        else if (rtos == "NoRTOS") {
            libs.push("lib/" + getToolchainDir() + "/" + getDeviceIsa() +
                "/nortos_" + family + ".a");
        }
    }
// ... snip ...
}
The relevant piece of code exists in: "simplelink_cc13x2_26x2_sdk_4_30_00_54/source/ti/drivers/.meta/Board.syscfg.js"

This function always pushes "grlib.a" to the list of required libs for a product even if the project isn't using the graphics library. There's no logic here to conditionally include this library.
  • Forum's formatting consumed my question into a code block for some reason, so putting it down here:

    The relevant piece of code exists in: "simplelink_cc13x2_26x2_sdk_4_30_00_54/source/ti/drivers/.meta/Board.syscfg.js"

    This function always pushes "grlib.a" to the list of required libs for a product even if the project isn't using the graphics library. There's no logic here to conditionally include this library.

    Basically, why?

  • Hey Logan,

    This metadata is from the SysConfig Board View information.  The SimpleLink Graphics Library is included in projects to make it easier to add grlib functionality if desired for LCD displays or otherwise.  If you do not call any grlib-related functions or code then it will not be linked into the firmware image.

    Regards,
    Ryan

  • Hi Ryan,

    Thanks for getting back to me.

    I understand the intent behind including the library but my issue is really with the indiscriminate inclusion. I'm not a fan of including extraneous libraries that I didn't ask for in my link. I think why I'm particularly confused is that the comment header in "ti_utils_build_linker.cmd.genlibs" specifically states:

    Libraries needed to link this application's configuration

    And my configuration doesn't require the "grlib.a" library, which means this is kind of defeating the purpose in my opinion.

    The "Board.syscfg.js" file already has other intelligent library management code in it, it seems you could do something like the following:

    if (system.modules['/ti/display/Display']) {
        libs.push(libPath("ti/grlib", "grlib.a"));
    }

    I understand there may be other modules that depend on the "grlib.a", I just included the most obvious one.

    Cheers,

    Logan

  • Hey Logan,

    Thanks for the feedback, I will pass it along to the SysConfig Development Team for further consideration.

    Regards,
    Ryan