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.

Project Builds but not Links (unresolved symbols remain)

Other Parts Discussed in Thread: CC2650

Hi,

I have a CC2650 with Debugger Devpack, and I use CCS Version 6.1.2.00015. I am trying to use the mpu9250 (built-in accelerometer), with some files from the SensorTag example source code, where the accelerometer is used. The project explorer looks like this:

If I don't use the functions in file sensor_mpu9250.c, the code is built and linked succesfully, and can be run. However, if I add a piece of code using functions in sensor_mpu9250.c, it builds but the link fails, even though the includes are right. This is the piece of code I added and make the link fail:

if (sensorMpu9250Init()){
      //SensorTagMov_reset();
      sensorMpu9250RegisterCallback(motionInterrupt);
}

And the error I am getting in the console:

I have read a lot of documentation, recommendations and posts about this error, and I have checked everything and I think it should be working... For example, bspI2cDeselect is a function defined in bsp_i2c.c and declared in bsp_i2c.h (which is included in sensor_mpu9250.c). Also I have checked the Include Options in the ARM compiler settings and I think is right (if it wasn't, it wouldn't build succesfully). Finaly, I have also checked the settings in "File Search Path" under the ARM Linker settings, and they are the same as in SensorTag example, where these functions are working well.

I don't know what else I can do, ¿Anyone could help me with this issue?

Thank you in advance! 

  • cdman said:
    bspI2cDeselect is a function defined in bsp_i2c.c

    Are you sure?  Here's is another way to check.  The utility armnm is another executable that is part of the ARM compiler installation.  It can show you which symbols are defined in an object file.  Execute it from the command line like this ...

    C:\project\directory>armnm ./Drivers/bsp_i2c.obj

    All the function symbols defined (not just referenced) in that object file are marked with T.  This utility (and others like it) is documented in the ARM assembly tools manual.  Please take a look and let us know.

    Thanks and regards,

    -George

  • Hi George, thanks for your fast reply!

    You were right, on running this tool towards bsp_i2c.obj I noticed there was nothing inside. After a further review of bsp_i2c.c, I found this line near the beginning:

    #ifdef TI_DRIVERS_I2C_INCLUDED

    This was undefined so the code below (where these functions are declared) was not being compiled. Looking around the documentation, I found that TI_DRIVERS_I2C_INCLUDED is a predefined symbol in SensorTag project. So, after defining it the project properties, it builds fine and I can continue with the application.

    Thanks again!