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.

undeclared functions in ControlSuite

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

I'm trying to start a project with CCS 5.5. I downloaded ControlSuite and figured out where the headers and libraries for my chip are. For reference, they were under ....\controlSUITE\device_support\f2802x\v210 (for the latest version).

I copied that folder over to my project and added its root to the include paths of the compiler. Building the project, CCS started building the sources inside the folder. During this build, I got many warnings that some of the functions used inside the sources are actually never defined. These functions are:

  • I2C_enableSlave
  • I2C_isHandleValid
  • PIE_setDebugIntVector
  • SCI_read
  • SCI_write
  • setDBGIER

The symbols besides the I2C ones are used only in the examples, so I don't care about them. But the I2C ones are functions used in i2c.c itself. I2C_isHandleValid is used in almost all functions (although in an assert) and it's not defined anywhere.

Should I be worried about this? Is that a bug in the library that needs to be fixed? Or should I just skip building the library and link to the already built one and hope all is well?

  • Hi Shahbaz,

    symbol not found errors like these are normally when the path to a library is missing.   Have a look at the wiki below.  Also, how did you work with control suite?   Have you tried an unmodified example?  

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    Best Regards,
    Lisa 

  • Hi Lisa,

    It's not a link error. The function is used but never declared, hence the warning saying it's implicitly declared.

    In the meantime, I configured the project to project to just use the library already built in control suite and the build succeeds. Hopefully, I wouldn't run into issues since probably the library was also built with that particular functions "declared implicitly".

    Shahbaz

  • Hi,

    Actually it turns out the i2c.c is not built into driverlib.lib. The header has all the functions (which apparently have an older prototype) commented out and the taking the declarations from the source (i2c.c) results in unresolved identifiers during link.

    Can you please verify then that i2c is not implemented in v210 of the library for F2802x? If so, do you suggest I switch to an older version of the library or should I manually implement i2c functions not relying on controlSuite?

    Shahbaz

  • Hi Shahabz,

    I suspect there is an 12C library you need but I am popping this over the the C2000/control suite team.

    Best Regards,

    Lisa 

  • Hi Shahbaz!

    Shahbaz Youssefi said:

    I'm trying to start a project with CCS 5.5. I downloaded ControlSuite and figured out where the headers and libraries for my chip are. For reference, they were under ....\controlSUITE\device_support\f2802x\v210 (for the latest version).

    I copied that folder over to my project and added its root to the include paths of the compiler. 

    1 You don't need to copy all 210 folder to you project. You need just to include the following paths to you project through "Include options":

    ti\controlSUITE\device_support\f2802x\v210\f2802x_common\include\

    ti\controlSUITE\device_support\f2802x\v210\f2802x_headers\include\

    Also add to you project the following source file:

    F2802x_GlobalVariableDefs.c from ti\controlSUITE\device_support\f2802x\v210\f2802x_headers\source\

    and for work with I2C: F2802x_I2C.c from ti\controlSUITE\device_support\f2802x\v210\f2802x_common\source\.

    2 "I2C" is not mentioned in  F2802x-DRL-UG-210 (F2802x Peripheral Driver Library). 

    Regards,

    Igor

  • Hi Igor,

    1. Thanks, I realized that and that's what I did (although I hadn't added F2802x_GlobalVariableDefs.c). The F2802x_I2C.c file contains just an initialization function for the GPIOs and another init function that says `//tbd...` which I guess stands for To Be Done.

    2. So, does this mean it's not implemented in the library? Any particular reason?

    I have a related question too. Some examples (e.g. gpio_toggle) use the ACRONYM_function style of functions (e.g. CLK_setOscSrc) while others (e.g. i2c_eeprom) use other kinds of functions not included in driverlib.lib (e.g. InitSysCtrl). Which set of functions is preferred? Is it that the i2c_eeprom example is outdated for example? Would I be able to use I2CA_ReadData and other functions from that example or they are outdated and shouldn't be relied on?

    Regards,

    Shahbaz

  • Hi Shahbaz!

    Matter of preference is a complex issue. Anyway everyone does development as he finds comfortable. In my opinion, in each case of development (for different peripherals) the best way is to base on examples and use the sets of functions used in these examples.

    Regards,

    Igor

  • Hi Igor,

    Ok thanks. I needed this confirmation that the functions used in the I2C example are reliable and not outdated.

    Regards,

    Shahbaz

  • Ok, Shahbaz!

    I'm glad if my help was effective.

    Good luck,

    Igor