Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: Problem with enum and struct in the some files

$
0
0

The problem is very subtle.  I used the option --preproc_includes to diagnose it.  This option shows you how the include files nest each other.  I built Driver_eQEP.c with --preproc_includes and tweaked the resulting .pp file a bit to produce this ...

..\Driver_eQEP.h  ..\Config.h   C:/ti/controlSUITE/device_support/f28m35x/v201/F28M35x_common/include/DSP28x_Project.h    C:/ti/controlSUITE/device_support/f28m35x/v201/F28M35x_headers/include/F28M35x_Device.h     C:\ti\controlSUITE\device_support\f28m35x\v201\F28M35x_headers\include\F28M35x_Adc.h  // many controlSUITE lines snipped here        ..\defines.h   ..\Driver_eQEP.h   C:/ti_ccs55/ccsv5/tools/compiler/c2000_6.2.0/include/math.h    C:/ti_ccs55/ccsv5/tools/compiler/c2000_6.2.0/include/linkage.h   ..\main.h    ..\Config.h   ..\Filters.h    ..\Config.h   ..\Periph_Config_C28.h  // error comes from here!!!    ..\Config.h    ..\Driver_eQEP.h 

When the enumerated type eQEP_Index_Pin_State_Type is seen on line 18 of Periph_Config_C28.h, the #include Driver_eQEP.h from line 8 of Driver_eQEP.c of has not finished processing.  The compiler has yet to see the line which defines eQEP_Index_Pin_State_Type.  That happens after the processing of Periph_Config_C28.h is complete.

Thanks and regards,

-George


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>