cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157 custom board, linux build tutorial

jaehoon
Associate II

Is there a tutorial for newbie? I made my custom board by myself as hobby.

KakaoTalk_20250304_223414540.jpgKakaoTalk_20250304_223414540_01.jpgKakaoTalk_20250304_223414540_02.jpgKakaoTalk_20250304_223414540_03.jpg

the board has switches to select boot 0 and boot 1, boot 2 is tied to ground through 10k resistor. so I could implement boot selector that switches between `00` flashing mode, `01` serial NOR, `10` NAND, `11` eMMC on SDMMC2. and I tested the MPU could run as DFU mode and I could see it in Cube Programmer tool.

but I can not get understood how can I flash linux to my board

exactly, I could build linux using yocto but, where should I put my DTS files that generated by Cube IDE?

I'm under WSL2 environment to build yocto. unfortunately, I'm not expert of linux kernel :(

 

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @jaehoon ,

Doing such a project as hobby is really impressive! 

Main documentation point is our wiki : 

stm32mpu 

Seems you don't experiment with one ST evaluation board. It would really help. 

Be aware that Yocto build is not fully support on WSL2. We really recommand to use a Linux station. 

Before to flash it's mandatory to build binary suited to your hardware

You can consider these articles 

FAQ: STM32MP1 How to bring up STM32MP1 - STMicroelectronics Community

FAQ: STM32MPUs: How to create a device tree adapte... - STMicroelectronics Community 

How to compile the device tree with the Distribution Package - stm32mpu 

Hope it help 

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.

Hello, I built FIP artifacts following wiki, `STM32MPU Developer Package`, 5.2. Installing the OpenSTLinux BSP packages.

And I could get binary files:

1. TF-A binary: tf-a-stm32mp157d-smp4-mx-optee-emmc.stm32
2. OPTEE binary: tee-*.bin files
3. u-boot binary: u-boot{,-nodtb,-dtb}.bin files

I did not build linux kernel yet. I want to check PMIC's 1.35v output in current step, because I've read somewhere in ST wiki that works when TF-A is flashed.

But Cube Programmer disconnected from the device before doing something.  <-- This was soldering problem. after resoldering, its fixed.

and even more, eMMC is not detected in cube programmer.

 

 

10:12:34 : UR connection mode is defined with the HWrst reset mode
10:12:35 : USB speed   : High Speed (480MBit/s)
10:12:35 : Manuf. ID   : STMicroelectronics
10:12:35 : Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
10:12:35 : SN          : 003B00413432510735313430
10:12:35 : DFU protocol: 1.1
10:12:35 : Board       : --
10:12:35 : Device ID   : 0x0500
10:12:36 : Warning: Connection to device 0x500 is lost
10:12:36 : Disconnected from device.
10:12:38 : UR connection mode is defined with the HWrst reset mode
10:12:39 : USB speed   : High Speed (480MBit/s)
10:12:39 : Manuf. ID   : STMicroelectronics
10:12:39 : Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
10:12:39 : SN          : 003B00413432510735313430
10:12:39 : DFU protocol: 1.1
10:12:39 : Board       : --
10:12:39 : Device ID   : 0x0500
10:12:43 : Disconnected from device.

 

 

 

I can not trace which step is wrong. I'll go home this evening and solder one more board to see if it's a soldering issue, but any help I can get in tracking down where the problem is coming.

 

Schematics:

STM32_Q1.pngSTM32_Q2.pngSTM32_Q3.png

 

---

eMMC recognition problem.

partitions.png

 

No partitions are related for eMMC. should I flash first partition and FSBL?

Or how can I check this problem?

@Olivier GALLIEN