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: Linker issue when attempting to compile with I2S.h include.

Part Number: SIMPLELINK-CC13X2-26X2-SDK
Other Parts Discussed in Thread: SYSCONFIG

Hello,
I am using Code Composer Studio Version: 9.3.0.00012 with simplelink_cc13x2_26x2_sdk_3_30_00_03.
and I'm trying to use the supplied driver by TI I2S.h located at "c:\ti\simplelink_cc13x2_26x2_sdk_3_30_00_03\source\ti\drivers\"
However, when referring to the I2S_Init() function from my code I receive the following linker fault:

Unresolved symbol first referred at:
I2S_config C:/ti/simplelink_cc13x2_26x2_sdk_3_30_00_03/source/ti/drivers/lib/drivers_cc13x2.aem4f

The code is as follows:
#include "system.h"
#include "HalApi/I2SHal.h"
#include <ti/drivers/I2S.h>
void I2sHal_Init(void)
{
I2S_init();
}

arm linker file search path is as follows:
${INHERITED_LIBRARIES}
${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_LIBRARIES}
${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/rf/lib/rf_multiMode_cc13x2.aem4f
${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib
${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/kernel/tirtos/packages/ti/dpl/lib/dpl_cc13x2.aem4f
${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/lib/drivers_cc13x2.aem4f
libc.a

NOTE: I did try a different order for linking.

I don't understand the issue since the undefined symbol is defined in ti/drivers/I2S.h
Could you please assist?


To view your case or add a reply, click the View Case button:

 

  • Hi,

    Actually the table of structures I2S_Config named I2S_config[] is NOT defined in I2S.h (I agree it is not easy to see).

    So, to solve your issue, you need to define the table I2S_config[] somewhere. You are lucky, SysConfig does this for you :) You may want to review the i2secho example to see how this is done.

    Best regards,

  • Hi Clément,

    Thank you for your quick response,

    I added the type definitions and includes as follows:

    typedef struct I2S_Config {
    /* Pointer to a driver specific data object */
    void *object;

    /* Pointer to a driver specific hardware attributes structure */
    void const *hwAttrs;
    } I2S_Config;

    /* I2S_Config structure defined in the board file */
    extern const I2S_Config I2S_config[];
    typedef struct I2S_Config *I2S_Handle;

    #include "system.h"
    #include "HalApi/I2SHal.h" //protoypes 

    if I remove #include <ti/drivers/I2S.h>, I'll get a warning #225-D: function "I2S_init" declared implicitly and error #20: identifier "I2S_Params" is undefined.

    If I include the I2s.h then I get that I2S_Config is redfined.

    BR

     

  • Hi,

    This is not exactly what I meant. Please review the i2secho example available in your SDK.

    There, you can review how SysConfig is used to enable the I2S module. You will also notice that at build time, Sysonfig generate the file ti_drivers_config.c where the table I2S_config[] is declared:

    /*
     *  =============================== I2S ===============================
     */
    
    #include <ti/drivers/I2S.h>
    #include <ti/drivers/i2s/I2SCC26XX.h>
    
    #define CONFIG_I2S_COUNT 1
    
    I2SCC26XX_Object i2sCC26XXObjects[CONFIG_I2S_COUNT];
    
    const I2SCC26XX_HWAttrs i2sCC26XXHWAttrs[CONFIG_I2S_COUNT] = {
        /* CONFIG_I2S_0 */
        /* CC3200 Audio BoosterPack I2S */
        {
            .pinSD1      =  IOID_1,
            .pinSD0      =  IOID_0,
            .pinSCK      =  IOID_30,
            .pinMCLK     =  PIN_UNASSIGNED,
            .pinWS       =  IOID_29,
            .intPriority =  0x40
        }
    };
    
    /*
     *  ======== I2S_config ========
     */
    const I2S_Config I2S_config[CONFIG_I2S_COUNT] = {
        /* CONFIG_I2S_0 */
        /* CC3200 Audio BoosterPack I2S */
        {
            .object      = &i2sCC26XXObjects[CONFIG_I2S_0],
            .hwAttrs     = &i2sCC26XXHWAttrs[CONFIG_I2S_0]
        },
    };
    
    const uint_least8_t I2S_count = CONFIG_I2S_COUNT;

    Regards,

  • Thank you so much, 

    I failed to understand your answer, however, I do now. Thanks