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.

TMS320F280049: All compilers reject parameters load listing

Guru 56033 points
Part Number: TMS320F280049


Hello,

All of a sudden CCS compilers are not playing nice with global export reference to typedef struct format used to load many parameters via listing in labs.h (#DEFINE  MOTOR_VARS_INIT { } ) .

In this case later versions of motor SDK (FOC) have the same issue in file (is07_speed_control.c), once noticed as being intermittent at times now sold, can't escape the warning.

For-instance I've tried several work arounds such as enclosing initializer with brackets { } without (=). Yet no other syntax seems to help, so the parameters list (MOTOR_VARS_INIT) never loads into #pragma data area and the project is unusable as intended.

Any ideas what is going wrong in the statements below?

  • Do you add or remove any variables from the "MOTOR_Vars_t" struct object, or make any changes in MOTOR_VARS_INIT?

  • The compiler warning seems misleading does not suggest the struct is unbalanced with list. Perhaps It should be an error stopping project compile. I added to struct (accelerationStart_Hzps) but it compiled without warning and runs ok this AM, later has error. 

    Thanks Yanming :-)

    //
    // set the acceleration to the trajectory of speed
    //
    // TRAJ_setMaxDelta(trajHandle_spd,
    // (motorVars.accelerationMax_Hzps / USER_ISR_FREQ_Hz));

    //
    // set the acceleration to the trajectory of speed
    //

    if( fabsf(motorVars.speedRef_Hz) > SPEED_STARTUP_HZ)
    {
        TRAJ_setMaxDelta(trajHandle_spd,
        (motorVars.accelerationMax_Hzps / USER_ISR_FREQ_Hz));
    }
    else
    {
        TRAJ_setMaxDelta(trajHandle_spd,
        (motorVars.accelerationStart_Hzps / USER_ISR_FREQ_Hz));
    }

  • You can add/remove the variable in the "MOTOR_Vars_t" struct object, but you must make a change in MOTOR_VARS_INIT accordingly to match the struct.