DSC - generated BLDC support file error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DSC - generated BLDC support file error

957 Views
Ben
Senior Contributor I

While adding the MC_BLDCHallSensor from the component library I got a C error message:

illegal use of 'inline'    MC1.h     -    C/C++ Problem

The error ref. to generated file:

*
** ===================================================================
**     Method      :  MC1_bldchsCommHandlerComp (component MC_BldcHallSensor)
**     Description :
**         This function returns pointer on structure from the
**         commutation table. The table index is given by HallSensors
**         value. The table values represent which transistor is under
**         PWM control (enabled/disabled, swap/no swap).
**     Parameters  :
**         NAME            - DESCRIPTION
**         HallSensors     - State of Hall Sensors.
**       * pCommutationTable - Pointer to
**                           Commutation Table.
**     Returns     :
**         ---             - State of transistors (enabled/disabled,
**                           swap/no swap).
** ===================================================================
*/
#define bldchsCommHandlerComp(HallSensors, pCommutationTable) MC1_bldchsCommHandlerComp(HallSensors, pCommutationTable)
inline pwm_sChannelControl MC1_bldchsCommHandlerComp(UWord16 HallSensors,const pwm_sChannelControl *pCommutationTable)
{
  return(pCommutationTable[HallSensors]);
}
/* END MC1. */

What is the meaning of this error and how can I fix it?

Please advise

Benny

0 Kudos
9 Replies

728 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ben,

I just compiled the project TWR56F8257_bldc_hall project with CodeWarrior for DSP56800E ver8.3, no problem.

I attach the screenshot here.

I also attach the project in the forum, pls download it.

Hope it can help you

BR

XiangJun Rong

pastedImage_1.png

pastedImage_2.png

0 Kudos

728 Views
Ben
Senior Contributor I

Thanks Rong,

I believe that it passed good as you are using CW8. I did not use this old version for several years.

Actually, I imported the project to CW11, and maybe it caused all the errors.

Do you have any tip for a smooth importing to ver. 11?

0 Kudos

728 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ben,

I have checked the application note link, I have not found any porting guide from CW for DSP56800E to CW for mcu tools.

I suggest you use old CW for DSP56800E ver8.3 to develop project for MC56F82xx.

BR

XiangJun Rong

0 Kudos

728 Views
Ben
Senior Contributor I

Thanks, you know, the old 8.3 and the 11 versions can't work together on the same machine, because of the debugger drivers.

and... to arrange another computer for the 8.3, after I spoiled myself with good keyboard and 3 high quality screens around me :-)

Anyhow, I have 2 other active projects developed on the eclipse (11) with the 56F8257 and everything is working good, however I built them as bareboard projects without using a demo project. BLDC motor not included in these projects.

In the new project I tried to make a shortcut...

Thank you for your support. I checked if I can use parts of the demo source in my project, but it is written with many scripts and jumps around several files, not easy to do this surgical job. (and I am not sure that freescale EULA allow me to do it).

BR

Ben

0 Kudos

728 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ben,

From the api function protype, it seems that both the example code and library are very old and obsolete, can you tell me the part number, CodeWarrior tools version you are using? BTW, can you post your code here so that we can have a review?

BR

Xiangjun Rong

0 Kudos

728 Views
Ben
Senior Contributor I

Hello Xiangjun,

Thank you for the response. Sorry that I was not clear enough, but this MCI file is NOT from an example project, but from the generated files by PE.

I am using 56F8257 chip with CW 11, so you can create it in a new project by selecting the MC_BldcHallSensor from the component library.

BR

Benny

0 Kudos

728 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ben,

This is the BLDC motor control code based on hall sensor for MC56F8257, pls refer to it.

Hope it can help you

BR

XiangJun Rong

0 Kudos

728 Views
Ben
Senior Contributor I

If you are talking about the TWR56F8257_bldc_hall.zip file, I gave-up using it as it caused too many errors.

Most of them are errors with nexplanation and I did not succeed to handle them, so I re-started from a new bareboard project.

BR

Ben

1 of 1 people found this helpful

0 Kudos

728 Views
Ben
Senior Contributor I

Hi

Do you mean a sample code? Where is it? Please send me a link

BR

Ben

0 Kudos