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.

问一个ccs5的编译问题



在一个从ccs3.3移植到ccs5.2的工程中,出现了以下的编译错误:

Description Resource Path Location Type

#93 identifier-list parameters may only be used in a function definition main.c /motor/src line 53 C/C++ Problem

相关的语句是这样子的:

MICROSTEP motor1 = MICROSTEP_DEFAULTS;

MICROSTEP是一个结果体:

typedef struct {

             REFERENCE  Ref;

              FEEDBACK  Fdb;        

                   LPF  Lpf_Ipeak;

                   LPF  Lpf_Ia;

                   LPF  Lpf_Ib;        

              VREFENCE  Vref;

                  PARK  Park_Idq;

                 IPARK  Ipark_Vdq;

                   PID  PI_Pos;

                   PID  PI_Spd;

                   PID  PI_Id;

                   PID  PI_Iq;

                   PID  PI_Ipeak;

PID  PI_Ia;

PID  PI_Ib;

       RAMP  Ramp;

                   ZOH  Zoh_Ang;

 Phase_Current  Current;

            } MICROSTEP;

MICROSTEP_DEFAULTS是一个宏定义:

#define MICROSTEP_DEFAULTS  { { 0,0,0,0,0,0,0,0,0 }, { 0,0,0,0 }, \

                             { 0,0,_IQ(0.5) }, { 0,0,_IQ(0.5) },{ 0,0,_IQ(0.5) },{ 0,0 }, \

                             PARK_DEFAULTS,  \

                             IPARK_DEFAULTS,  \

                             PID_DEFAULTS,  \

                             PID_DEFAULTS,  \

                             PID_DEFAULTS,  \

                             PID_DEFAULTS,  \

                             PID_DEFAULTS,  \

 PID_DEFAULTS,  \

 PID_DEFAULTS,  \

 RAMP_DEFAULTS,  \

 ZOH_DEFAULTS,  \

 { 0,0 } \

 }