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: Confused about driverlib.lib usage

Other Parts Discussed in Thread: EK-TM4C1294XL

Tool/software: Code Composer Studio

 am trying for familiarise myself with Code Composer Studio V7.4.0 and the development board EK-TM4C1294XL.
I am following the labs on the link below:
software-dl.ti.com/.../CLP_Workbook.pdf
I tried lab02 ( I called it RabLab02 in my example). I though, I understood it but when I got to lab16 ( using LCD), I got confused.
I am using Tiva Ware C series ( EK_TM4C1294XL). My understanding is when starting new project,  a number of configuration has to be set such as telling the CCS where the Tiva C series is installed and adding the file driverlib.lib to the project among other things.
In Lab16 in the workshop, the project was imported to CCS. It is difficult to tell what setting have been set, however, I noticed that the file driverlib.lib doesn't appear in the project folder ( please see screenshot).
In RabLab02 ( or lab02) when I delete the file driverlib.lib, the project compiler with errors ( only compile successfully if this file is in the project).
Even the file driverlib.lib doesn't form part of the lab16 project, this one compile successfully.
My question where and when to use  driverlib.lib? Is it compulsory?
Many thanks in advance.
Rab
  • In general, driverlib.lib should be included. It can show up in project explorer like in your project "rablab02", or often it is included in the linker options. If you right click on the project name and then choose "Show Build Settings", you can see driverlib.lib included in the "File Search Path" or the ARM linker options.

  • Hi Bob,
    Thank you for the clarification. It does make sense.
    I am just wondering why we don't  just use "Add file" to add the library to the project and it is clearly seen on the project view.
    Also the path shown in the picture doesn't make sense to me as the real path is


    C:\ti\TivaWare_C_Series-2.1.4.178\driverlib\ccs\Debug.

  • I doubt that I can answer "why". There are two ways of including libraries. Listing them in the linker options allows defining an order in case the same function is defined in more than one library. The C runtime support library is also included in the linker options. When you import a project, you inherit their choice of how the libraries are included.

    The two paths equate to the same location. The expanded path in the linker options was built relative to the original project location.