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.

Interface mpu-6050 with the TM4c123

What are the files to be included from the sensorlib and driverlib ? Pls don't point me to the example. It simply includes the entire sensorlib and driverlib.

The documentation mentions no dependencies in the programming examples. I'm constantly running into compile errors and I can't fix the issue.

One such error (out of 60) is 

i2cm_drv.h(458): error:  #20: identifier "inline" is undefined

  • Hi Grimreapervx ,

    If you don't use TivaWare API and write your own code from scratch , you don't need to include any library and drivers from TivaWare. If you want to use TivaWare driver library, please include the driverlib which is located in "${SW_ROOT}/driverlib/ccs/Debug/driverlib.lib". You need I2C or SPI drivers to interface MPU6050, you need to include the header files for I2C, SPI, and sysctl.

    Regards,
    QJ
  • Hi QJ,

    Thanks for your reply.

    1. When you say include driverlib, should I just add driverlib.lib to the workspace or should I add all the header files (*.h) in the driverlib folder into my workspace?

    I tried adding the driverlib folder( with the *.h files) to my workspace and also added driverlib.lib, but the problem still persists ( same compile error as posted). I still get those inline errors.

    2. By the header files for I2C,SPI,sysctl, what exactly are you referring? Aren't all the drivers already mentioned in the driverlib? Anyways, I added hw_mpu6050.h,i2cm_drv.h and mpu60050.h from the sensorlib folder. Is this all? I would really appreciate if you could be a little more specific.

  • Ok, the compiler is complaining about the presence of the keyword inline.

    That suggests that either the compiler doesn't support it or the support has been turned off. Since inline is relatively new the former is certainly possible and the latter is also quite possible, particularly if the compiler options have been set to support an earlier version of the standard.

    In either case the libraries should support the absence of inline through some sort of configuration option.

    If the compiler doesn't support inline then that suggests the configuration options for the library are not set properly. If the compiler support for inline has been turned off then you can either re-enable the option or adjust the library options to recognize that there is no inline support.

    Robert