This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Preprocessing file errors



I have been working with a working InstaSpin project with TI and have been working on an extra .c file to the project to include more applications.  This file has been modeled after the driver file and uses similar structure including the _obj.h and .h files.   When I go to build this project I get a lot of problems that do not make sense that refer to the preprocessing file that gets made.  

The very first character in my added .c file shows a warning:

             #14-D extra text after expected end of preprocessing directive

This warning is a part of initial comments describing the file.  At the first function declaration of this file I get the warning:

             #12-D parsing restarts here after previous syntax error

This messes up a lot of my function calls all within the file including errors that do not make sense:

          #119 a void function may not return a value

          #131 expected a "{"

          #249 function  has already been defined

It seems that the preprocessing file is throwing off the compiler trying to interpret the .c file.  The errors that occur do not make sense when in other files that are set up almost identically have none and have previously been used successfully.  

Please help with guiding me in the right direction.

Thanks

  • If you can attach the C source file that is generating these errors we can take a look and see if we can identify the source of these errors. In order to be able to compile it and reproduce the errors, we would need a preprocessed version of the source file. Please see this page for how to generate one and then attach the .pp file here. Also be sure to include the compile options (you can see this in the CCS build console when the file is being compiled).