Populate the target and boot the image

Revision as of 10:20, 1 February 2019 by Registered User (→‎Boot the board)

Template:ArticleMainWriter Template:ArticleProposedVersion


STM32MP157X-DK2.png
Let's start Develop on Arm® Cortex®-A7
Step category in.png Unpack the board Step.png Populate the target and boot the image Step.png Execute basic commands Step.png Use the demo launcher Step category out.png


1. Overview[edit source]

This stage will explain you how to get, install and boot the STM32MP15 Discovery kits with the Starter Package.

2. Open a terminal[edit source]

Open a terminal on the host computer.

Ubuntu terminal

All the command precede with have to be executed in the host computer terminal.

  • Create your STM32MPU workspace directory on your host computer
 mkdir $HOME/STM32MPU_workspace
 cd $HOME/STM32MPU_workspace

3. Install the tools[edit source]

3.1. STM32CubeProgrammer[edit source]

Info white.png Information
STM32CubeProgrammer requires 1.8 version or later of the Java platfrom.

 sudo apt-get install openjdk-8-jre
 sudo update-alternatives --config java

Select the java-8-openjdk configuration.

  • Create your STM32MPU tools directory on your host computer
 mkdir $HOME/STM32MPU_workspace/STM32MPU-Tools
 mkdir $HOME/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-2.0.0
  • Create a temporary directory in your STM32MPU workspace
 mkdir $HOME/STM32MPU_workspace/tmp
  • Download STM32CubeProgrammer v2.0.0 in your $HOME/STM32MPU_workspace/tmp directory
  • Uncompress the archive file to get the STM32CubeProgrammer installers
 cd $HOME/STM32MPU_workspace/tmp
 unzip SetupSTM32CubeProgrammer.zip
  • Execute the Linux installer, which guides you through the installation process. Select "$HOME/STM32MPU-Tools/STM32CubeProgrammer-2.0.0" as the installation directory, when it's requested by the installer
 ./SetupSTM32CubeProgrammer-2.0.0.linux
Splash screen
Welcome page
Installation path
  • Add the STM32CubeProgrammer binary path to your PATH environment variable
export PATH=$HOME/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-2.0.0/bin:$PATH
  • Check that the STM32CubeProgrammer tool is properly installed and accessible
 STM32_Programmer_CLI --h
     -------------------------------------------------------------------
                       STM32CubeProgrammer v2.0.0                  
     -------------------------------------------------------------------

3.2. USB serial link[edit source]

  • Install the libusb on your host computer
 sudo apt-get install libusb-1.0-0
  • To allow STM32CubeProgrammer to access the USB port through low-level commands, proceed as follows
 cd $HOME/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-2.0.0/Drivers/rules
 sudo cp *.* /etc/udev/rules.d/

4. Download the image[edit source]

  • Create your STM32MP15 Starter Package directory on your host computer
 mkdir $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0
 mkdir $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package
 cd $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package
  • Download the STM32MP15-Ecosystem-v1.0.0 Starter Package in the $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package directory
  • Uncompress the tarball file to get the binaries for the different partitions of the image, and the Flash layout files
 tar xvf FLASH-stm32mp1-openstlinux-4.19-thud-mp1-19-02-20.tar.xz

5. Populate the SDCard[edit source]

  • Set the boot switches (located at the back of the board) to the off position
boot switches position to flash the board
  • Power up the board
  • Press the reset button to reset the board
  • Go to the Starter Package directory that contains the binaries and the Flash layout files
 cd $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-boards-revc-openstlinux-4.14-rocko-mp1-18-11-26/images/stm32mp1-boards-revc
  • Get the device port location for the USB link
 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
 STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
This operation takes several minutes (mainly depending of the rootfs size). A successful flashing outputs the following log:
Info white.png Information
Please note that the logs that you will obtain, might be slightly different, especially if you use a different software release.
      -------------------------------------------------------------------
                        STM32CubeProgrammer <tool version>
      -------------------------------------------------------------------



USB speed              : High Speed (480MBit/s)
Manufacturer ID        : STMicroelectronics
Product ID             : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
Serial number          : 000000000000
Firmware version       : 0x011a
Device ID              : 0x0500
 
   AREA NAME          SECT.NBR        PARTITION.ID    SIZE         TYPE
 
 
   Partition0           0000          0x00000000      0256 KB      RW

   SECBL                0000          0x00000001      0001 MB      RW

   Partition2           0000          0x00000002      0001 MB      RW

   Partition3           0000          0x00000003      0256 KB      RW

   Partition4           0000          0x00000004      0016 MB      RW

   virtual              0000          0x000000f1      0512 B       R

