This page is a candidate for deletion. The supplied reason is: Article renamed (see Ludovic B comment above) Registered User (-) 09:19, 27 May 2021 (CEST) . No signature supplied! Wiki maintainers: remember to check if anything links this page before deleting it. |
This article explains how to import OpenSTLinux v3.0 projects supporting FIP, into STM32CubeIDE from version 1.6.1 on a Linux® workstation.
1. Overview[edit source]
It is possible to import into an existing STM32MP15 project some OpenSTLinux projects:
- STM32CubeIDE 1.6.1 provides support for ecosystem release v3.0.0 .
- STM32CubeIDE 1.5.0 provides support for ecosystem release v2.1.0 .
- STM32CubeIDE 1.4.0 provides support for ecosystem release v2.0.0
This is done using the Import an OpenSTLinux project... Cortex®-A hierarchical project contextual menu, providing access to Linux®, TF-A, U-boot and OP-TEE.
2. OpenSTLinux project structure[edit source]
All the OpenSTLinux projects follow the same project structure approach with three main parts:
- Eclipse artifact, in order to make project usage easier,
- Build artifact identifying clearly the project output,
- Sources, as they appear in the Yocto Project® environment
Device tree sources generated by STM32CubeMX into the DeviceTree/ directory of the Cortex®-A hierarchical project, are automatically included inside the corresponding OpenSTLinux projects: Linux®, TF-A and U-boot, with:
- source file links,
- dedicated Build target.
FIP is also supported, from release 1.6.1, which provides OpenSTLinux 3.0. The FIP_artifacts/ directory of the Cortex®-A hierarchical project hosts all deployment objects needed to build FIP image. Those objects are generated by TF-A, U-boot or OP-TEE projects.
3. Linux project[edit source]
Several Build targets are proposed for Linux® project addressing device trees, module and kernel.
Double-click on Build target to launch the corresponding compilation with associated Yocto Project® SDK.
It is then possible to update the running STM32MP15 target with the new build artifacts using the STM32 Cortex-A Linux Deployment > Run Configurations... menu.
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 builld/arch/arm/boot/dts/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.
After download of build artifacts to the STM32MP15 board:
- a script can be executed (optional)
- STM32MP15 board is rebooted (default)
4. Other OpenSTLinux Projects[edit source]
From OpenSTLinux 3.0, the boot architecture has been revisited as explained in TF-A overview. Now two objects are needed to update the STM32MP15 Flash memory device: TF-A BL2 flash partition and FIP Image. Both of them are generated inside STM32CubeIDE:
- TF-A BL2 flash partition, available from TF-A project build artifact,
- FIP image, located into fip directory of FIP artifacts.
Since the FIP image relies onto three projects, some dependencies exist between TF-A, U-boot and OP-TEE.
all build target in those projects is launching the fiptool, which builds the FIP image. This succeeds only if all the objects are generated.
A build target using generated device tree sources is also proposed inside STM32CubeIDE.
These generated device trees are targeting only trusted mode so 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 project 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.
FIP image for the generated device tree is then available from the fip directory of FIP artifact.
The STM32MP15 board must then be updated, typically using STM32CubeProgrammer (STM32CubeProg).