Other Parts Discussed in Thread: CONTROLSUITE
Hi Guys,
CCS v 6.1.3.0034 (compiler version = TI v15.12.1.LTS)
control Suite v 3.4.0
I want a separate header and source file where I will write all the variables and functions for my project. The main.c file has only the initializations of Sigma delta and ePWM. I started by creating new files: myExample.h and myExample.c. And in myExample.c I included the following lines :
#include "myExample.h"
#include "F28x_Project.h" // Device Headerfile and Examples Include File
GPIO_SetupPinMux(31, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(31, GPIO_OUTPUT, GPIO_PUSHPULL);
I included the "F28x_Project.h" because it has all the headers. Now I get the following errors:
>> Compilation failure
subdir_rules.mk:84: recipe for target 'myExample.obj' failed
"../myExample.c", line 11: error #80: expected a type specifier
"../myExample.c", line 11: error #80: expected a type specifier
"../myExample.c", line 11: error #80: expected a type specifier
"../myExample.c", line 11: warning #78-D: this declaration has no storage class or type specifier
"../myExample.c", line 11: error #148: declaration is incompatible with "void GPIO_SetupPinMux(Uint16, Uint16, Uint16)" (declared at line 222 of "D:\Software\controlSUITE340\controlSUITE\device_support\F2807x\v200\F2807x_common\include\F2807x_GlobalPrototypes.h")
"../myExample.c", line 12: error #80: expected a type specifier
"../myExample.c", line 12: error #80: expected a type specifier
"../myExample.c", line 12: error #80: expected a type specifier
"../myExample.c", line 12: warning #78-D: this declaration has no storage class or type specifier
"../myExample.c", line 12: error #148: declaration is incompatible with "void GPIO_SetupPinOptions(Uint16, Uint16, Uint16)" (declared at line 223 of "D:\Software\controlSUITE340\controlSUITE\device_support\F2807x\v200\F2807x_common\include\F2807x_GlobalPrototypes.h")
8 errors detected in the compilation of "../myExample.c".
gmake: *** [myExample.obj] Error 1
gmake: Target 'all' not remade because of errors.
Please tell me what am I doing wrong here?
Thank You.