This article explains the Start From Board feature and shows how to use it through a practical example.
1. What is Start From Board?
Start From Board is a feature of STM32CubeMX that simplifies project creation for a board.
It allows quick project generation and upload.
The generated skeleton helps users better understand how the board works.
Main features:
- A fully functional application can be generated in a few clicks.
- Required board support package (BSP) drivers and configuration settings can be included automatically to allow the kernel image to boot the board.
This article uses the STM32C031C6Tx-based NUCLEO-C031C6 board as an example.
See the list of supported boards in the section below.
1.1. Objectives
- Learn how to quickly generate a project to run on a board.
- Create a simple project illustrating the Start From Board functionality.
2. Creating the project in STM32CubeMX
The example below uses the NUCLEO-C031C6 board and demonstrates the following features:
- A green LED toggles when the user presses the User button on the board.
- A message is sent to the UART associated with ST-LINK.
Select the NUCLEO-C031C6 board in the Board Selector, as shown below:
![]()
- Double-click the board image or press the Start Project button.
- By default, the Generate demonstration code checkbox is not selected.
- It must be selected to generate code allowing interaction with the board through the User button.
- Select the Generate demonstration code checkbox.
- Each checkbox under Human Machine Interface includes the corresponding BSP drivers.
- The list of available BSPs is displayed, and some are already selected.
- This indicates that STM32CubeMX will generate code using the corresponding BSP drivers.
- Press OK to continue.
3. Pinout & Configuration view
- Expand the Bsp tree on the left side of the Pinout & Configuration view to display the configured boards.
- Click the NUCLEO-C031C6 board.
The Mode and Configuration panels will open with the settings selected in the wizard.
Note:
- Pins reserved for BSP use are shown in magenta, are unavailable for other configurations, and display a tooltip when hovered over.
- Any IP configured with Start From Board is shown in a grayed-out state in the GUI. Hovering over it displays a tooltip indicating this status.
- You can still adjust settings in the Mode and Configuration panels.
- You cannot enable or disable the Generate demonstration code option here.
Limitation:
If you press the Reset Configuration button, the Generate demonstration code option will no longer be adjustable; it will be set to do not generate.
3.1. Generating the project
Go to the Project Manager tab:
- Enter a project name.
- Select your preferred toolchain or IDE.
- Press GENERATE CODE.
3.2. Moving the code to the board
You can now locate the generated code in your file system, compile it with the appropriate toolchain, and flash it to the board.
- Pressing the User button starts and stops the LED blinking process.
- Using a debugger, you can observe the data being sent to the UART associated with ST-LINK.
4. Limitations
- In STM32CubeMX v6.16.0, projects generated with Start From Board for the NUCLEO-H563 board produce the same compiler warning four times when built with IAR (EWARM). The warning concerns an incompatible redefinition of the macro USE_NUCLEO_144, which is defined both in the compiler command-line options and inside the generated header file stm32h5xx_nucleo_conf.
- For Start From Board projects, disabling preconfigured peripherals in the Board Project Options popup does not refresh the pinout view; the pins remain shown as configured (green) even after being unchecked.
- This functionality is not compatible with the following software packages:
- FP-ATR-SIGFOX1
- FP-SNS-MOTENV1
- FP-SNS-MOTENVWB1
- FP-SNS-SMARTAG2
- FP-SNS-STBOX1
- X-CUBE-ALGOBUILD
- X-CUBE-ALS
- X-CUBE-BLE1
- X-CUBE-BLE2
- X-CUBE-BLEMGR
- X-CUBE-EEPRMA1
- X-CUBE-GNSS1
- X-CUBE-IPS
- X-CUBE-ISPU
- X-CUBE-MEMS1
- X-CUBE-NFC10
- X-CUBE-NFC4
- X-CUBE-NFC6
- X-CUBE-NFC7
- X-CUBE-NFC9
- X-CUBE-SAFEA1
- X-CUBE-SFXS2LP1
- X-CUBE-SUBG2
- X-CUBE-TOF1
- X-CUBE-WB05N
- The following scenarios may lead to compilation errors:
- Disabling the BSP feature after enabling it with the Generate demonstration code option.
- Disabling the BSP feature in a TrustZone-enabled environment after activating Generate demonstration code and switching between security contexts.
In the cases listed above, the generated code in the user section should be removed manually.
5. Supported boards
| Category | Family | Board name |
|---|---|---|
| High Performance MCUs | NUCLEO-G4 | NUCLEO-G431KB |
| NUCLEO-G431RB | ||
| NUCLEO-G474RE | ||
| NUCLEO-G491RE | ||
| NUCLEO-H5 | NUCLEO-H503RB | |
| NUCLEO-H533RE | ||
| NUCLEO-H553ZG | ||
| NUCLEO-H563ZI | ||
| NUCLEO-H5E5ZJ | ||
| NUCLEO-H7 | NUCLEO-H723ZG | |
| NUCLEO-H743ZI | ||
| NUCLEO-H743ZI2 | ||
| NUCLEO-H745ZI-Q | ||
| NUCLEO-H753ZI | ||
| NUCLEO-H755ZI-Q | ||
| NUCLEO-H7A3ZI-Q | ||
| NUCLEO-H7S3L8 | ||
| NUCLEO-N6 | NUCLEO-N657X0-Q | |
| DK-H5 | STM32H573I-DK | |
| Mainstream MCUs | NUCLEO-C0 | NUCLEO-C031C6 |
| NUCLEO-C051C8 | ||
| NUCLEO-C071RB | ||
| NUCLEO-C092RC | ||
| NUCLEO-F4 | NUCLEO-F446RE | |
| Ultra-low-power MCUs | NUCLEO-L5 | NUCLEO-L552ZE-Q |
| NUCLEO-L4 | NUCLEO-L432KC | |
| NUCLEO-L476RG | ||
| NUCLEO-U0 | NUCLEO-U031R8 | |
| NUCLEO-U083RC | ||
| NUCLEO-U3 | NUCLEO-U345RC-Q | |
| NUCLEO-U366RE-Q | ||
| NUCLEO-U385RG-Q | ||
| NUCLEO-U3C5ZI-Q | ||
| NUCLEO-U5 | NUCLEO-U545RE-Q | |
| NUCLEO-U575ZI-Q | ||
| NUCLEO-U5A5ZJ-Q | ||
| Wireless MCUs | MODULES | B-WBA5M-WPAN |
| B-WBA6M-WPAN | ||
| NUCLEO-WB0 | NUCLEO-WB05KZ | |
| NUCLEO-WB07CC | ||
| NUCLEO-WB09KE | ||
| NUCLEO-WB1 | NUCLEO-WB15CC | |
| NUCLEO-WB5 | NUCLEO-WB55RG | |
| NUCLEO-WBA | NUCLEO-WBA25CE1 | |
| NUCLEO-WBA52CG | ||
| NUCLEO-WBA55CG | ||
| NUCLEO-WBA65RI | ||
| NUCLEO-WL3 | NUCLEO-WL33CC1 | |
| NUCLEO-WL33CC2 | ||
| NUCLEO-WL3RKB1 | ||
| NUCLEO-WL3RKB2 | ||
| NUCLEO-WL5 | NUCLEO-WL55JC1 | |
| NUCLEO-WL55JC2 | ||
| P-NUCLEO-WB55 | P-NUCLEO-WB55-NUCLEO | |
| P-NUCLEO-WB55-USBDONGLE |