Installing Torizon OS to STM32MP Targets
1. Overview
This page describes how to deploy the Torizon OS target images to STM32MP targets.
The procedure documented below will install the arm-trusted
firmware, the U-Boot firmware and the Torizon OS image, including the Linux kernel and filesystem images, to the the boot media of the supported STM32MP targets. The default boot media on the STM32MP Evaluation board and the Discovery kits is the SD card. The STM32MP2 EV1 board also supports booting from the eMMC disk (while the STM32MP1 discovery board has only the SD card option). The installation instructions are mostly similar for the SD card and eMMC, you just have to select a corresponding Flash layout for the desired media when running the programmer tool. Having completed the installation, the STM32MP board will boot to Torizon OS from SD card or eMMC.
Note that the procedure will erase all data that might be present on the boot media previously.
2. Preparing Host
Perform the following steps:
Follow the instructions in Installing the STM32CubeProgrammer Tool in order to install the STM32CubeProgrammer Tool to your Linux host.
Add
STM32_Programmer_CLI
to yourPATH
:$ export PATH=$PATH:/bin: $ STM32_Programmer_CLI ------------------------------------------------------------------- STM32CubeProgrammer v2.14.0 ------------------------------------------------------------------- Usage : STM32_Programmer_CLI.exe [command_1] [Arguments_1][[command_2][Arguments_2]...]
Download the archive with the release images for your target board from the Emcraft site and unpack them into an arbitrary directory on the Linux host. List of the supported boards and available releases:
STM32P2 Evaluation board - torizon_6.9.0-core-docker-stm32mp25-eval.tar.bz2
STM32P2 Discovery kit - torizon_6.9.0-core-docker-stm32mp25-disco.tar.bz2
STM32P1 Discovery kit - torizon_6.9.0-core-docker-stm32mp15-disco.tar.bz2
If you are installing the images built by Yocto (as opposed to using the pre-built images available from the Emcraft web site), navigate to the $BUILDDIR/deploy/images/$MACHINE
directory in the Yocto work directory. Refer to Understanding Build Outcome for details on the files structure in the deploy directory.
Set up the target board, connect the serial console and a power supply. Refer to STM32 MPU boards for a description of your target hardware.
3. Installing Torizon OS
Perform the following steps:
Power the target board off.
Select the USB Serial Downloader mode. Refer to ST’s WiKi for details on the boot switches for your board:
Power the target board on.
Check that the programming USB port has appeared on the host (note the
Device Index
in the output):$ STM32_Programmer_CLI -l usb ------------------------------------------------------------------- STM32CubeProgrammer v2.14.0 ------------------------------------------------------------------- ===== DFU Interface ===== Total number of available STM32 device in DFU mode: 1 Device Index : USB1 USB Bus Number : 002 USB Address Number : 007 Product ID : DFU in HS Mode @Device ID /0x505, @Revision ID /0x2000 Serial number : 002A00194136500B00363653 Firmware version : 0x0110 Device ID : 0x0505
Pass the SD card or eMMC Flash Layout file to the
STM32_Programmer_CLI
for programming the images to boot media:STM32_Programmer_CLI -c port=usb1 -w flashlayout_torizon-core-docker/optee/FlashLayout_<MEDIA>_<BOARD>-optee.tsv
, where<MEDIA>
is one ofsdcard
oremmc
,<BOARD>
is one ofstm32mp257f-ev1
,stm32mp257f-dk
orstm32mp157f-dk2
. For example, use the following command to install Torizon OS to the eMMC disk on the STM32MP2 Evaluation board: