cancel
Showing results for 
Search instead for 
Did you mean: 

Why STM32CubeMX failed to generate a project for STM32CubeIDE?

MShak
Associate II
 
29 REPLIES 29

​Hello @MShak​ 

You must follow the following steps:

  1. Open CubeMX then load you project
  2. Go to Project Manager and choose STM32CubeIDE as a Toolchain/IDE
  3. Open CubeIDE
  4. Go to CubeMX and Generate Code

Regards,

Nesrine

markof9f
Associate II

Hello @Nesrine.JLASSI

Is that a standard procedure or a temporary workaround?

I have experienced exactly the same behavior but unfortunately your solution didn't work.

As I can see, problem is in missing .project and .cproject files. For some reason, when STM32CubeIDE is selected as a toolchain, STM32CubeMX generates only .mxproject file and fails to generate .project and .cproject. I followed your suggestion and generated code while STM32CubeIDE was open, but that didn't change anything; project files were still missing.

Also, after file generation, I clicked on 'Open Project' button and received the following message:

'Please install STM32CubeIDE toolchain to open the project.

Or associate the file type of the project with your Toolchain in System Default Program settings.'

STM32CubeIDE is already installed, and file type of the project (.project) is already associated with STM32CubeIDE toolchain, so that's not the problem. The problem is in missing .project and .cproject files.

Is there anything we can do to make STM32CubeMX properly generate project files for STM32CubeIDE?

Best,

Marko

​Hi @MShak​ 

Try to check if Project Presentation is checked as Hierarchical.

0690X000009k6OgQAI.png

Regards,

Nesrine

Hello @Nesrine.JLASSI​ (ST Employee),

Many thanks for providing instructions but STM32CubeMX has failed to generate project for ST32CubeIDE.

The following error message is displayed on the screen.

Toolchain Settings: Please install STM32Cube IDE toolchain to open the project.

Or associate the file type of the project with your Toolchain in System Default Program Settings.

I tried to create new STM32Cube project in ST32CubeIDE which also has failed and the following error message is displayed.

Create minimal project failure: cannot read template source.

Regards,

Shakeel

​ 

markof9f
Associate II

Hello @Nesrine.JLASSI​ and @MShak​ 

Thank you very much for all your help. I was following your instructions but I was unable to properly generate STM32CubeIDE project from standalone STM32CubeMX. Whatever I tried, standalone STM32CubeMX didn't generate .project and .cproject files. It is worth noting that STM32CubeMX integrated in STM32CubeIDE does generate .project and .cproject.

I tried to keep STM32CubeIDE open while generating code from STM32CubeMX, but that didn't help. I also tried to change Application Structure in STM32CubeMX Project Manager from Basic to Advanced, and to change Projects Presentation in STM32CubeIDE from Flat to Hierarchical, but that also didn't work. Whatever I do, I never get .project and .cproject files, and I always get the same message as @MShak​ :

Toolchain Settings: Please install STM32Cube IDE toolchain to open the project.

Or associate the file type of the project with your Toolchain in System Default Program Settings.

@nesrine.jlassi can you please confirm that on your system with your configuration you get .project and .cproject files when you generate code with standalone STM32CubeMX and Toolchain / IDE is set to STM32CubeIDE?

Thanks in advance!

Best,

Marko

Hello @markof9f​ 

Yes, on my system with my configuration, i get .project and .cproject files when i generate code with standalone STM32CubeMX and Toolchain / IDE is set to STM32CubeIDE.

0690X00000ApWmEQAV.png

Regards,

Nesrine

markof9f
Associate II

Hello @Nesrine.JLASSI​ ,

Thank you for your help!

Yes, it obviously works on your system, but this is what standalone STM32CubeMX generates for me:

0690X00000Aph0kQAB.png

I am using standalone STM32CubeMX v5.3.0, which version do you use?

Below is the procedure that I am doing on my computer. I tried to use the simplest possible configuration just to make it easy to reproduce

  1. Access to Board Selector: NUCLEO-F303K8
  2. Initialize all peripherals with their default Mode?: Yes
  3. Project Manager:
    1. Project Name: Test01
    2. Project Location: C:\STM32Test
    3. Toolchain / IDE: STM32CubeIDE
    4. MCU Reference: STM32F303K8Tx
    5. Firmware Package Name and Version: STM32Cube FW_F3 V1.10.0
  4. Generate Code

I performed this same procedure with three different boards, and I never got project files (.project and .cproject) generated

  1. NUCLEO-F303K8
  2. NUCLEO-F303RE
  3. STM32072B-EVAL

I also tried to go through Access to MCU selector, to select STM32F103C8, select STM32CubeIDE in Project Manger and to click Generate Code, but the result was the same, no project files.

Can you please try to reproduce this same sequence on your system?

Do you have any advice for me, am I doing something wrong?

Thanks in advance!

-Marko

DMatt.2
Associate II

I was having this same problem, generating code from the Motor Control Workbench for the STM32CubeIDE. I read in the SDK User Manual (UM2392), page 4, "Note: STM32CubeMX must be run at least once before the MC SDK can be installed". So I uninstalled MX, IDE, Workbench and then re-installed the MX and IDE; ran MX once before re-installing the Workbench. Now when I generate code for the STM32CubeIDE, I get the appropriate project files created, (.cproject, .project, .mxproject), and the project imports into STM32CubeIDE (Eclipse).

I've still not been able to complete a build as there were errors. I had to manually delete the IAR & Keil folders from Drivers/CMSIS/Device/ST/STM32F3xx/Source/Templates to avoid having the GNU compiler attempt to process those other assembly files; I had to manually add an included file for RTC handle definitions in 3 locations (stm32f3xx_hal_rtc.h) ; The remaining 7 errors are due to (check __FPU_PRESENT) all in the CMSIS include file: arm_math.h ; all included from the DSP_Lib files (arm_bitreversal.c, arm_cfft_f32.c, arm_cfft_q15.c). I'm not using any of these files, so maybe i"ll just delete them.

Seems like the code generation process doesn't discremeninate and brings in EVERYTHING.

So at least I can build now, but the import isn't working for me 100% yet.

markof9f
Associate II

Hello @DMatt.2​ ,

Thanks for sharing your solution. ST just released STM32CubeMX v5.4 and it looks like they have fixed the problem.

With new CubeMX, I was able to create a proper STM32CubeIDE project that containes both .project and .cproject files.

-Marko