Device name : STM32MPxxx
Device type : MPU
Device CPU  : Cortex-A7


Start Embedded Flashing service



Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32
  File          : tf-a-stm32mp157c-dk2-trusted.stm32
  Size          : 228536 Bytes
  Partition ID  : 0x01 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:00:00.561

RUNNING Program ... 
  PartID:      :0x01 
Start operation done successfully at partition 0x01

Flashlayout Programming ...
[==================================================] 100% 
Running Flashlayout Partition ...
Flashlayout partition started successfully


Memory Programming ...
Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32
  File          : u-boot-stm32mp157c-dk2-trusted.stm32
  Size          : 722945 Bytes
  Partition ID  : 0x03 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:00:00.665

RUNNING Program ... 
  PartID:      :0x03 

reconnecting the device ...

USB speed              : High Speed (480MBit/s)
Manufacturer ID        : STMicroelectronics
Product ID             : USB download gadget@Device ID /0x500, @Revision ID /0x0000
Serial number          : 0000000000
Firmware version       : 0x0110
Device ID              : 0x0500
 
   AREA NAME          SECT.NBR        PARTITION.ID    SIZE         TYPE
 
 
   fsbl1                0000          0x00000001      0256 KB      RW

   fsbl2                0000          0x00000002      0256 KB      RW

   ssbl                 0000          0x00000003      0002 MB      RW

   bootfs               0000          0x00000011      0064 MB      RW

   rootfs               0000          0x00000012      0768 MB      RW

   userfs               0000          0x00000013      6846 MB      RW

   virtual              0000          0x000000f1      0512 B       RW

   OTP                  0000          0x000000f2      0512 B       RW

   PMIC                 0000          0x000000f4      0008 B       RW

Start operation done successfully at partition 0x03


Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32
  File          : tf-a-stm32mp157c-dk2-trusted.stm32
  Size          : 228536 Bytes
  Partition ID  : 0x01 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:00:00.097

RUNNING Program ... 
  PartID:      :0x01 
Start operation done successfully at partition 0x01


Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32
  File          : tf-a-stm32mp157c-dk2-trusted.stm32
  Size          : 228536 Bytes
  Partition ID  : 0x02 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:00:00.107

RUNNING Program ... 
  PartID:      :0x02 
Start operation done successfully at partition 0x02


Memory Programming ...
Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32
  File          : u-boot-stm32mp157c-dk2-trusted.stm32
  Size          : 722945 Bytes
  Partition ID  : 0x03 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:00:00.326

RUNNING Program ... 
  PartID:      :0x03 
Start operation done successfully at partition 0x03


Memory Programming ...
Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp1.ext4
  File          : st-image-bootfs-openstlinux-weston-stm32mp1.ext4
  Size          : 64 MBytes
  Partition ID  : 0x11 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:00:32.392

RUNNING Program ... 
  PartID:      :0x11 
Start operation done successfully at partition 0x11


Memory Programming ...
Opening and parsing file: st-image-weston-openstlinux-weston-stm32mp1.ext4
  File          : st-image-weston-openstlinux-weston-stm32mp1.ext4
  Size          : 507952 KBytes
  Partition ID  : 0x12 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:04:06.544

RUNNING Program ... 
  PartID:      :0x12 
Start operation done successfully at partition 0x12


Memory Programming ...
Opening and parsing file: st-image-userfs-openstlinux-weston-stm32mp1.ext4
  File          : st-image-userfs-openstlinux-weston-stm32mp1.ext4
  Size          : 64 MBytes
  Partition ID  : 0x13 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during the download operation is: 00:00:32.095

RUNNING Program ... 
  PartID:      :0x13 
Start operation done successfully at partition 0x13
Flashing service completed successfully

6. Boot the board[edit source]

  • Set the boot switches (located at the back of the board) to the on position
boot switches position to boot the board
  • Power up the board
  • Press the reset button to reset the board
  • After few seconds, the board starts and automatically go through the following screens
Error creating thumbnail: Unable to save thumbnail to destination
UBoot splash screen
Error creating thumbnail: Unable to save thumbnail to destination
Linux splash screen
Error creating thumbnail: Unable to save thumbnail to destination
Weston desktop
Error creating thumbnail: Unable to save thumbnail to destination
GTK demo launcher


Back button.png Overview button.png Next button.png