Skip to main content
pcb
Associate II
Apr 29, 2024 8:45 AM UTC
Question

Upload example code to STM32F407

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?
This topic has been closed for replies.

3 replies

STTwo-32
ST Technical Moderator
Apr 29, 2024 9:12 AM UTC

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.
pcb
pcbAuthor
Associate II
Apr 30, 2024 9:10 AM UTC

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 SpangeHead in the embedded
Pavel A.
Apr 30, 2024 1:55 PM UTC

> 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.