cancel
Showing results for 
Search instead for 
Did you mean: 

PROBLEM: first boot STM32MP257F-EV1

Zim
Associate II

I'm trying to perform the first boot on the STM32MP257F-EV1 following this guide: STM32MP25 Evaluation boards - Starter Package. 

 

I've connected the LCD screen to the board according to the instructions.

The board is powered by USB-C on CN21, and the status LEDs are as follows:

  • LD11 green
  • LD6 green
  • LD5 blinks

I've tried to flash the microSD card (SANDISK 16GB) using both methods provided in the guide.

 

6.2. Image flashing ( STM32CubeProgrammer tool  DFU mode)

I've followed all the steps and got the following messages:

 

stm32mp2$  STM32_Programmer_CLI -l usb
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.17.0                  
      -------------------------------------------------------------------

=====  DFU Interface   =====

Total number of available STM32 device in DFU mode: 1

  Device Index           : USB1
  USB Bus Number         : 001
  USB Address Number     : 002
  Product ID             : DFU in HS Mode @Device ID /0x505, @Revision ID /0x100
  Serial number          : 002700243836500600343046
  Firmware version       : 0x0110
  Device ID              : 0x0505



stm32mp2$  STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-ev1-optee.tsv
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.17.0                  
      -------------------------------------------------------------------



USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x505, @Revision ID /0x100
SN          : 002700243836500600343046
DFU protocol: 1.1
Board       : --
Device ID   : 0x0505
Device name : STM32MP25xx
Device type : MPU
Revision ID : --  
Device CPU  : Cortex-A35

Start Embedded Flashing service



Memory Programming ...
Opening and parsing file: tf-a-stm32mp257f-ev1-usb.stm32
  File          : tf-a-stm32mp257f-ev1-usb.stm32
  Size          : 198,86 KB 
  Partition ID  : 0x01 

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

Error: failed to download Segment[0]
Error: failed to download the File
Error: Download partition 0x01 failed
Error: TSV flashing service failed

 

Image flashing via raw image

commands:

  • DEVICE=sdf ./scripts/create_sdcard_from_flashlayout.sh flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-ev1-optee.tsv 

 

(NOTE: the command in the guide uses a different file: 'FlashLayout_sdcard_stm32mp257c-ev1-optee.tsv'.  I replaced it with '.../FlashLayout_sdcard_stm32mp257f-ev1-optee.tsv')

 

  • sudo dd if=FlashLayout_sdcard_stm32mp257f-ev1-optee.raw of=/dev/sdf bs=8M conv=fdatasync status=progress

 

stm32mp2$ DEVICE=sdf ./scripts/create_sdcard_from_flashlayout.sh flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-ev1-optee.tsv
Create Raw empty image: flashlayout_st-image-weston/optee/../../FlashLayout_sdcard_stm32mp257f-ev1-optee.raw of 5120MB
Create partition table:
[CREATED] part 01:     fsbla1 [partition size 256.0 KiB]
[CREATED] part 02:     fsbla2 [partition size 256.0 KiB]
[CREATED] part 03:  metadata1 [partition size 256.0 KiB]
[CREATED] part 04:  metadata2 [partition size 256.0 KiB]
[CREATED] part 05:      fip-a [partition size 4.0 MiB]
[CREATED] part 06:      fip-b [partition size 4.0 MiB]
[CREATED] part 07: u-boot-env [partition size 512.0 KiB]
[CREATED] part 08:     bootfs [partition size 64.0 MiB]
[CREATED] part 09:   vendorfs [partition size 183.0 MiB]
[CREATED] part 10:     rootfs [partition size 4.0 GiB]
[CREATED] part 11:     userfs [partition size 767.5 MiB]

