你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM32MP1安装入门包

[复制链接]
STMCU小助手 发布时间:2022-10-4 17:25
安装软件包
替换软件源为国内软件源

更新软件列表
  1. PC gt; sudo apt-get update
  2. PC gt; apt-get upgrade
复制代码

其他设置
设置mmc允许16个分区
默认情况下,在Linux系统上,mmc上最多允许8个分区。所有程序包(入门程序包,…)需要10个以上的分区用于存储设备。为了将每个设备的分区数扩展到16,必须在modprobe中添加以下选项:
  1. PC gt; echo 'options mmc_block perdev_minors=16' > /tmp/mmc_block.conf
  2. PC gt; sudo mv /tmp/mmc_block.conf /etc/modprobe.d/mmc_block.conf
复制代码

STM32CubeProgrammer
安装STM32CubeProgrammer

解压&安装程序
将en.stm32cubeprog.zip通过FTP拷贝到linux主机上,然后执行解压
  1. PC gt;unzip en.stm32cubeprog.zip
  2. ./SetupSTM32CubeProgrammer-2.2.0.linux
复制代码
解压完可在桌面环境中直接安装

添加PATH
  1. export PATH=<my STM32CubeProgrammer install directory>/bin:$PATH
  2. // for example
  3. export PATH=~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin:$PATH
复制代码

安装开发板USB驱动
安装驱动
  1. PC gt; sudo apt-get install libusb-1.0-0
复制代码
允许STM32CUBE访问USB设备
  1. PC gt; cd <your STM32CubeProgrammer install directory>/Drivers/rules
  2. PC gt; sudo cp *.* /etc/udev/rules.d/

  3. //for example
  4. cd ~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/Drivers/rules
  5. sudo cp *.* /etc/udev/rules.d/
复制代码

下载并烧录程序

将固件复制到linux主机
将新建固件包存放目录

  1. mkdir <working directory path>/Starter-Package
  2. cd <working directory path>/Starter-Package

  3. //for example
  4. mkdir ~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/Starter-Package
  5. cd ~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/Starter-Package
复制代码

将固件包en.FLASH-stm32mp1-openstlinux-4.19-thud-mp1-19-10-09.tar.xz通过FTP拷贝到上述目录
解压固件包

  1. tar xvf en.FLASH-stm32mp1-openstlinux-4.19-thud-mp1-19-10-09.tar.xz
复制代码

