I managed to get a clean compile of both the C28 project and M3 project, but at the expense of changing a few lines of code in 2xPM_Sensorless-Settings.h which in reptrospect (since the program does seem to run) may have been a mistake.
// Define the system frequency (MHz) #if (DSP2803x_DEVICE_H==1) #define SYSTEM_FREQUENCY 60 #elif (DSP280x_DEVICE_H==1) #define SYSTEM_FREQUENCY 100 #elif (F28M35x_DEVICE_H == 1) #define SYSTEM_FREQUENCY 75 #endif
In the original [precompiler] code above, the line: #elif (F28M35x_DEVICE_H == 1) produces a syntax error. After examining the code in the
F28M35x_Device.h file wherein F28M35x_DEVICE_H is defined (see following excerpt)
#ifndef F28M35x_DEVICE_H #define F28M35x_DEVICE_H 1 #ifdef __cplusplus extern "C" { #endif #define TARGET 1 //--------------------------------------------------------------------------- // User To Select Target Device: #define DSP28_F28M35Ex 0 #define DSP28_F28M35Mx 0 #define DSP28_F28M35Hx TARGET
, it appeared it would be more correct to compare DSP28_F28M35Hx to 1 since TARGET is set to 1.
Am I correct assuming the is a mistake in the original code or is there some other problem afoot here?
Any insight would be greatly appreciated.