I am trying to change and read my TM4C123G launchpad clock frequency to 80 MHZ using TIVAWARE libraries so here is my code:

#include <lm4f120h5qr.h>
#include <stdbool.h>
#include <stdint.h>
#include "driverlib/sysctl.c"
#include "driverlib/pin_map.h"

void main()
int x= SysCtlClockGet();
while(1){  }

I am facing two problems the first problem there is an error while compiling this code the error is:

Error[Li005]: no definition for "SysCtlDelay" [referenced from C:\Users\ZMK\Documents\TIVA C\IAR\TM4C FREQUENCY\Debug\Obj\main.o]

where SysCtlDelay() is a function and its definition is in the driverlib/sysctl.c included in the top. so I don't know why this is happening!!

the second problem is while debugging the code the local variable X doesn't show a value it only shows an unknown value, I tried to make it volatile but nothing changed too!!

thanks in advance.

  • 1
    \$\begingroup\$ I can't help you with the first issue. I suggest you to visit TI TIVA forum directly link, it's very responsive. Regarding your second problem: just define your variable outside of main(), i.e make it global. \$\endgroup\$ Jan 7, 2016 at 9:22

1 Answer 1


for solving first problem, You should:
1. add library files (library.a for IAR) to your project. In Project window -> add group(or files) -> driverlib.a in Driverlib/ewarm folder. (Sorry, I'm using Keil or Eclipse but sure these acts looks same in different IDE)
2. in main.c include driverlib/sysctl.h instead of sysctl.c
Don't understand second issue, can you add your code?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.