cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Controllers: STM3210B-MCKIT: Error Example Designs don't link

orion
Associate II
Posted on January 07, 2010 at 10:57

Motor Controllers: STM3210B-MCKIT: Error Example Designs don't link

8 REPLIES 8
orion
Associate II
Posted on May 17, 2011 at 10:14

I think I solved the problem for the ACIM example.

Turns out that one of the grayed out options under projects/options/linker is to start at ''__iar_program_start''.

So, if I add the following line to stm32f10x_vector.c

#define __program_start __iar_program_start

The project compiles. I'll see if it runs/debugs tomorrow.

Still stuck with PMSM example though. Any help would be appreciated. Also any explanation as to how the project determines entry symbols would be comforting too.

Thanks,

O..

orion
Associate II
Posted on May 17, 2011 at 10:14

Hello,

I am unable to build the PMSM and ACIM examples included with the kit without making any modification.

That's not completely true. If I build them once, no errors are reported. If I build them a second time, (just by pushing the ''build'' button. No other modification) For the PMSM, I get the following messages

Error[Li005]: no definition for ''STO_Init'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\Obj\main.o]

Error[Li005]: no definition for ''STO_InitSpeedBuffer'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\

Obj\main.o]

Error[Li005]: no definition for ''STO_Get_Speed'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\Obj\

MC_State_Observer_Interface.o]

Error[Li005]: no definition for ''STO_Gains_Init'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\Obj\

MC_State_Observer_Interface.o]

Error[Li005]: no definition for ''__program_start'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\Obj\

stm32f10x_vector.o]

Error[Li005]: no definition for ''STO_Get_Electrical_Angle'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\

Debug\Obj\stm32f10x_it.o]

Error[Li005]: no definition for ''STO_Get_wIalfa_est'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\

Obj\stm32f10x_it.o]

Error[Li005]: no definition for ''STO_Get_wIbeta_est'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\

Obj\stm32f10x_it.o]

Error[Li005]: no definition for ''STO_Get_wBemf_alfa_est'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\

Debug\Obj\stm32f10x_it.o]

Error[Li005]: no definition for ''STO_Get_wBemf_beta_est'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\

Debug\Obj\stm32f10x_it.o]

Error[Li005]: no definition for ''STO_Calc_Rotor_Angle'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\

Debug\Obj\MC_State_Observer_Interface.o]

Error[Li005]: no definition for ''STO_IsSpeed_Reliable'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\

Debug\Obj\MC_State_Observer_Interface.o]

Error[Li005]: no definition for ''STO_Calc_Speed'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\Obj\

stm32f10x_Timebase.o]

Error[Li005]: no definition for ''STO_Gains_Update'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\Copy of stm32 foc firmware libraries v1.0\STM32_FOC_PMSM\EWARM\Debug\

Obj\MC_State_Observer_Interface.o]

Analyzing the code, shows that, aside from .h files, there is no definition of these functions. Indeed, if I search for files containing the words STO_Init, no .c file exist which defines these function. There is a MC_State_observer_lib.r79 which I'm unable to link in using the IAR tool. Is there something I'm doing wrong here?

For the ACIM example, again it builds fine the first time, but on the second build I get the following error.

Building configuration: STM32_FOC_ACIM - Release

Updating build tree...

Linking

Error[Li005]: no definition for ''__program_start'' [referenced from C:\Program Files\STMicroelectronics\STM32MC-KIT\

Copy of stm32 foc firmware libraries v1.0\STM32_FOC_ACIM\EWARM\Release\Obj\stm32f10x_vector.o]

Error while running Linker

Pleae help.

Thanks,

stello
Associate II
Posted on May 17, 2011 at 10:14

Hello Orion,

I believe the problems you're facing are related to the EWARM version you're using. The code your trying to compile is compatible with EWARM version 4.42 (still available for download at www.iar.com) and not with version 5.11 (latest from IAR).

I'd suggest you to check for the tool version by opening the IDE and clicking on ''About'' in the ''Help menu''.

I hope it will help you.

Regards,

Lino

stello
Associate II
Posted on May 17, 2011 at 10:14

Hello Orion,

I believe the problems you're facing are related to the EWARM version you're using. The code your trying to compile is compatible with EWARM version 4.42 (still available for download at www.iar.com) and not with version 5.11 (latest from IAR).

I'd suggest you to check for the tool version by opening the IDE and clicking on ''About'' in the ''Help menu''.

I hope it will help you.

Regards,

Lino

orion
Associate II
Posted on May 17, 2011 at 10:14

Yes, reverting to the previous version compiles links and debugs correctly.

Thanks,

O..

cumthk
Associate II
Posted on May 17, 2011 at 10:14

Dear all..

I can't find (UM0483: STM32F103xx AC induction motor IFOC software library V2.0) and (UM0492: STM32F103xx permanent-magnet synchronous motor FOC software library V2.0)in web site. Please help me find it. Or send them to me. Email:houkun@vista.aero. THANKS~~~

Best Regards

HouKun

redmonds
Associate II
Posted on May 17, 2011 at 10:14

I've hit the same problem with the PMSM project. I'm using Keil rather than ARM. I'm guessing that I'm missing a lib file. Unfortunately, the MC_State_observer_lib.r79 isn't compatible with Keil.

Where can I obtain the source code for MC_State_observer_lib or a Keil compatible version?

Thanks,

Richard

stello
Associate II
Posted on May 17, 2011 at 10:14

Hello RichardE,

the STM32 FOC FW library does support Keil as well (validated with KEIL RVMDK v. 3.22).

For your convenience I'm attaching the .lib files.

Regards,

Billino