Loading...
 
Skip to main content

System Workbench for STM32


Importing Cube example programs: F7-discovery

Hi Peter,

I share your pain and probably spent about as much time as you have trying to get the IDE to work correctly. I have had success with some of the projects but not the ones that are of interest. I tried building the "BSP" example project fromt the STM32CubeF7 archive but only got it to compile and not able to download. In general these are the steps I took to build an example project:

1. Erase your entire workspace directory and start from scratch.
2. Open the IDE and right-click in the "Project Explorer" window pane.
3. Select "Import..." and choose "General -> Existing projects into workspace"
4. On the next window choose the "Select root directory" radio button and browse to an example
eg: \STM32Cube_FW_F7_V1.1.0\Projects\STM32746G-Discovery\Examples\BSP\SW4STM32\STM32746G_DISCOVERY to build the "BSP" project
5. If all goes well you should see the project show up in the "Projects" box.
6. Make sure that all three of the "Options" boxes are unchecked and click "Finish"
7. This will load all the relevant files and create the "BSP" project in your workspace.
8. To build the project, from the main menu bar, choose "Project -> Build All".
9. This will generate the .elf file you will need for downloading and debugging.

The part where I get stuck is creating a debugging session. None of the projects from the STM32Cube7 archive contain any debug configurations so it is a matter of trial-and-error in setting up a debug configuration. For some of the sample projects the following seems to work:

1. From the main menu bar choose "Run -> Debug Configurations..."
2. In the pop-up window ensure that "AC6 SMT32 Debugging" configuration is highlighted
3. On the "Main" tab of the window select the project that you are debugging.
eg. the name of the project will be something like "STM32F476G_DISCOVERY"
4. For the name of the application, browse to the directory containing your .elf file and select that file.
5. Click the "Apply" button to save the configuration. If you want to start debugging click "Debug"

If all goes well you will be taken to the Debug perspective in the IDE where the target will be reprogrammed. The breakpoint will be started at "main()" where you can choose to single-step or run the code. I found that this procedure worked for only some of the projects so your results may vary.

The only IDE I truly had success with is IAR. Unfortunately, most of the demos exceed the 32K code size limitation of the Kickstart version of IAR. I am running the 30-day full license version. My hope is that the state of the tools will improve. The mbed.org website has the same Discovery board available but none of the code has been ported by STM for this board. For now I have put away my board and hopefully won't regret my purchase. Even the ST-LINK utility from STM doesn't support erasing and programming of the NOR flash memory on this board. I think a lot of patience is in order 😊

I hope the above helps.