查看解压后的固件包, 二进制文件 和 Flash layout 文件 在< Starter Package installation directory>/openstlinux-4.19-thud-mp1-19-10-09/images/stm32mp1/目录下。

  1. stm32mp1
  2. ├── flashlayout_st-image-weston                                 Flash layout files (description of the partitions) for the supported Flash devices and boards
  3. │   ├── FlashLayout_sdcard_stm32mp157a-dk1-basic.tsv            Flash layout file for microSD card and basic boot chain → STM32MP15 Discovery kits
  4. │   ├── FlashLayout_sdcard_stm32mp157a-dk1-optee.tsv            Flash layout file for microSD card and optee boot chain → STM32MP15 Discovery kits
  5. │   ├── FlashLayout_sdcard_stm32mp157a-dk1-trusted.tsv          Flash layout file for microSD card and trusted boot chain (recommended setup) → STM32MP15 Discovery kits
  6. │   ├── FlashLayout_sdcard_stm32mp157c-dk2-basic.tsv            Flash layout file for microSD card and basic boot chain → STM32MP15 Discovery kits
  7. │   ├── FlashLayout_sdcard_stm32mp157c-dk2-optee.tsv            Flash layout file for microSD card and optee boot chain → STM32MP15 Discovery kits
  8. │   ├── FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv          Flash layout file for microSD card and trusted boot chain (recommended setup) → STM32MP15 Discovery kits
  9. │   ├── FlashLayout_emmc_stm32mp157c-ev1-optee.tsv              Flash layout file for eMMC and optee boot chain → STM32MP15 Evaluation boards
  10. │   ├── FlashLayout_emmc_stm32mp157c-ev1-trusted.tsv            Flash layout file for eMMC and trusted boot chain → STM32MP15 Evaluation boards
  11. │   ├── FlashLayout_nand-4-256_stm32mp157c-ev1-optee.tsv        Flash layout file for NAND Flash and optee boot chain → STM32MP15 Evaluation boards
  12. │   ├── FlashLayout_nand-4-256_stm32mp157c-ev1-trusted.tsv      Flash layout file for NAND Flash and trusted boot chain → STM32MP15 Evaluation boards
  13. │   ├── FlashLayout_nor-emmc_stm32mp157c-ev1-optee.tsv          Flash layout file for NOR Flash (and eMMC) and optee boot chain → STM32MP15 Evaluation boards
  14. │   ├── FlashLayout_nor-emmc_stm32mp157c-ev1-trusted.tsv        Flash layout file for NOR Flash (and eMMC) and trusted boot chain → STM32MP15 Evaluation boards
  15. │   ├── FlashLayout_nor-nand-4-256_stm32mp157c-ev1-optee.tsv    Flash layout file for NOR Flash (and NAND Flasdh) and optee boot chain → STM32MP15 Evaluation boards
  16. │   ├── FlashLayout_nor-nand-4-256_stm32mp157c-ev1-trusted.tsv  Flash layout file for NOR Flash (and NAND Flasdh) and trusted boot chain → STM32MP15 Evaluation boards
  17. │   ├── FlashLayout_nor-sdcard_stm32mp157c-ev1-optee.tsv        Flash layout file for NOR Flash (and microSD card) and optee boot chain → STM32MP15 Evaluation boards
  18. │   ├── FlashLayout_nor-sdcard_stm32mp157c-ev1-trusted.tsv      Flash layout file for NOR Flash (and microSD card) and trusted boot chain → STM32MP15 Evaluation boards
  19. │   ├── FlashLayout_sdcard_stm32mp157c-ev1-basic.tsv            Flash layout file for microSD card and basic boot chain → STM32MP15 Evaluation boards
  20. │   ├── FlashLayout_sdcard_stm32mp157c-ev1-optee.tsv            Flash layout file for microSD card and optee boot chain → STM32MP15 Evaluation boards
  21. │   └── FlashLayout_sdcard_stm32mp157c-ev1-trusted.tsv          Flash layout file for microSD card and trusted boot chain (recommended setup) → STM32MP15 Evaluation boards
  22. ├── scripts
  23. │   └── create_sdcard_from_flashlayout.sh
  24. ├── st-image-bootfs-openstlinux-weston-stm32mp1.ext4            Binary for bootfs partition
  25. ├── st-image-bootfs-openstlinux-weston-stm32mp1.manifest
  26. ├── st-image-userfs-openstlinux-weston-stm32mp1.ext4            Binary for userfs partition
  27. ├── st-image-userfs-openstlinux-weston-stm32mp1.manifest
  28. ├── st-image-vendorfs-openstlinux-weston-stm32mp1.ext4          Binary for vendorfs partition
  29. ├── st-image-vendorfs-openstlinux-weston-stm32mp1.manifest
  30. ├── st-image-weston-openstlinux-weston-stm32mp1.ext4            Binary for rootfs partition
  31. ├── st-image-weston-openstlinux-weston-stm32mp1.license
  32. ├── st-image-weston-openstlinux-weston-stm32mp1-license_content.html
  33. ├── st-image-weston-openstlinux-weston-stm32mp1.manifest
  34. ├── st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
  35. ├── tee-header_v2-stm32mp157a-dk1-optee.stm32
  36. ├── tee-header_v2-stm32mp157c-dk2-optee.stm32
  37. ├── tee-header_v2-stm32mp157c-ev1-optee.stm32
  38. ├── tee-pageable_v2-stm32mp157a-dk1-optee.stm32
  39. ├── tee-pageable_v2-stm32mp157c-dk2-optee.stm32
  40. ├── tee-pageable_v2-stm32mp157c-ev1-optee.stm32
  41. ├── tee-pager_v2-stm32mp157a-dk1-optee.stm32
  42. ├── tee-pager_v2-stm32mp157c-dk2-optee.stm32
  43. ├── tee-pager_v2-stm32mp157c-ev1-optee.stm32
  44. ├── tf-a-stm32mp157c-dk1-optee.stm32                            TF-A binary for FSBL partition (optee boot chain) → STM32MP15 Discovery kits
  45. ├── tf-a-stm32mp157c-dk1-trusted.stm32                          TF-A binary for FSBL partition (trusted boot chain) → STM32MP15 Discovery kits
  46. ├── tf-a-stm32mp157c-dk2-optee.stm32                            TF-A binary for FSBL partition (optee boot chain) → STM32MP15 Discovery kits
  47. ├── tf-a-stm32mp157c-dk2-trusted.stm32                          TF-A binary for FSBL partition (trusted boot chain) → STM32MP15 Discovery kits
  48. ├── tf-a-stm32mp157c-ev1-optee.stm32                            TF-A binary for FSBL partition (optee boot chain) → STM32MP15 Evaluation boards
  49. ├── tf-a-stm32mp157c-ev1-trusted.stm32                          TF-A binary for FSBL partition (trusted boot chain) → STM32MP15 Evaluation boards
  50. ├── u-boot-spl.stm32-stm32mp157c-dk1-basic                      U-Boot binary for FSBL partition (basic boot chain) → STM32MP15 Discovery kits
  51. ├── u-boot-spl.stm32-stm32mp157c-dk2-basic                      U-Boot binary for FSBL partition (basic boot chain) → STM32MP15 Discovery kits
  52. ├── u-boot-spl.stm32-stm32mp157c-ev1-basic                      U-Boot binary for FSBL partition (basic boot chain) → STM32MP15 Evaluation boards
  53. ├── u-boot-stm32mp157c-dk1-basic.img                            U-Boot binary for SSBL partition (basic boot chain) → STM32MP15 Discovery kits
  54. ├── u-boot-stm32mp157c-dk1-trusted.stm32                        U-Boot binary for SSBL partition (trusted boot chain) → STM32MP15 Discovery kits
  55. ├── u-boot-stm32mp157c-dk1-optee.stm32                          U-Boot binary for SSBL partition (optee boot chain) → STM32MP15 Discovery kits
  56. ├── u-boot-stm32mp157c-dk2-basic.img                            U-Boot binary for SSBL partition (basic boot chain) → STM32MP15 Discovery kits
  57. ├── u-boot-stm32mp157c-dk2-trusted.stm32                        U-Boot binary for SSBL partition (trusted boot chain) → STM32MP15 Discovery kits
  58. ├── u-boot-stm32mp157c-dk2-optee.stm32                          U-Boot binary for SSBL partition (optee boot chain) → STM32MP15 Discovery kits
  59. ├── u-boot-stm32mp157c-ev1-basic.img                            U-Boot binary for SSBL partition (basic boot chain) → STM32MP15 Evaluation boards
  60. ├── u-boot-stm32mp157c-ev1-trusted.stm32                        U-Boot binary for SSBL partition (trusted boot chain) → STM32MP15 Evaluation boards
  61. └── u-boot-stm32mp157c-ev1-optee.stm32                          U-Boot binary for SSBL partition (optee boot chain) → STM32MP15 Evaluation boards
