AnsweredAssumed Answered

undefined reference to `MCboot'

Question asked by boudens.julien on Sep 12, 2012
Latest reply on Sep 19, 2012 by Gigi
Hi,

I work on atollic with stm32 foc sdk 3.2 for motor control.
When I compil my project, I have always the same errors :

..\srcmain.c:40: undefined reference to `MCboot'
..\src/main.c:41: undefined reference to `MCI_ExecSpeedRamp'
..\src/main.c:42: undefined reference to `MCI_StartMotor'
..\src/main.c:44: undefined reference to `MCI_StopMotor'



 but no problem with CMCI oMCI[MC_NUM], CMCT oMCT[MC_NUM];

I have linked all files .h with the main file.

Could you help me?

Thank you

my code :


#define PROJECT_CHK
#include "CrossCheck.h"
#undef PROJECT_CHK

#if defined(PFC_ENABLED)
  #include "PIRegulatorClass.h"
#endif

#include "MCTuningClass.h"
#include "MCInterfaceClass.h"

#if defined(PFC_ENABLED)
  #include "PFCInit.h"
  #include "PFCApplication.h"
#endif

#include "MCTasks.h"
#include "Parameters conversion.h"
#ifdef DUALDRIVE
#include "Parameters conversion motor 2.h"
#endif
#include "Timebase.h"
#include "UITask.h"
#include "MCLibraryISRPriorityConf.h"

#include <stdio.h>

#include "stm32_eval.h"

CMCI oMCI[MC_NUM];
CMCT oMCT[MC_NUM];

int main(void)
{


int i;

     MCboot(oMCI,oMCT);
     MCI_ExecSpeedRamp(oMCI[1],100,1000);
     MCI_StartMotor(oMCI[1]);
    for(i=0;i<=500000;i++);
     MCI_StopMotor(oMCI[1]);
}

Outcomes