cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any documentation on how to compile and flash the STM32CubeG0 MCU Firmware Package examples in STM32CubeIDE?

LBode.1
Associate II

I haven't figured out how to get it to import an example in STM32CubeIDE and compile it. I tried to recreate the project based on one generated with STM32CubeMX, but had no luck.

I eventually tried SW4STM32 and at least got it to compile there, but then when it tries to flash it via openocd it errors out there, but that's a different issue.

7 REPLIES 7
KnarfB
Principal III

> I haven't figured out how to get it to import an example in STM32CubeIDE

File > Open Projects from file System...

will automatically convert.

> when it tries to flash it via openocd

Try to create a new debug configuration and use that.

LBode.1
Associate II

MacOSX Mojave

STM32CubeIDE 1.3.0

Empty new workspace.

File -> Open projects from filesystem...

Directory...

STM32Cube_FW_G0_V1.3.0/Projects/NUCLEO-G071RB/Examples/DAC/DAC_SignalsGeneration

It has two items in the table:

DAC_SignalsGeneration Eclipse Project

DAC_SignalsGeneration/SW4STM32/DAC_SignalsGeneration Convert 'System Workbench for STM32' project to STM32CubeIDE project

Both are checked. Click Finish.

Click Debug.

The selection cannot be launched, and there are no recent launches.

Double-click on something in the project explorer. Click on Debug again. Something momentarily pops up and disappears. Nothing seemed to have happened.

In the Project dropdown most things are greyed out, so I don't know where to create a new debug configuration.

Under the run menu, there's a Debug Configurations... item. Clicking on that gives a dialog. In the left there's STM32 Cortex-M C/C++ Application. Double-clicking that gives DAC_SignalsGeneration. Should I do anything else in this dialog?

Then if I close it and hit Debug again I get a dialog that pops up and says 'Launching DAC_SignalsGeneration has encountered a problem'. Clicking on details says:

An internal error occurred during: "Launching DAC_SignalsGeneration".

java.lang.NullPointerException

What am I doing wrong? Is there instructions on how to use STM32CubeIDE somewhere? A getting started guide perhaps?

Did you find a way how to build STM32Cube_FW_Fx project examples in Cube IDE?

No I'm just using the makefile (required some tweaks) and I'm coding in vim. Which is the ideal for me anyway.

I decided to learn Cube IDE a bit. Just found a reddit thread about similar problem and the answer was shocking - try to double click on .project file.

Well, I tried to exec "c:\Users\user\STM32Cube\Repository\STM32Cube_FW_F3_V1.11.1\Projects\STM32F303RE-Nucleo\Demonstrations\Adafruit_LCD_1_8_SD_Joystick\.project" (I play with Nucleo-F303RE) and Cube IDE started to blame on non existing JRE. After java installation project was successfully imported, built and downloaded.

From my experience, the best way to learn the examples is:

  1. Create a project by choosing from the template according to the equipment you have, e.g. NUCLEO-F303RE in my case.
  2. Copy relevant parts of the example code into your project
  3. Read relevant manuals and how-to.
  4. Configure your hardware by clicking .ioc file
  5. Compile and download.
  6. Repeat many-many times.

This is how I learned timers with interrupts, ADC with DMA, DAC, SPI for display and digital potentiometer, and finally integrated C++ code into C project.