STM32MPU Developer Package
下载source code(从官网下载) - https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package
下载以下两个压缩包


SDK-x86_64-stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.tar.gz
en.SOURCES-stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.08.27.tar.gz
安装SDK
#解压缩SDK
tar xvf SDK-x86_64-stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.tar.gz
#增加执行权限
chmod +x stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/sdk/st-image-weston-openstlinux-weston-stm32mp2.rootfs-x86_64-toolchain-5.0.8-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.sh
#安装SDK到默认目录
./stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/sdk/st-image-weston-openstlinux-weston-stm32mp2.rootfs-x86_64-toolchain-5.0.8-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.sh
#安装SDK到指定目录
./stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/sdk/st-image-weston-openstlinux-weston-stm32mp2.rootfs-x86_64-toolchain-5.0.8-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.sh -d <working directory absolute path>/Developer-Package/SDK

声明SDK
#安装完成后做软链接
ln -sf /opt/st/stm32mp2/5.0.8-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/environment-setup-cortexa35-ostl-linux ~/sdk6.6_mp2
source ~/sdk6.6_mp2
echo $ARCH
arm64
echo $CROSS_COMPILE
aarch64-ostl-linux-
$CC --version
aarch64-ostl-linux-gcc (GCC) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
echo $OECORE_SDK_VERSION
5.0.8-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11
安装OpenSTLinux BSP包
#解压源码
tar xvf en.SOURCES-stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.08.27.tar.gz
参考链接
https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package