How to update my project’s current STM32Cube firmware version in STM32CubeMX?STM32CubeMX is a graphical tool that allows users to configure STM32 MCUs (microcontrollers) and MPUs (microprocessors) quickly and simply. In addition, the tool also assists in generating the corresponding initialization C code for the Arm Cortex-M core(s) or partial Linux device tree for Arm Cortex-A cores. For each STM32, STM32CubeMX also comprises the STM32Cube MCU package composed of the STM32Cube hardware abstraction layer (HAL) and the low-layer (LL) APIs, plus a consistent set of middleware components (RTOS, USB, FAT file system, etc). In addition, all embedded software utilities are delivered with a full set of examples running on STMicroelectronics boards. The STM32Cube FW package gathers in one single package all the generic embedded software components required to develop an application on the STM32 microcontrollers. To check the current STM32CubeMX project’s firmware version you are using, navigate to project manager > project > MCU and Firmware Package. By default, STM32CubeMX should have selected the latest version of the firmware package available in your STM32Cube repository:
Generally, it is recommended for you to be up to date and check STM32CubeMX or st.com for the latest available STM32Cube firmware package related to your selected STM32 as the HAL and LL drivers are constantly being maintained and updated. If you’re in the project manager window, select the ‘Home’ button on the top left corner to bring you back to the STM32CubeMX landing page. Otherwise, you can check for the latest available STM32Cube firmware packages in two ways. Both ways are located under the ‘Manage Software Installations’ section on the STM32CubeMX landing page on the right-hand side of the screen. 1.If there are any updates available for your previously downloaded and installed STM32CubeMX firmware or expansion packages you can find them under ‘Check for STM32CubeMX and Embedded Software Packages Update':
2. Another option is to use the ‘Install or Remove Embedded Software Packages’ feature to view other available software packages or check if you have the latest software package installed:
You can also check the latest available STM32Cube firmware package on st.com. To do so, start on st.com and search for your device’s STM32Cube firmware package, then click on the ‘Get Software’ icon.
Upon clicking on the ‘Get Software’ icon, the page should automatically redirect you to the section populated with the downloadable firmware package. To get the latest version, select the ‘Get latest’ icon.
To get the software package from Github, select the ‘Get from Github’ icon.
To download a previous software package version, click on the ‘Select Version’ drop down icon:
However, it’s also possible to revert to or generate new projects with previous STM32Cube FW versions as well. To do this in STM32CubeMX, again you will want to revisit project manager tab > project > MCU and Firmware Package as we did in the previous step above. This time you will want to uncheck the option to ‘Use Default Firmware Location’.
Then scroll to the right of the page, and click on the ‘browse’ icon.
Select the previous Cube FW version you want to use from your repository, and then click on the ‘open’ icon.
When you are ready to generate the project, you will have successfully created a project that will use a reverted STM32Cube FW version. In this case, we have selected to use the STM32CubeG0 v1.5.0 instead of the latest STM32CubeG0 v1.6.1: