Minimal bringup repository for the STM32MP157F-DK2 — everything needed to bring the board to life with no excess.
This repository contains the bare-minimum source to initialize and run the STM32MP157F-DK2 heterogeneous platform:
- CA7 side — Device Tree sources for the Cortex-A7 Linux core
- CM4 side — Firmware for the Cortex-M4 real-time core
- Drivers — Peripheral and HAL drivers
- OpenAMP middleware — Inter-processor communication between the A7 and M4 cores
The goal is a clean, reproducible starting point — no bloat, no assumptions beyond what the silicon requires.
defaultdk2/
├── CA7/
│ └── DeviceTree/
│ └── defaultdk2/ # Device Tree sources for the A7 Linux core
├── CM4/ # Cortex-M4 firmware project
├── Drivers/ # HAL and peripheral drivers
└── Middlewares/
└── Third_Party/
└── OpenAMP/ # OpenAMP IPC middleware
| Property | Value |
|---|---|
| Board | STM32MP157F-DK2 |
| SoC | STM32MP157F |
| A7 Core | Dual Cortex-A7 @ 800 MHz |
| M4 Core | Cortex-M4 @ 209 MHz |
| IPC | OpenAMP (RPMsg) |
The CA7/DeviceTree/defaultdk2/ directory contains the .dts / .dtsi sources describing the board's hardware layout for the Linux kernel running on the Cortex-A7.
Build the DTB as part of your Yocto/BitBake flow or manually with:
dtc -I dts -O dtb -o stm32mp157f-dk2.dtb stm32mp157f-dk2.dtsThe CM4/ directory contains the Cortex-M4 firmware. It is designed to be loaded by the A7 via the remoteproc framework at runtime.
Flash or load via remoteproc:
# Copy firmware to the remoteproc firmware directory on the target
cp CM4/build/defaultdk2_CM4.elf /lib/firmware/
# Start the M4 core
echo defaultdk2_CM4.elf > /sys/class/remoteproc/remoteproc0/firmware
echo start > /sys/class/remoteproc/remoteproc0/stateInter-processor communication between the A7 and M4 uses OpenAMP with RPMsg channels. The middleware sources in Middlewares/Third_Party/OpenAMP/ are built into both the CM4 firmware and consumed by the Linux remoteproc/rpmsg stack on the A7 side.
| Tool | Purpose |
|---|---|
| STM32CubeIDE / arm-none-eabi-gcc | CM4 firmware build |
Yocto / BitBake (or standalone dtc) |
CA7 Device Tree build |
| OpenSTLinux or custom Linux image | A7 runtime |
| STM32CubeProgrammer | Initial flashing |
- Clone this repository.
- Build the CM4 firmware using STM32CubeIDE or your preferred ARM toolchain.
- Integrate or replace the Device Tree in your Linux build.
- Flash the board and boot — the M4 core can be started via remoteproc post-boot.
See individual file headers for applicable STMicroelectronics and open-source licenses.