Partition table from flashlayout_st-image-weston/optee/../../FlashLayout_sdcard_stm32mp257f-ev1-optee.raw
Disk flashlayout_st-image-weston/optee/../../FlashLayout_sdcard_stm32mp257f-ev1-optee.raw: 10485760 sectors, 5.0 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 35B640E0-AECC-43B6-B605-149569AF959B
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 10485726
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34             545   256.0 KiB   8301  fsbla1
   2             546            1057   256.0 KiB   8301  fsbla2
   3            1058            1569   256.0 KiB   FFFF  metadata1
   4            1570            2081   256.0 KiB   FFFF  metadata2
   5            2082           10273   4.0 MiB     FFFF  fip-a
   6           10274           18465   4.0 MiB     FFFF  fip-b
   7           18466           19489   512.0 KiB   FFFF  u-boot-env
   8           19490          150561   64.0 MiB    8300  bootfs
   9          150562          525345   183.0 MiB   8300  vendorfs
  10          525346         8913953   4.0 GiB     8300  rootfs
  11         8913954        10485726   767.5 MiB   8300  userfs

Partition GUID code: 19D5DF83-11B0-457B-BE2C-7559C13142A5 (Unknown)
Partition unique GUID: 4FD84C93-54EF-463F-A7EF-AE25FF887087
First sector: 2082 (at 1.0 MiB)
Last sector: 10273 (at 5.0 MiB)
Partition size: 8192 sectors (4.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'fip-a'

Partition GUID code: 19D5DF83-11B0-457B-BE2C-7559C13142A5 (Unknown)
Partition unique GUID: 09C54952-D5BF-45AF-ACEE-335303766FB3
First sector: 10274 (at 5.0 MiB)
Last sector: 18465 (at 9.0 MiB)
Partition size: 8192 sectors (4.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'fip-b'

Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: E91C4E10-16E6-4C0E-BD0E-77BECF4A3582
First sector: 525346 (at 256.5 MiB)
Last sector: 8913953 (at 4.3 GiB)
Partition size: 8388608 sectors (4.0 GiB)
Attribute flags: 0000000000000000
Partition name: 'rootfs'

Populate raw image with image content:
part 01:     fsbla1, image: arm-trusted-firmware/tf-a-stm32mp257f-ev1-optee-sdca[ FILLED ] part 01:     fsbla1, image: arm-trusted-firmware/tf-a-stm32mp257f-ev1-optee-sdcard.stm32 
part 02:     fsbla2, image: arm-trusted-firmware/tf-a-stm32mp257f-ev1-optee-sdca[ FILLED ] part 02:     fsbla2, image: arm-trusted-firmware/tf-a-stm32mp257f-ev1-optee-sdcard.stm32 
[ FILLED ] part 03:  metadata1, image: arm-trusted-firmware/metadata.bin 
[ FILLED ] part 04:  metadata2, image: arm-trusted-firmware/metadata.bin 
[ FILLED ] part 05:      fip-a, image: fip/fip-stm32mp257f-ev1-optee-sdcard.bin 
[ FILLED ] part 08:     bootfs, image: st-image-bootfs-openstlinux-weston-stm32mp2.ext4 
part 09:   vendorfs, image: st-image-vendorfs-openstlinux-weston-stm32mp2.ext4 .[ FILLED ] part 09:   vendorfs, image: st-image-vendorfs-openstlinux-weston-stm32mp2.ext4 
[ FILLED ] part 10:     rootfs, image: st-image-weston-openstlinux-weston-stm32mp2.ext4 
[ FILLED ] part 11:     userfs, image: st-image-userfs-openstlinux-weston-stm32mp2.ext4 

###########################################################################
###########################################################################

RAW IMAGE generated: flashlayout_st-image-weston/optee/../../FlashLayout_sdcard_stm32mp257f-ev1-optee.raw

WARNING: before to use the command dd, please umount all the partitions
	associated to SDCARD.
    sudo umount `lsblk --list | grep sdf | grep part | gawk '{ print $7 }' | tr '\n' ' '`

To put this raw image on sdcard:
    sudo dd if=flashlayout_st-image-weston/optee/../../FlashLayout_sdcard_stm32mp257f-ev1-optee.raw of=/dev/sdf bs=8M conv=fdatasync status=progress

(sdf can be replaced by:
     sdX if it's a device dedicated to receive the raw image 
          (where X can be a, b, c, d, e)

To mount bootfs partition:
     udisksctl mount -b /dev/disk/by-partlabel/bootfs

After the dd command you can verify if copy are correctly done and partitions take into account
     sgdisk /dev/sdf -p
     sgdisk /dev/sdf -v
if '-v' command indicate a problem, please execute the following command:
     sgdisk /dev/sdf -e

###########################################################################
###########################################################################


stm32mp2$  sudo umount `lsblk --list | grep sdf | grep part | gawk '{ print $7 }' | tr '\n' ' '`

stm32mp2$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0     7:0    0     4K  1 loop /snap/bare/5
loop2     7:2    0 310,3M  1 loop /snap/code/164
loop3     7:3    0  63,9M  1 loop /snap/core20/2264
loop4     7:4    0  63,9M  1 loop /snap/core20/2318
loop5     7:5    0  74,2M  1 loop /snap/core22/1122
loop6     7:6    0  74,2M  1 loop /snap/core22/1380
loop7     7:7    0   497M  1 loop /snap/gnome-42-2204/141
loop8     7:8    0 505,1M  1 loop /snap/gnome-42-2204/176
loop9     7:9    0  91,7M  1 loop /snap/gtk-common-themes/1535
loop10    7:10   0  38,7M  1 loop /snap/snapd/21465
loop11    7:11   0   452K  1 loop /snap/snapd-desktop-integration/83
loop12    7:12   0  38,8M  1 loop /snap/snapd/21759
loop13    7:13   0    16K  1 loop /snap/software-boutique/57
loop14    7:14   0  13,5M  1 loop /snap/ubuntu-mate-welcome/726
loop15    7:15   0   476K  1 loop /snap/snapd-desktop-integration/157
loop16    7:16   0   313M  1 loop /snap/code/165
sda       8:0    0   300G  0 disk 
├─sda1    8:1    0   476M  0 part /boot/efi
└─sda2    8:2    0 299,5G  0 part /
sdb       8:16   1     0B  0 disk 
sdc       8:32   1     0B  0 disk 
sdd       8:48   1     0B  0 disk 
sde       8:64   1     0B  0 disk 
sdf       8:80   1  14,8G  0 disk 
├─sdf1    8:81   1   256K  0 part 
├─sdf2    8:82   1   256K  0 part 
├─sdf3    8:83   1   256K  0 part 
├─sdf4    8:84   1   256K  0 part 
├─sdf5    8:85   1     4M  0 part 
├─sdf6    8:86   1     4M  0 part 
├─sdf7    8:87   1   512K  0 part 
├─sdf8    8:88   1    64M  0 part 
├─sdf9    8:89   1   183M  0 part 
├─sdf10   8:90   1     4G  0 part 
└─sdf11   8:91   1 767,5M  0 part 
sr0      11:0    1  50,4M  0 rom  /media/developer/VBox_GAs_7.0.18


stm32mp2$ sudo dd if=FlashLayout_sdcard_stm32mp257f-ev1-optee.raw of=/dev/sdf bs=8M conv=fdatasync status=progress
5360320512 bytes (5,4 GB, 5,0 GiB) copied, 131 s, 40,9 MB/s
dd: fdatasync failed for '/dev/sdf': Input/output error
640+0 records in
640+0 records out
5368709120 bytes (5,4 GB, 5,0 GiB) copied, 269,425 s, 19,9 MB/s

stm32mp2$ sudo sgdisk /dev/sdf -p
[sudo] password for developer: 
Disk /dev/sdf: 31116288 sectors, 14.8 GiB
Model: STORAGE DEVICE  
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 35B640E0-AECC-43B6-B605-149569AF959B
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 10485726
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34             545   256.0 KiB   8301  fsbla1
   2             546            1057   256.0 KiB   8301  fsbla2
   3            1058            1569   256.0 KiB   FFFF  metadata1
   4            1570            2081   256.0 KiB   FFFF  metadata2
   5            2082           10273   4.0 MiB     FFFF  fip-a
   6           10274           18465   4.0 MiB     FFFF  fip-b
   7           18466           19489   512.0 KiB   FFFF  u-boot-env
   8           19490          150561   64.0 MiB    8300  bootfs
   9          150562          525345   183.0 MiB   8300  vendorfs
  10          525346         8913953   4.0 GiB     8300  rootfs
  11         8913954        10485726   767.5 MiB   8300  userfs

stm32mp2$ sudo sgdisk /dev/sdf -v
Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Identified 1 problems!
stm32mp2$ sudo sgdisk /dev/sdf -e
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.

 

After that, I set the switches as described in the guide and inserted the microSD card into the board.

However, nothing happens when I power the board.

Could you please help me?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Zim 

Thanks for information. 

It confirm you have a RevZ board, distributed during alpha program, no longer supported with the official 5.1 release. 

Please get back to your local ST contact to get a new board.

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @Zim ,

 

Following the message : 

dd: fdatasync failed for '/dev/sdf': Input/output error

It's possible that the sdcard is broken : did you tried with another sdcard ?

 

Can you provide exact reference of your board? 

 

BR,

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Olivier GALLIEN ,

 

I don't think my SD card is broken because I was able to flash it with an image for a different board, and it worked.

I' m using a 16 GB SanDisk microSD card with the following markings on it:

sandisk_specs.png

 

Here is the procedure without the error: 

 

Downloads$ sudo dd if=FlashLayout_sdcard_stm32mp257f-ev1-optee.raw of=/dev/sdf bs=8M conv=fdatasync status=progress
5360320512 bytes (5,4 GB, 5,0 GiB) copied, 130 s, 41,1 MB/s
640+0 records in
640+0 records out
5368709120 bytes (5,4 GB, 5,0 GiB) copied, 268,128 s, 20,0 MB/s

Downloads$ sudo sgdisk /dev/sdf -p
Disk /dev/sdf: 31116288 sectors, 14.8 GiB
Model: STORAGE DEVICE  
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): B751593F-35C7-4191-BB2F-FA4C55524570
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 10485726
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34             545   256.0 KiB   8301  fsbla1
   2             546            1057   256.0 KiB   8301  fsbla2
   3            1058            1569   256.0 KiB   FFFF  metadata1
   4            1570            2081   256.0 KiB   FFFF  metadata2
   5            2082           10273   4.0 MiB     FFFF  fip-a
   6           10274           18465   4.0 MiB     FFFF  fip-b
   7           18466           19489   512.0 KiB   FFFF  u-boot-env
   8           19490          150561   64.0 MiB    8300  bootfs
   9          150562          525345   183.0 MiB   8300  vendorfs
  10          525346         8913953   4.0 GiB     8300  rootfs
  11         8913954        10485726   767.5 MiB   8300  userfs

Downloads$ sudo sgdisk /dev/sdf -v

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Identified 1 problems!

developer@mb-linux-vm006:Downloads$ sudo sgdisk /dev/sdf -e
The operation has completed successfully.

 

 

 

Things I've already tried to do:

  • I tried to re-download the entire package, but the problem still occurs.
  • I tried using both USB-C and an external power supply (Bench Power Supply 5V-3A) with the correct jumper position in JP4 (LD11 is on).

 

What do you mean with exact reference of the board?

Hi @Zill 

I mean marking on Board (MB1936?) and the letter end of second line on SoC (Z, B or Y) 

When did you get your board and from who ? 

Thanks 

Olivier 

 

 

 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

HI @Olivier GALLIEN ,

 

  • MB1936A

 

  • the SOC on the board(U27)has the following markings:

             ES2MP257FAI3

             HP AJB 9R Z

 

  • The board is an early free sample from ST, sent at the start of the year.

Hi @Zim 

Thanks for information. 

It confirm you have a RevZ board, distributed during alpha program, no longer supported with the official 5.1 release. 

Please get back to your local ST contact to get a new board.

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you a lot @Olivier GALLIEN.

 

Zim