复制代码

烧录固件到STM32MP1
烧录按照如下流程:
1.将开发板BOOT0,BOOT2拨码开关拨到OFF位置
2.使用type-C OTG(HDMI旁边的type-C)将开发板连接到主机
3.插入microSD卡
4.使用type-C POWER(RJ45旁边的type-C)给开发板供电(建议@5V3A)
5.按下开发板RESET按键,复位开发板
6.主机切换到固件包目录下
  1. PC gt; cd <Starter Package installation directory>/stm32mp1-openstlinux-4.19-thud-mp1-19-10-09/images/stm32mp1
  2. //for example
  3. PC gt;cd ~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-10-09/images/stm32mp1
复制代码

7.检查STM32CubeProgrammer是否安装成功
  1. PC gt;STM32_Programmer_CLI --h
  2.       -------------------------------------------------------------------
  3.                         STM32CubeProgrammer v2.2.0                  
  4.       -------------------------------------------------------------------
复制代码

8.获取本地USB端口
  1. PC gt;STM32_Programmer_CLI -l usb
  2.       -------------------------------------------------------------------
  3.                         STM32CubeProgrammer v2.2.0                  
  4.       -------------------------------------------------------------------

  5. =====  DFU Interface   =====

  6. Total number of available STM32 device in DFU mode: 1

  7.   Device Index           : USB1
  8.   USB Bus Number         : 001
  9.   USB Address Number     : 001
  10.   Product ID             : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
  11.   Serial number          : 001700293338510A39303435
  12.   Firmware version       : 0x0110
  13.   Device ID              : 0x0500
复制代码

