Skip to content

STM32CubeIDE

KurfuerstPilz edited this page Feb 16, 2021 · 27 revisions

STM32CubeIDE

Import a project

Once you launch the STM32CubeIDE you can import new projects. First locate the column on the lefthand above which "Project Explorer" is written. Rightclick on any free space and choose import. The most used options for us were "General > Exisitng Projects into Workspace" or "General > Import STM32Cube Example"

  • If you import an existing project navigate to the folder which includes the .project file. If there are nested projects choose the folder with the top-level .project-file.
  • If you import an example choose the board you are using (in our case the NUCLEO-L552ZE-Q). Please note that there is a rider named "Example" which contain something you can reuse. We used FreeRTOS_SecureIOToggle_TustZone, which might be easier to start with if you want to continue with our project. Afterwards you can choose whether TrustZone should be enabled and if you would like to configure the PINs with there default configuration.

Build and Lauch a project

To build your project, choose the project click on the arrow next to the hammer, choose your build configuration and then click the hammer. Once the project is build, you may run or debug the project, according to the build configuration. If you run a project which contains other projects (such as the FreeRTOS_SecureIOToggle_TrustZone), you must consider the dependencies. If you import examples there is a readme specifiying the details on how to build and launch. Otherwise the following isntructions should build and flash every project correctly:

  1. Select the Project containing the Secure.elf
  2. At the top of the CubeIDE, click the arrow next to the Debug- or Run-Icon > Configurations, click on the Startup Rider > add xxxx/NonSecure.elf
  3. Click Apply, close the window
  4. Build the secure project
  5. Build the NonSecure project
  6. Select the Secure-Project and hit Debug/Run

Clone this wiki locally