cancel
Showing results for 
Search instead for 
Did you mean: 

Upload example code to STM32F407

pcb
Associate II

Using CubeMX, selecting "Start My project from Example" I find 33 examples if I filter for the "STM32F407G-DISC1" Board. I would like to have a deeper understanding of the one named "Demonstrations" I select it and "Start my project in External IDE" and then "Open with Explorer", since VSCode is not an option.

Now how do I go from there to upload the code onto my board?

I have two questions:

  1. I find no IOC-file, I would like to open the project in CubeMX to see how the microcontroller pinout is configured.
  2. I find no makefile nor CMakeList.txt, how do I build the project which I need to do in order to upload it?
Joachim Spange
Head in the embedded
3 REPLIES 3
STTwo-32
ST Employee

Hello @pcb 

  1. The examples developed for this board are not based on the STM32CubeMX. So, there is no .ioc file on them and you can't open them using the CubeMX.
  2. After generating the project and compile it using an IDE (CubeIDE for example) Then, you will find a makerfile generated on the Debug file of the project: 

 

STTwo32_0-1714381947431.png

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you @STTwo-32,

I have successfully managed to generate the Makefile by using the build action in STM32CubeIDE; however, I am not able to Run the project onto my STM32F407G-DISC1. Either from the IDE or VSCode.

One thing that confuses me is that I do not find any configFiles such as stlink.cfg and stm32f4x.cfg

Joachim Spange
Head in the embedded
Pavel A.
Evangelist III

I do not find any configFiles such as stlink.cfg and stm32f4x.cfg

These files are for OpenOCD. The default debugger in CubeIDE is the "ST GDB server", it does not need these files. If you switch to OpenOCD, the config file will be created.