一、MYD-YF13X Linux系统开发指南配置环境
更新镜像源,我这里用的是18.04 ubuntu
virtual-machine:~$ cd /etc virtual-machine:/etc$ cd apt virtual-machine:/etc/apt$ ls apt.conf.d keyrings sources.list sources.list.d sources.list.tar.gz tutorial-env auth.conf.d preferences.d sources.list_backup sources.list.savetrusted.gpg.d
修改源
virtual-machine:/etc/apt$ sudo vi sources.list deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http:debhttp:deb-srchttp:debhttp:deb-srchttp:debhttp:deb-srchttp:debhttp:deb-srchttp:# debcdrom:[Ubuntu22.04.2LTS _Jammy Jellyfish_ - Release amd64 (20230223)]/ jammy main restricted # Seehttp:# newer versions of the distribution. debhttp:# deb-srchttp:## Major bug fix updates produced after the final release of the ## distribution. debhttp:# deb-srchttp:## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any"sources.list"65lines,3724bytes
我这里就失败过。解决办法是下方:更换国内的镜像
点开上方链接修改源为阿里的,然后执行以下更新命令
PC$sudo apt-get update virtual-machine:/etc/apt$sudo apt-get updateIgn:1https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntujammy InReleaseIgn:2https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic InReleaseIgn:3https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-updates InReleaseIgn:4https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-backports InReleaseIgn:5https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-security InReleaseIgn:6https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-proposed InReleaseIgn:1https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntujammy InReleaseIgn:2https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic InReleaseIgn:3https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-updates InReleaseIgn:4https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-backports InReleaseIgn:5https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-security InReleaseIgn:6https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-proposed InReleaseIgn:2https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic InReleaseIgn:1https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntujammy InReleaseIgn:3https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-updates InReleaseIgn:4https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-backports InReleaseIgn:5https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-security InReleaseIgn:6https://mirrors.tuna.tsinghua.edu.cn/ubuntubionic-proposed InRelease
然后就是安装必要的软件包,这里命令过长,安装的时候反复检查一下,避免出错(别问我怎么知道的)
PC$ sudo apt-get install u-boot-tools libyaml-dev bison flex sed wget curl cvs subversion git-core coreutils unzip texi2html texinfo docbook-utils gawk python-pysqlite2diffstat help2man make gcc build-essential g++ chrpath libxml2-utils xmlto docbook bsdmainutils iputils-ping cpio python-wand python-pycryptopp python-cryptoPC$ sudo apt-get install libsdl1.2-dev xterm corkscrew nfs-common nfs-kernel-server device-tree-compiler mercurial u-boot-tools libarchive-zip-perlPC$ sudo apt-get install ncurses-dev bc linux-headers-generic gcc-multilib libncurses5-dev libncursesw5-dev lrzsz dos2unix lib32ncurses5repo libssl-dev
执行完以上几步,基础环境算是安装完成了。
二、工具软件的安装
分为两个软件:STM32CudeProg和STM32CubeMX
我们这里只将这两个环境安装在window下面,方便开发
STM32CubeProgrammer 简称 STM32CubeProg,是一个适用于 STM32 系列产品的跨平台、多合一的程序烧写工具。开发板应用该工具来进行系统烧写。有如下特点:
(1)“跨平台”,体现在支持 Windows、macOS 和 Linux 操作系统,软件运行时需要 Java环境。
(2)“多合一”,体现在支持通过 USB、ST-LINK、UART、OTA 多种方式来烧写固件。
安装方式的话可以自行百度或者参考上方链接