打印
[STM32MP1]

【STM32MP135F-DK测评】官方SDK编译环境搭建体验

[复制链接]
896|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
dql2015|  楼主 | 2024-1-16 21:00 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
SDK包含了构建OpenSTLinux所需的交叉编译工具链和库。
官方教程地址https://wiki.stmicroelectronics.cn/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP135x-DK/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Install_the_SDK

首先安装工具:
 sudo apt-get update
sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib  chrpath socat cpio python3 python3-pip python3-pexpect



额外设置
echo 'options mmc_block perdev_minors=16' > /tmp/mmc_block.conf
sudo mv /tmp/mmc_block.conf /etc/modprobe.d/mmc_block.conf
下载SDK

下载得到en.SDK-x86_64-stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21.tar.gz

解压SDK
cd $HOME/STM32MPU_workspace/tmp
tar xvf en.SDK-x86_64-stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21.tar.gz


创建STM32MP1 Developer Package SDK目录,并执行SDK安装脚本


 mkdir -p $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK
chmod +x stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sdk/st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-4.2.1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21.sh
./stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sdk/st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-4.2.1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21.sh -d <working directory absolute path>/Developer-Package/SDK


安装成功后显示的信息如下:
1-x86_64-toolchain-4.2.1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21.sh -d /home/ubuntu/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 4.2.1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
===================================================================================================================================
You are about to install the SDK to "/home/ubuntu/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK". Proceed [Y/n]? Y
Extracting SDK........................................................................................................................................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /home/ubuntu/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi



每次打开终端使用SDK前执行命令加载环境变量
<blockquote> cd $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package 


检查是否加载成功,查看架构
echo $ARCH
检查交叉编译工具链前缀
echo $CROSS_COMPILE
检查编译器版本
$CC --version
检查SDK版本
echo $OECORE_SDK_VERSION


使用特权

评论回复
沙发
MessageRing| | 2024-1-27 21:19 | 只看该作者
新手容易入门吗?

使用特权

评论回复
板凳
szt1993| | 2024-1-28 12:08 | 只看该作者
有关于新手入门的教程嘛

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

101

主题

373

帖子

7

粉丝