Last edited one month ago

How to manage OpenSTLinux projects in STM32CubeIDE




This article explains how to import OpenSTLinux projects supporting FIP (TF-A firmware image package) into STM32CubeIDE on a Linux® workstation. Following examples are based on board with STM32MP15x lines More info.png but they apply also on board with STM32MP13x lines More info.png.

1. Pre-requisite[edit | edit source]

Network setup is needed, please follow How to set up proxy and P2P Ethernet connection with STM32CubeIDE.

To focus onto OpenSTLinux plugin it is then recommended to disable non used update sites and launch a Reload on OpenSTLinux update site.

Select OpenSTLinux update site

Now, you have to setup OpenSTLinux SDK using local installation: Window > Preferences > STM32Cube > OpenSTLinux SDK Manager.

OpenSTLinux SDK Selection

Setup is finalized thanks to Cortex®-A contextual menu: Setup OpenSTLinux .

OpenSTLinux plugin install

During OpenSTLinux plugin installation, you have to trust Update Site thanks to corresponding checkbox.

OpenSTLinux check boxes

Now you can check that OpenSTLinux plugin has been installed:Help > About STM32CubeIDE > Installation Details.

OpenSTLinux plugin installed

If not, please refer to How to install the Yocto Project SDK in STM32CubeIDE#Setup OpenSTLinux.


From STM32CubeIDE v1.17.0, OpenSTLinux project sources (Linux, OPTEE, TF-A, U-Boot) are installed on local disk followingSTM32MPU Developer Package. They can be fully controlled with a STM32CubeIDE independent source control tool. For using them inside STM32CubeIDE, they are imported inside STM32MP1x project giving source paths.

Note that OpenSTLinux projects need only to be installed on your local disk, no need to build them in command line.

2. Overview[edit | edit source]

It is now possible to import into an existing STM32CubeIDE STM32MP1x project, some OpenSTLinux project sources (Linux, OPTEE, TF-A, U-Boot). Current STM32CubeIDE version is v1.18.0, compatible with ecosystem release ≥ v6.0.0 More info.png .

This is done by clicking on Import an OpenSTLinux project... in contextual menu of the Cortex®-A hierarchical project...

OpenSTLinux project import

...and giving source paths.

OpenSTLinux Project Sources Import Wizard


Yocto SDK set-up issue.

3. OpenSTLinux project structure[edit | edit source]

All OpenSTLinux projects follow the same project structure approach with three main parts:

  • Eclipse artifact, to make project usage easier
  • Build artifact identifying clearly the project output
  • Sources, as they appear in the Yocto Project® environment


Device tree sources are generated by STM32CubeMX into the DeviceTree/ directory of the Cortex®-A hierarchical project. They are automatically included inside the corresponding OpenSTLinux projects: Linux®, TF-A and U-boot, with:

  • source file links
  • dedicated Build target

STM32CubeIDE supports FIP. The FIP_artifacts/ directory of the Arm®-Cortex®-A hierarchical project hosts all the deployment objects needed to build the FIP image. Those objects are generated by the TF-A, U-boot, or OP-TEE projects.


4. Linux project[edit | edit source]

Several Build targets are proposed for a Linux® project addressing device trees, module, and kernel.

OpenSTLinux Linux Project Structure

Double-click on Build target to launch the corresponding compilation with the associated Yocto Project® SDK.

Double-click on Build target to launch the corresponding compilation with the associated Yocto Project® SDK.

OpenSTLinux Linux Device Tree MX Build

It is then possible to update the running STM32MP15x target with the new build artifacts using the STM32 Cortex-A Linux Deployment > Run Configurations... menu.

It is then possible to update the running STM32MP1x target with the new build artifacts using the STM32 Cortex-A Linux Deployment > Run Configurations... menu.

OpenSTLinux Linux Deployment

In this dedicated Run Configurations... menu, build artifact (such as device tree binary, module, kernel or other) is added using the Add... button and providing:

  • Local path, on the Linux® workstation (here build/arch/arm/boot/dts/st/stm32mp157-dk2f-mx-mx.dtb).
  • Remote path, browsing the remote target file system.

For a new device tree, it is possible to update the extlinux.conf target file to take it into account at the next target reboot. See the Actions sub-window.

OpenSTLinux Linux Deployment Menu

To upload your binary on the board, it must have an IP address, in order to give access to its file system using an ssh connection. The IP adress here is "192.168.7.1".

Serial Console

The dtb binary file will be uploaded under "/boot" directory :

Boot directory in board file system

The "Target Status" graphical component also shows you the board status (accessible through ssh, or not) : How to use the Target Status widget in STM32CubeIDE.

After download of build artifacts to the STM32MP1x board:

  • a script can be executed (optional).
  • STM32MP1x board is rebooted (default)


5. Bootloader projects[edit | edit source]

For ecosystem release ≥ v3.0.0 , the boot architecture has been updated, as explained in TF-A overview. Since ecosystem release v3.0.0 , two objects are needed to update the STM32MP15x flash memory device: TF-A BL2 flash memory partition and FIP Image. Both of them are generated inside STM32CubeIDE:

  • TF-A BL2 flash memory partition, available from the TF-A project build artifact
  • FIP image, located into the fip directory of FIP artifacts


Since the FIP image relies on three projects, there are dependencies between TF-A, U-boot, and OP-TEE. The all build target in those projects launches the fiptool, which builds the FIP image. This succeeds only if all the objects are generated.


A build target using generated the device tree sources is also proposed inside STM32CubeIDE.These generated device trees target only the trusted mode. As a result, there is no support inside the OP-TEE project.
As depicted in the figure below, the generated device tree sources for TF-A and U-boot are inside the DeviceTree/ directory. They are linked into the projects TF-A and U-boot, and specific build targets are generated:

  • stm32 (stm32mp157c-mymp157cdk2-mx) for the TF-A project, which must be launched first
  • and all (stm32mp157c-mymp157cdk2-mx) for the U-boot project

The FIP image for the generated device tree is then available from the fip directory of the FIP artifact.

OpenSTLinux FIP Project Structure


From STM32CubeIDE release v1.8.0, it is possible to update bootloader objects (TF-A BL2 & FIP image) directly on a running STM32MP15x target. Before working with STM32CubeIDE, it is recommended to first update the STM32MP15x boot flash memory withSTM32CubeProgrammer.

All flash memory devices available on the STM32MP157x-EV1 (SD™ card, eMMC, NAND, and NOR) are supported by STM32CubeIDE. It is possible to update them, typically with a customized device tree, by means of the integrated STM32CubeMX. Note that trusted image only is supported.