TivaWare Library:
TivaWare Peripheral Driver Library is an extensive C library for accessing the peripherals on Tiva C launchpad microcontrolller. This library makes it easy to use the device peripherals without knowing a lot about the internal registers. So, it is helpful as you don't need to look at the datasheet and bit banging for programming a simple application like blinking an led.
TivaWare Library can be downloaded from here: http://www.ti.com/tool/sw-tm4c
Complete TivaWare Library includes:
- Royalty free libraries(Peripheral, USB, Graphics , Sensor)
- Kit and peripheral specific code
- Release note and other documentation
Code Composer Studio is and Integrated development environment that supports Texas Instruments Microcontrolllers and Processors. CCS could e downloaded freely from here: http://www.ti.com/tool/ccstudio
How to build and debug a new project in CCS with TivaWare C library:
- Open Code Composer Studio.
- Click on the New -> CCS Project.
- Give a Project Name, Select Family -> ARM, Variant -> Tiva TM4C123GH6PM, Connection -> Stellaris ICDI then click on Finish.
Now for Adding the TivaWare Library in your newly created project
- Right Click on your Project and then goto Properties. A properties window will open like the shown below
- Then goto Build -> ARM Compiler -> Include Options in the list Add dir to #include search path click on Add.
- A Add directory path dialog box will open. Click on File System , Browse to TivaWare installed location (by default it go to C:\ti\TivaWare_C_Series_version_no.) Click on Ok and then again OK.
- Now go to ARM Linker option, then File Search Path. Click on Add -> File System and then search for driverlib.lib in your installedLibraryPath\driverlib\ccs\debug\driverlib.lib , then Click on OK.
- If you don't do this linker step the you will get a linking error.
Compiling and Debugging the Code:
- In this tutorial i will be compiling a simple blinking code given below. For Compiling and Debugging your Code. Right Click on Project then Click on Build Project.
- After compiling and building has been finished . Click on Run -> Debug to start debugging of your program. Tiva C lets you debug your code while running it on real hardware so that you can know whats going on inside.
No comments:
Post a Comment