- Last edited 2 years ago ago
How to get started with STM32CubeIDE from scratch
1 Create a new STM32 project
To start a new project, go to [File]>[New]>[STM32 Project].
Select the desired STM32 device or board. Demonstrated below, the selected board is the STM32MP157C-EV1. Click on [Next >].
After the target selection, the project setup step shown below must be done. The Targeted Project Type setting determines whether the project gets generated by STM32CubeMX or not. An empty project is a skeleton of a project that needs building upon while STM32Cube indicates an STM32CubeMX-managed project.
2 Create an empty project based on the template in the STM32CubeMP1 MPU Package
To make sure that the project gets a hierarchical structure, the recommended way to is to go to [File]>[New]>[STM32 Project] as shown below.
Select the device for the project being imported and click on [Next >].
When setting up the project as shown below, make sure that the Targeted Project Type is set to Empty and click on [Finish].
After the empty hierarchical project is generated:
- Go to [File]>[Import...].
- Import the template project as Import ac6 System Workbench for STM32 Project
- Copy and paste the project content into the sub-project of the empty project by means of STM32CubeIDE project explorer as shown below
It is important to remember to configure also the same build settings used previously while the project was in the SW4STM32 environment. If the project contains linked resources, they must be updated to point to the correct resources in the file system. This process is necessary because importing a project made for SW4STM32 without any special treatment and without an ioc file results in a flat project structure in STM32CubeIDE.
3 Import a project from the STM32CubeMP1 MPU Package
To import the STM32Cube firmware project into STM32CubeIDE, go to [File]>[Import...] and select Import ac6 System Workbench for STM32 Project as shown in the figure below and click on [Next >].
Then select the correct project. A project example is by default located at '$HOME\STM32Cube\Repository\STM32Cube_FW_MP1_VX.X.X\Projects\STM32MP157C-EV1\Examples\ADC\ADC_SingleConversion_TriggerTimer_DMA\SW4STM32\ADC_SingleConversion_TriggerTimer_DMA.'
After selecting the project, click on [Finish] to import and build the project.