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.

CC2650 Building Sensor Controller analog_light_sensor_tirtos in CCS

After importing the sensor controller example to CCS, I am unable to resolve the build error described below:

undefined first referenced
symbol in file
--------- ----------------
main C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.4\lib\rtsv7M3_T_le_eabi.lib<args_main.obj>

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "analog_light_sensor_tirtos.out" not built

>> Compilation failure
gmake: *** [analog_light_sensor_tirtos.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

#10010 errors encountered during linking; "analog_light_sensor_tirtos.out" not built analog_light_sensor_tirtos C/C++ Problem
<a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10234.html">

#10234-D</a> unresolved symbols remain analog_light_sensor_tirtos C/C++ Problem

unresolved symbol main, first referenced in C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.4\lib\rtsv7M3_T_le_eabi.lib<args_main.obj> analog_light_sensor_tirtos C/C++ Problem

  • Hello Etan,
    It should work "out of the box" after you started SCS and generated the driver. I have not seen this particualr error while working with the sensor controller example projects myself.

    Are you using Version: 6.1. or later?

    Have you removed all previous installations and tried with a fresh clean install?

    Did you import the project from?:
    C:\Users\<your user>\Documents\Texas Instruments\Sensor Controller Studio\examples\analog_light_sensor\projects\ccs_tirtos
  • I am using version 6.1, I first reinstalled both CSS, simplelink, and SCS. I will try reinstalling again. Yes I used that import 

  • Reinstalled all software and got the same error
  • If I import:
    main_tirtos.c
    scif_framework.c
    scif_framework.h
    scif_osal_tirtos.c
    scif_osal_tirtos.h
    scif.c
    scif.h
    Into the SimpleBLEPeripheral project, the build error does not occur
    How do I merge the main_tirtos.c fns into the simpleBLEperiperal.c code so that I am able to run the sensor controller example 'analog_light_sensor_tirtos' during the periodic task, SimpleBLEPeripheral_performPeriodicTask?
  • I resolved the build error. While attempting to combine the SCS code with the simpleBLEPeripheral code I modified the main_tirtos.c int main(void) function to int main2(void) to enable compiling and association with the simpleBLEperipheral before I merged the functions. This edit dodged the re-installs as it was part of the working directory for SCS.
  • CCS Error:
    Try to delete the two folders mentioned below and import the example again. Then try to compile:
    - Remove your workspace project:
    C:\Users\<your user>\workspace_v6_xxx\analog_light_sensor_tirtos

    -Remove the src folder from the example:
    C:\Users\<your user>\Documents\Texas Instruments\Sensor Controller Studio\examples\analog_light_sensor\projects\ccs_tirtos\src

    Integrate driver into SimpleBLEPeripheral application:
    You can for example start by creating a separate task to control the sensor controller application. You will need to initialize in the same manner from main.
  • I created a separate task and integrated the analog taskFxn and called the task after the SimpleBLEPeripheral_createTask();
    In main.c:
    SimpleBLEPeripheral_createTask();
    Analog_light_sensor_createTask();

    void Analog_light_sensor_createTask(void)
    {
    Task_Params taskParams;

    // Optional: Prevent the system from entering standby to allow debugging
    #if DISABLE_LOW_POWER
    Power_setConstraint(Power_SB_DISALLOW);
    Power_setConstraint(Power_IDLE_PD_DISALLOW);
    #endif

    // Initialize the PIN driver
    PIN_init(BoardGpioInitTable);

    // Configure the OS task
    Task_Params_init(&taskParams);
    taskParams.stack = myTaskStack;
    taskParams.stackSize = sizeof(myTaskStack);
    taskParams.priority = 3;
    Task_construct(&myTask, taskFxn, &taskParams, NULL);
    }

    In debugging, the program seems to halt or fault at "Hwi_construct(&PinHwi, INT_EDGE_DETECT, PIN_Isr,&hwiParams, NULL);" after GPIO setup
  • I think you are running PIN_init twice. You need to manually merge the PIN config to a single configuration.
  • Taking out the second PIN_init(BoardGpioInitTable); call from the SCS task I am able to run until the BIOS_start(); call from the main.c where the debugger is unable to run through BIOS_start();

    How would I determine the differences between the analog_light_sensor_tirtos 'BoardGpioInitTable' and the simpleBLEPeripheral 'BoardGpioInitTable'?