cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Control Board Customization

Carador
Associate

Hi every one

I have defined a custom motor and inverter successfully.

Now I need to define custom features like a simple Digital output(LED for instance).

Is there any way?

or should I cut working on stmcubemx and continue coding after code generated by workbench.

 

in other words:

Is there any way to modify workbench generated .ioc file and again generate project file after editing it?

(for example after adding a digital output?)

Thanks a lot

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello Carador,

After the .ioc generation via WorkBench, you are allowed to configure again your project using CubeMX to fit your application, and re-generate again without tampering with the motor control code. Obviously, this only works if you don't modify the Motor Control related configuration done by the Workbench.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

View solution in original post

8 REPLIES 8
Gael A
ST Employee

Hello Carador,

After the .ioc generation via WorkBench, you are allowed to configure again your project using CubeMX to fit your application, and re-generate again without tampering with the motor control code. Obviously, this only works if you don't modify the Motor Control related configuration done by the Workbench.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hi Dear Gael A

Thanks to your great response.

There is a little problem here: 

I generate and compile V/F example without any problem.

Then I open Stm32Cubemx and with no modification again generate the code using it.

This time after compilation I face with this error: 

fatal_error: arm_math.h No such file or directory

 

I know I may be able to dig the code and overcome this error but I think there is a bug in version 6.3.2 or I am making a mistake that is not clear to me.

would you please help me?

Thanks

Hello Carador,

As you are using an example, the handling is a bit different. Let me ask a few questions :

First, what version of CubeMx are you using for code generation ?
Did you save the project in a different folder with CubeMx before re-generating ?

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hi again

I use version 1.17.0 of CubeMx and generated the code using latest version of firmware.

Yes, I saved example using save as and save it in another location with new project name.

No, I did not save it in another folder before regenerating it.

yours.

Carador

Hello again,

I think you are mixing up CubeMx and CubeIDE. Even though CubeMx has an integrated GUI inside CubeIDE, it is a different software that is responsible for code generation. Its latest version is 6.13. On the other hand, CubeIDE manages code display and debugging, and its latest version is 1.17.

I would like to know which CubeMx version you used for generation. You can see it just before generation via Workbench.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Sorry

Yes, I mixed up versions.

here is the correct ones:

STM32CubeIde Ver 1.17.0

STM32CubeMX Ver 6.13.0

with best wishes,

Carador

Dear Gael A

I compared 2 folder:

in Folder B the generated code using .ioc and STM32CubeMX,

one line is missing in .cproject

this is :

<listOptionValue builtIn="false" value="../../Drivers/CMSIS/DSP/Include"/>

it is in this section: 

<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1663155527" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" valueType="includePath">

 

When I added this line, problem solved.

I wish your team will ad this line in future releases or any solution, so we can generate code using STM32CubeMX without this modification.

After that I would like to open a more challenging discuss.

Thanking you in anticipation.

Dear Gael A

Thanks you a lot, Now I have no problem and feel free to edit just a line in .project, it is easy.

Thank you so much.

With best wishes,

Carador