The only steps needed are the following:
- Install TivaWare inside the “ti” folder.
- Go to View>Resource Explorer and import driverlib, grlib, sensorlib and usblib.
- Build the 3 projects.
Now, when creating a new project define the following symbols (Properties>Build>ARM Compiler>Advanced Options>Predefined Symbols):
The second symbol allows for calling ROM functions instead of normal functions when “rom.h” is included. Eg. ROM_GPIOPinWrite() instead of GPIOPinWrite()
Next is to tell the compiler where to find the header files. To do so, go to the project properties and navigate to: Build>ARM Compiler>Include options. Once there, click the top green “+” sign (right below the “Manage Configurations…” button) and then , in the new window, click “Browse…” and add the path to TivaWare install folder (tipicaly: C:\ti\TivaWare_C_Series-x.x.x.xxxxx).
Finally, we just need to tell the linker where to find the compiled TivaWare libraries: driverlib.lib, usblib.lib, sensor.lib and grlib.lib.
I’m going to exemplify adding the driverlib.lib in debug configuration only. To add the other libraries just follow the same steps.
To add the driverlib.lib go to the project properties and navigate to Build>ARM Linker>File Search Path, then click top green “+” sign (right below the “Manage Configurations…” button), click “Workspace” and finally navigate to “driverlib>Debug>driverlib.lib” and click “Ok”.
That’s it, now you can use the TivaWare library in your code!
PS: This is only for when building in debug mode. For building the release mode, just follow the steps after point number 3 but build the libraries in release mode, and on the last step, go to the Release folder instead of the Debug folder and you are good to go.