9.烧写固件
  1. PC gt; STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157a-dk1-trusted.tsv
  2.       -------------------------------------------------------------------
  3.                         STM32CubeProgrammer v2.2.0                  
  4.       -------------------------------------------------------------------



  5. USB speed   : High Speed (480MBit/s)
  6. Manuf. ID   : STMicroelectronics
  7. Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
  8. SN          : 001700293338510A39303435
  9. FW version  : 0x0110
  10. Device ID   : 0x0500
  11. Device name : STM32MPxxx
  12. Device type : MPU
  13. Device CPU  : Cortex-A7


  14. Start Embedded Flashing service



  15. Memory Programming ...
  16. Opening and parsing file: tf-a-stm32mp157a-dk1-trusted.stm32
  17.   File          : tf-a-stm32mp157a-dk1-trusted.stm32
  18.   Size          : 245364 Bytes
  19.   Partition ID  : 0x01

  20. Download in Progress:
  21. [==================================================] 100%

  22. File download complete
  23. Time elapsed during download operation: 00:00:01.960

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

  27. Flashlayout Programming ...
  28. [==================================================] 100%
  29. Running Flashlayout Partition ...
  30. Flashlayout partition started successfully


  31. Memory Programming ...
  32. Opening and parsing file: u-boot-stm32mp157a-dk1-trusted.stm32
  33.   File          : u-boot-stm32mp157a-dk1-trusted.stm32
  34.   Size          : 803725 Bytes
  35.   Partition ID  : 0x03

  36. Download in Progress:
  37. [==================================================] 100%

  38. File download complete
  39. Time elapsed during download operation: 00:00:06.051

  40. RUNNING Program ...
  41.   PartID:      :0x03

  42. reconnecting the device ...

  43. USB speed   : High Speed (480MBit/s)
  44. Manuf. ID   : STMicroelectronics
  45. Product ID  : USB download gadget@Device ID /0x500, @Revision ID /0x0000
  46. SN          : 001700293338510A39303435
  47. FW version  : 0x0110
  48. Device ID   : 0x0500
  49. Start operation done successfully at partition 0x03


  50. Memory Programming ...
  51. Opening and parsing file: tf-a-stm32mp157a-dk1-trusted.stm32
  52.   File          : tf-a-stm32mp157a-dk1-trusted.stm32
  53.   Size          : 245364 Bytes
  54.   Partition ID  : 0x04

  55. Download in Progress:
  56. [==================================================] 100%

  57. File download complete
  58. Time elapsed during download operation: 00:00:00.421

  59. RUNNING Program ...
  60.   PartID:      :0x04
  61. Start operation done successfully at partition 0x04


  62. Memory Programming ...
  63. Opening and parsing file: tf-a-stm32mp157a-dk1-trusted.stm32
  64.   File          : tf-a-stm32mp157a-dk1-trusted.stm32
  65.   Size          : 245364 Bytes
  66.   Partition ID  : 0x05

  67. Download in Progress:
  68. [==================================================] 100%

  69. File download complete
  70. Time elapsed during download operation: 00:00:00.414

  71. RUNNING Program ...
  72.   PartID:      :0x05
  73. Start operation done successfully at partition 0x05


  74. Memory Programming ...
  75. Opening and parsing file: u-boot-stm32mp157a-dk1-trusted.stm32
  76.   File          : u-boot-stm32mp157a-dk1-trusted.stm32
  77.   Size          : 803725 Bytes
  78.   Partition ID  : 0x06

  79. Download in Progress:
  80. [==================================================] 100%

  81. File download complete
  82. Time elapsed during download operation: 00:00:01.355

  83. RUNNING Program ...
  84.   PartID:      :0x06
  85. Start operation done successfully at partition 0x06


  86. Memory Programming ...
  87. Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp1.ext4
  88.   File          : st-image-bootfs-openstlinux-weston-stm32mp1.ext4
  89.   Size          : 64 MBytes
  90.   Partition ID  : 0x21

  91. Download in Progress:
  92. [==================================================] 100%

  93. File download complete
  94. Time elapsed during download operation: 00:02:01.382

  95. RUNNING Program ...
  96.   PartID:      :0x21
  97. Start operation done successfully at partition 0x21


  98. Memory Programming ...
  99. Opening and parsing file: st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
  100.   File          : st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
  101.   Size          : 16 MBytes
  102.   Partition ID  : 0x22

  103. Download in Progress:
  104. [==================================================] 100%

  105. File download complete
  106. Time elapsed during download operation: 00:00:30.362

  107. RUNNING Program ...
  108.   PartID:      :0x22
  109. Start operation done successfully at partition 0x22


  110. Memory Programming ...
  111. Opening and parsing file: st-image-weston-openstlinux-weston-stm32mp1.ext4
  112.   File          : st-image-weston-openstlinux-weston-stm32mp1.ext4
  113.   Size          : 512996 KBytes
  114.   Partition ID  : 0x23

  115. Download in Progress:
  116. [==================================================] 100%

  117. File download complete
  118. Time elapsed during download operation: 00:16:31.909

  119. RUNNING Program ...
  120.   PartID:      :0x23
  121. Start operation done successfully at partition 0x23


  122. Memory Programming ...
  123. Opening and parsing file: st-image-userfs-openstlinux-weston-stm32mp1.ext4
  124.   File          : st-image-userfs-openstlinux-weston-stm32mp1.ext4
  125.   Size          : 97807 KBytes
  126.   Partition ID  : 0x24

  127. Download in Progress:
  128. [==================================================] 100%

  129. File download complete
  130. Time elapsed during download operation: 00:03:03.245

  131. RUNNING Program ...
  132.   PartID:      :0x24
  133. Start operation done successfully at partition 0x24
  134. Flashing service completed successfully
复制代码

启动开发板

1.将BOOT0,BOOT2拨到ON
2.连接鼠标键盘
3.连接电源
4.插入microSD卡
5.插入网线
6.插入microUSB,连接主机和开发板
7.插入HDMI连接显示器
8.按下复位按键,启动开发板
————————————————
版权声明:IntelligeWither

收藏 评论0 发布时间:2022-10-4 17:25

举报

0个回答

所属标签

相似分享

官网相关资源

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版