Tool/software: Code Composer Studio
I am using TM4C for the first time. I am trying to obtain data from ADXL335 accelerometer through the GPIO pins.
Here is my code:
#include <stdio.h>
int main(void) {
int32_t i32val;
GPIOPinTypeGPIOInput(GPIO_PORTB_BASE,GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_5);
GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE,GPIO_PIN_4);
while(1)
{
GPIOPinWrite(GPIO_PORTE_BASE,GPIO_PIN_4,0);
i32val = GPIOPinRead(GPIO_PORTB_BASE,GPIO_PIN_1);
printf('%d',i32val);
}
}
But I am getting the errors when I try to build the code:Compilation failure
subdir_rules.mk:7: recipe for target 'main.obj' failed
"../main.c", line 5: error #20: identifier "int32_t" is undefined
"../main.c", line 6: warning #225-D: function "GPIOPinTypeGPIOInput" declared implicitly
"../main.c", line 6: error #20: identifier "GPIO_PORTB_BASE" is undefined
"../main.c", line 6: error #20: identifier "GPIO_PIN_0" is undefined
"../main.c", line 6: error #20: identifier "GPIO_PIN_1" is undefined
"../main.c", line 6: error #20: identifier "GPIO_PIN_5" is undefined
"../main.c", line 7: warning #225-D: function "GPIOPinTypeGPIOOutput" declared implicitly
"../main.c", line 7: error #20: identifier "GPIO_PORTE_BASE" is undefined
"../main.c", line 7: error #20: identifier "GPIO_PIN_4" is undefined
"../main.c", line 10: warning #225-D: function "GPIOPinWrite" declared implicitly
"../main.c", line 11: warning #225-D: function "GPIOPinRead" declared implicitly
"../main.c", line 12: warning #1696-D: multicharacter character literal (potential portability problem)
"../main.c", line 12: warning #169-D: argument of type "int" is incompatible with parameter of type "const char *"
"../main.c", line 12: warning #154-D: conversion of nonzero integer to pointer
7 errors detected in the compilation of "../main.c".
gmake: *** [main.obj] Error 1
gmake: Target 'all' not remade because of errors.
There is no "driverlib" folder in the location where I installed CCS
Is there any fault in installing the CCS?
Please suggest correction in my code, if any required
