This article shows how to start up a STM32MP135x-DK Discovery kit (flexible and complete development platform for the STM32MP13x lines ). It is valid for the STM32MP135F-DK Discovery kits: the part numbers are specified in the STM32MP13 microprocessor part numbers article.
It lists the required material, points to the board features description, and gives the step-by-step process to set up the system.
Finally, it proposes to run some basic use cases and to discover some of the board capabilities.
1. Starter Package content[edit | edit source]
If you are not yet familiar with the STM32MPU Embedded Software distribution and its Packages, please read the following articles:
- Which STM32MPU Embedded Software Package better suits your needs (and especially the Starter Package chapter)
- STM32MPU Embedded Software distribution
If you are already familiar with the Starter Package for the STM32MPU Embedded Software distribution, the fast links to essential commands might be of interest.
To sum up, this Starter Package provides:
- the software image for the STM32MPU Embedded Software distribution, which includes:
- the binaries for the OpenSTLinux distribution
- one or more firmware example(s) for the STM32Cube MPU Package
- the (STM32CubeProgrammer) tool to install this image on the STM32MP135F-DK Discovery kit
2. Starter Package step-by-step overview[edit | edit source]
The steps to get the STM32MP135x-DK Discovery kit up and running, are:
☐ Checking the material
☐ Assembling the board
☐ Installing the tools
☐ Downloading the image and flashing it on the board
☐ Booting the board
Once these steps are achieved, you are able to:
- check the boot sequence
- execute basic commands
- run basic use cases
- discover on your own the capabilities of the STM32MP135x-DK Discovery kit
3. Checking the material[edit | edit source]
Mandatory
PC | Linux or Windows operating systems. See PC prerequisites for more details on the required configurations. |
STM32MP135x-DKx Discovery kit | Flexible and complete development platform for the STM32MP13 microprocessor device including:
|
Power supply | Including:
|
MicroSD card | Populated with OpenSTLinux distribution (Linux software), and providing extra storage capacity. A 2-Gbyte minimum microSD card is needed. |
USB micro-B cable | In order to connect the STM32MP135x-DKx Discovery kit to the PC through the USB micro-B (ST-LINK/V2-1) connector |
USB Type-C™ cable | In order to connect the STM32MP135x-DKx Discovery kit to an USB OTG device through the USB Type-C™ connector |
Optional
USB keyboard and mouse | Thanks to the USB type A connectors, the STM32MP135x-DKx Discovery kit can be equipped with a full-size keyboard and mouse |
Ethernet cable | In order to connect the STM32MP135x-DKx Discovery kit to a network through the RJ45 connector |
Optional, more devices and extension boards might be plugged to the STM32MP135x-DKx Discovery kit thanks to expansion connectors such as:
- the GPIO expansion connector
- ...
The following figure shows the optional material (not included in STM32MP135x-DK Discovery kit package), that is used with this Starter Package.
4. Assembling the board[edit | edit source]
Please note that the STM32MP135x-DK Discovery kit includes the MB1723 camera module with its flat cable but neither USB cable nor USB charger is provided.
Position | Description |
---|---|
1 | MB1635 motherboard |
2 | MB1723 camera module |
3 | Camera module flat cable |
5. Installing the tools[edit | edit source]
5.1. Installing the STM32CubeProgrammer tool[edit | edit source]
STM32CubeProgrammer for Linux® host PC | STM32CubeProgrammer for Windows® host PC | |
---|---|---|
Download |
Version v2.10.A01
| |
Installation |
$> ./SetupSTM32CubeProgrammer-2.9.0.linux
$> export PATH=<my STM32CubeProgrammer install directory>/bin:$PATH
$> ln -s <my STM32CubeProgrammer install directory>/bin/STM32_Programmer_CLI /home/bin/STM32_Programmer_CLI |
|
User manual |
| |
Detailed release note |
|
5.2. Preparing the USB serial link for flashing[edit | edit source]
It is recommended to use the USB (in DFU mode) for flashing rather than the UART, which is too slow.
Below indications on how to install the USB in DFU mode under Linux and Windows OS, respectively.
- For Linux host PC or Windows host PC with VMWare:
The libusb1.0 package (including USB DFU mode) must be installed to be able to connect to the board via the USB port. This is achieved by typing the following command from the host PC terminal:
PC $> sudo apt-get install libusb-1.0-0
To allow STM32CubeProgrammer to access the USB port through low-level commands, proceed as follows:
PC $> cd <your STM32CubeProgrammer install directory>/Drivers/rules
PC $> sudo cp *.* /etc/udev/rules.d/
- For Windows host PC:
Run the “STM32 Bootloader.bat” file to install the STM32CubeProgrammer DFU driver and activate the STM32 microprocessor device in USB DFU mode. This driver (installed by STM32 Bootloader.bat) is provided within the STM32CubeProgrammer release package. It is located in the DFU driver folder, \Drivers\DFU_Driver.
In case of issue, refer to How to proceed when the DFU driver installation fails on Windows host PC.
To validate the installation, the DFU driver functionality can be verified by following the FAQ instructions provided in how to check if the DFU driver is functional.
6. Downloading the image and flashing it on the board[edit | edit source]
6.1. Image download[edit | edit source]
- The STM32MP1 image (binaries) is delivered through one tarball file named
- Download and install the STM32MP1 image (binaries):
STM32MP1 Starter Package image - STM32MP13-Ecosystem-v3.1.0.ALPHA release | |
---|---|
Download |
If you didn't retrieve yet the file FLASH-stm32mp13-disco-openstlinux-5.10-dunfell-mp13-21-11-30.tar.xz, please follow instructions on the downloading instructions page. |
Installation |
$ cd <working directory path>/Starter-Package
$ tar xvf FLASH-stm32mp13-disco-openstlinux-5.10-dunfell-mp13-21-11-30.tar.xz |
Release note |
Details of the content of this software package are available in the associated STM32MP13 ecosystem release note. |
- The binaries and the Flash layout files are in the <Starter Package installation directory>/stm32mp13-disco-openstlinux-5.10-dunfell-mp13-21-11-30/images/stm32mp13-disco/ directory:
stm32mp13-disco ├── arm-trusted-firmware TF-A binaries for FSBL partitions and supported boot chains │ ├── tf-a-stm32mp135f-dk-sdcard.stm32 TF-A binary for FSBL partition (microSD card boot device) for STM32MP135F-DK → STM32MP13 Discovery kits │ ├── tf-a-stm32mp135f-dk-uart.stm32 TF-A binary for uart serial boot mode (STM32CubeProgrammer) for STM32MP135F-DK → STM32MP13 Evaluation boards │ └── tf-a-stm32mp135f-dk-usb.stm32 TF-A binary for usb serial boot mode (STM32CubeProgrammer) for STM32MP135F-DK → STM32MP13 Discovery kits ├── fip FIP binaries for FIP partitions and supported boot chains │ └── fip-stm32mp135f-dk-optee.bin FIP binary for FIP partition (optee boot chain) for STM32MP135F-DK → STM32MP13 Discovery kits ├── flashlayout_st-image-weston Flash layout files (description of the partitions) for the supported boot chains on supported boot devices and boards │ └── optee Flash layout files for optee boot chain │ └── FlashLayout_sdcard_stm32mp135f-dk-optee.tsv microSD card boot device for STM32MP135F-DK → STM32MP13 Discovery kits ├── kernel │ └── config-5.10.61 Kernel configuration file used to build kernel binaries ├── scripts │ └── create_sdcard_from_flashlayout.sh ├── st-image-bootfs-openstlinux-weston-stm32mp13-disco.ext4 Binary for bootfs partition on eMMC and microSD card devices ├── st-image-bootfs-openstlinux-weston-stm32mp13-disco.manifest ├── st-image-userfs-openstlinux-weston-stm32mp13-disco.ext4 Binary for userfs partition on eMMC and microSD card devices ├── st-image-userfs-openstlinux-weston-stm32mp13-disco.manifest ├── st-image-vendorfs-openstlinux-weston-stm32mp13-disco.ext4 Binary for vendorfs partition on eMMC and microSD card devices ├── st-image-weston-openstlinux-weston-stm32mp13-disco.ext4 Binary for rootfs partition on eMMC and microSD card devices ├── st-image-weston-openstlinux-weston-stm32mp13-disco.license ├── st-image-weston-openstlinux-weston-stm32mp13-disco-license_content.html License summary for all packages needed to feed all partitions └── st-image-weston-openstlinux-weston-stm32mp13-disco.manifest
6.2. Image flashing[edit | edit source]
The STM32CubeProgrammer tool is used to flash the STM32MP135x-DK Discovery kit with the downloaded image.
The microSD card, provided in the box, is used as the Flash device: see the STM32MP15 Flash mapping article if you want to know more about the supported Flash memory technologies, and the Flash partitions.
As explained in the boot chain overview, the optee boot chain is the default solution delivered by STMicroelectronics. Thus, the steps below use the image for the optee boot chain.
Let's flash the downloaded image on the microSD card:
- Connect the USB Type-C™ (OTG) port (7) to the host PC that contains the downloaded image
- Insert the delivered microSD card into the dedicated slot ('4)
- Connect the delivered power supply to the USB Type-C™ port (11)
- Press the reset button (8) to reset the board
- Go to the Starter Package directory that contains the binaries and the Flash layout files
PC $> cd <Starter Package installation directory>/stm32mp13-disco-openstlinux-5.10-dunfell-mp13-21-11-30/images/stm32mp13-disco
If you have followed the the proposition to organize the working directory, the command is PC $> cd Starter-Package/stm32mp13-disco-openstlinux-5.10-dunfell-mp13-21-11-30/images/stm32mp13-disco
- Check that the STM32CubeProgrammer tool is installed and accessible; if not, go to the installation procedure (installing the tools)
PC $> STM32_Programmer_CLI --h ------------------------------------------------------------------- STM32CubeProgrammer <tool version> -------------------------------------------------------------------
- Get the device port location for the USB link
PC $> STM32_Programmer_CLI -l usb ------------------------------------------------------------------- STM32CubeProgrammer <tool version> ------------------------------------------------------------------- Total number of available STM32 device in DFU mode: 1 Device Index : USB1 USB Bus Number : 002 USB Address Number : 002 Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000 Serial number : 000000000000 Firmware version : 0x011a Device ID : 0x0500
- Flash the microSD card with the image for the trusted boot chain
PC $> STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp135f-dk-optee.tsv
- This operation takes several minutes (mainly depending of the rootfs size). A successful flashing outputs the following log:
------------------------------------------------------------------- STM32CubeProgrammer v2.9.0 ------------------------------------------------------------------- Warning: Timeout is forced to 65535 ms USB speed : High Speed (480MBit/s) Manuf. ID : STMicroelectronics Product ID : DFU in HS Mode @Device ID /0x501, @Revision ID /0x1000 SN : 000080163031510A30333432 FW version : 0x0110 Board : -- Device ID : 0x0501 Device name : STM32MP13xx Device type : MPU Revision ID : -- Device CPU : Cortex-A7 Start Embedded Flashing service Memory Programming ... Opening and parsing file: tf-a-stm32mp135f-dk-usb.stm32 File : tf-a-stm32mp135f-dk-usb.stm32 Size : 88838 Bytes Partition ID : 0x01 Download in Progress: File download complete Time elapsed during download operation: 00:00:00.319 RUNNING Program ... PartID: :0x01 Start operation done successfully at partition 0x01 Memory Programming ... Opening and parsing file: fip-stm32mp135f-dk-optee.bin File : fip-stm32mp135f-dk-optee.bin Size : 1371986 Bytes Partition ID : 0x03 Download in Progress: File download complete Time elapsed during download operation: 00:00:01.147 RUNNING Program ... PartID: :0x03 Reconnecting the device ... Start operation done successfully at partition 0x03 Memory Programming ... Opening and parsing file: tf-a-stm32mp135f-dk-sdcard.stm32 File : tf-a-stm32mp135f-dk-sdcard.stm32 Size : 88767 Bytes Partition ID : 0x04 Download in Progress: File download complete Time elapsed during download operation: 00:00:00.023 RUNNING Program ... PartID: :0x04 Start operation done successfully at partition 0x04 Memory Programming ... Opening and parsing file: tf-a-stm32mp135f-dk-sdcard.stm32 File : tf-a-stm32mp135f-dk-sdcard.stm32 Size : 88767 Bytes Partition ID : 0x05 Download in Progress: File download complete Time elapsed during download operation: 00:00:00.022 RUNNING Program ... PartID: :0x05 Start operation done successfully at partition 0x05 Memory Programming ... Opening and parsing file: fip-stm32mp135f-dk-optee.bin File : fip-stm32mp135f-dk-optee.bin Size : 1371986 Bytes Partition ID : 0x06 Download in Progress: File download complete Time elapsed during download operation: 00:00:00.263 RUNNING Program ... PartID: :0x06 Start operation done successfully at partition 0x06 Memory Programming ... Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp13-disco.ext4 File : st-image-bootfs-openstlinux-weston-stm32mp13-disco.ext4 Size : 64 MBytes Partition ID : 0x10 Download in Progress: File download complete Time elapsed during download operation: 00:00:16.369 RUNNING Program ... PartID: :0x10 Start operation done successfully at partition 0x10 Memory Programming ... Opening and parsing file: st-image-vendorfs-openstlinux-weston-stm32mp13-disco.ext4 File : st-image-vendorfs-openstlinux-weston-stm32mp13-disco.ext4 Size : 16 MBytes Partition ID : 0x11 Download in Progress: File download complete Time elapsed during download operation: 00:00:03.981 RUNNING Program ... PartID: :0x11 Start operation done successfully at partition 0x11 Memory Programming ... Opening and parsing file: st-image-weston-openstlinux-weston-stm32mp13-disco.ext4 File : st-image-weston-openstlinux-weston-stm32mp13-disco.ext4 Size : 609412 KBytes Partition ID : 0x12 Download in Progress: File download complete Time elapsed during download operation: 00:02:28.997 RUNNING Program ... PartID: :0x12 Start operation done successfully at partition 0x12 Memory Programming ... Opening and parsing file: st-image-userfs-openstlinux-weston-stm32mp13-disco.ext4 File : st-image-userfs-openstlinux-weston-stm32mp13-disco.ext4 Size : 128 MBytes Partition ID : 0x13 Download in Progress: File download complete Time elapsed during download operation: 00:00:31.960 RUNNING Program ... PartID: :0x13 Start operation done successfully at partition 0x13 Flashing service completed successfully
Go to the STM32CubeProgrammer article:
- to know more about the flashing operation
7. Booting the board[edit | edit source]
STM32MP13 Discovery kits - starting for the first time
Subpart - STM32MP13 - Starter Package
8. Examples[edit | edit source]
The examples are under construction: few of them are proposed below; more examples will come with the next releases. |
8.1. Examples running on Cortex-A7[edit | edit source]
The table below gathers links towards articles proposing examples of peripherals usage.
9. Fast links to essential commands[edit | edit source]
If you are already familiar with the Starter Package for the STM32MPU Embedded Software distribution, fast links to the essential commands are listed below.
10. How to go further?[edit | edit source]
Now that the image is flashed on the STM32MP135F-DK Discovery kit, you might want to switch to the STM32MP1 Developer Package, in order to modify or tune the STM32MPU Embedded Software distribution with your own developments.