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.

CCS/OPT3101-SDK: OPT3101 SDK in C

Part Number: OPT3101-SDK
Other Parts Discussed in Thread: OPT3101, CC2650MODA, CC2650

Tool/software: Code Composer Studio

Is OPT3101 Time-of-Flight sensor SDK available in C?

I download OPT3101 SDK 0.9.1 that is in C++ and I am trying to use this sensor with CC2650MODA Simplelink BLE MCU acting as a host processor. The sample programs for CC2650MODA is in C and even Bluetooth stack is in  C.

I tried converting CC2650MODA project to C++ to make it work with OPT3101 SDK but I am getting compile time error since Bluetooth stack ICall routines are built in C.

Can TI provide OPT3101 SDK in C for project that require to be built in C?

  • Hi,

    The SDK is in C++ only so cannot be given in C. Using C++ project would be the right approach. Why would the bluetooth stack give issues since it is written in C? C++ is backward compatible with C.

    Best,

    Alex

  • Hi Alex,

    For CC2650 I am using sample project in CC2650 SDK and trying to add my application and OPT3101 SDK to the application. If I convert my CC2650 project to C++ but I started getting errors with ICall routines that interact with Bluetooth stack SDK project.

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Description    Resource    Path    Location    Type
    #20 identifier "ICall_MsgMatchFn" is undefined    icall.h    /sensor_cc2650bp_app/ICall    line 853    C/C++ Problem
    #20 identifier "ICall_MsgMatchFn" is undefined    icall.h    /sensor_cc2650bp_app/ICall    line 2749    C/C++ Problem
    #302 a pointer to a bound function may only be used to call the function    icall.h    /sensor_cc2650bp_app/ICall    line 2380    C/C++ Problem
    #302 a pointer to a bound function may only be used to call the function    icall.h    /sensor_cc2650bp_app/ICall    line 2382    C/C++ Problem
    #302 a pointer to a bound function may only be used to call the function    icall.h    /sensor_cc2650bp_app/ICall    line 2469    C/C++ Problem
    #80 expected a type specifier    icall.h    /sensor_cc2650bp_app/ICall    line 449    C/C++ Problem
    #91 function returning function is not allowed    .ccsproject    /sensor_cc2650bp_app    line 137, external location: C:\ti\tirtos_cc13xx_cc26xx_2_21_01_08\products\cc26xxware_2_24_03_17272\driverlib\interrupt.h    C/C++ Problem
    #91 function returning function is not allowed    .ccsproject    /sensor_cc2650bp_app    line 159, external location: C:\ti\tirtos_cc13xx_cc26xx_2_21_01_08\products\cc26xxware_2_24_03_17272\driverlib\interrupt.h    C/C++ Problem
    #91 function returning function is not allowed    .ccsproject    /sensor_cc2650bp_app    line 366, external location: C:\ti\tirtos_cc13xx_cc26xx_2_21_01_08\products\cc26xxware_2_24_03_17272\driverlib\interrupt.h    C/C++ Problem
    #91 function returning function is not allowed    icall.h    /sensor_cc2650bp_app/ICall    line 449    C/C++ Problem
    #91 function returning function is not allowed    icall.h    /sensor_cc2650bp_app/ICall    line 2375    C/C++ Problem
    #91 function returning function is not allowed    icall.h    /sensor_cc2650bp_app/ICall    line 2463    C/C++ Problem
    gmake: *** [Startup/main.obj] Error 1    sensor_cc2650bp_app             C/C++ Problem
    gmake: Target 'all' not remade because of errors.    sensor_cc2650bp_app             C/C++ Problem

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Also I found this post (link below) that suggest similar problem problem with building BLE stack project in C++.

    https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/462117

  • Hi Pritesh,

    Thanks for the additional details. This would be a question for the CC2650 team to see if they can help in compiling the code with C++. If you would like to go this route could you please open another e2e post on the CC2650 device to get help from the correct team? From the OPT3101 side we do not support C.

    Best,

    Alex