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.

Strange errors in build of TMDS2MTRPFCKIT-2xPM_Sensorless project

Other Parts Discussed in Thread: CONTROLSUITE

I believe I asked this several months ago but got no reply.  However I may have queried the incorrect forum. 

the error occurs on a comment line, line 15 within file 2xPM_Sensorless.c.  It states multiple markers at this line, and provides details on two errors:  expected an identifier, expected a ;  If I remove all the comments, then the errors occurs at the new line 15.

the following is the commands sent to the compiler

-v28 -ml -mt --cla_support=cla0 -O3 -ms -g --diag_warning=225 -z --stack_size=0x380 -m"TMDS2MTRPFCKIT-2xPM_Sensorless.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.4/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.4/include" --reread_libs --rom_model

I have similar errors in several other files.  Obviously the comment lines are not in error.  There has to be some underlying cause like an incorrect compiler level, or something similar.  Anyone got any ideas?  CCS level v 5.3

Thanks.

  • Add the compiler option --verbose_diagnostics then build again.  This causes the compiler to echo the problem source line with a caret ^ marking the key point in the line.  That usually illuminates the problem.  Look in the Console view to see these diagnostics, and not in the Edit or Problem view.

    Thanks and regards,

    -George

  • Thanks George.

    I added verbose and here is what I get from the console on the first comment line.  The caret was placed under the first double quote of extern "C" 

    "C:/ti/controlSUITE/development_kits/~SupportFiles/F2803x_headers/PeripheralHeaderIncludes.h", line 15: error:

              expected an identifier

      extern "C" {

    line 14: //

    line 15: //

    line 16:  /***************************

    BTW - I checked for hidden characters.

     Hold the Fort!  I think I see the issue.  I have been depending on simply double clicking in the console error to take me to the offending line and file.  Looks like it's not doing that, but taking me to a same line number in a different non offending file and further marking that line with the error.  I'll research further and get back.

    Yes - That is what it is doing.  It looks like a CCS Compiler/editor bug.

     I was hoping to hear form someone.  Doesn't have to be a TI employee, just anyone else who may have encountered the same issue.  A recap.  While CCS points to the line in one file as in error, the actual error is occurring in a different file.  That's confusing but I can live with it.  In my specific situation, the actual error is occurring in PeriphealHeaderIncludes.h   The line below with   extern "C" {       generates a syntax error.

    #ifndef__cplusplus

    extern "C" {

    #endif

     I think I found the problem.  The sample code seems to be in error.  It should have been #ifdef not  #ifndef.  extern "C" is only valid it seems in C++.  In any case I changed the code to #ifdef and the error disappeared.  Also I looked at the end statement to generate the closing brace.  they had that coded correctly.  Guess I should have seen that sooner.  Hope this is helpful to someone else.