一、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.save trusted.gpg.d
修改源
virtual-machine:/etc/apt$ sudo vi sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http:
deb http:
deb-src http:
deb http:
deb-src http:
deb http:
deb-src http:
deb http:
deb-src http:
# deb cdrom:[Ubuntu 22.04.2 LTS _Jammy Jellyfish_ - Release amd64 (20230223)]/ jammy main restricted
# See http:
# newer versions of the distribution.
deb http:
# deb-src http:
## Major bug fix updates produced after the final release of the
## distribution.
deb http:
# deb-src http:
## 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" 65 lines, 3724 bytes
我这里就失败过。解决办法是下方:更换国内的镜像
点开上方链接修改源为阿里的,然后执行以下更新命令
PC$ sudo apt-get update
virtual-machine:/etc/apt$ sudo apt-get update
Ign:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Ign:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-proposed InRelease
Ign:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Ign:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-proposed InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Ign:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Ign:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-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-pysqlite2 diffstat help2man make gcc build-essential g++ chrpath libxml2-utils xmlto docbook bsdmainutils iputils-ping cpio python-wand python-pycryptopp python-crypto
PC$ sudo apt-get install libsdl1.2-dev xterm corkscrew nfs-common nfs-kernel-server device-tree-compiler mercurial u-boot-tools libarchive-zip-perl
PC$ sudo apt-get install ncurses-dev bc linux-headers-generic gcc-multilib libncur
ses5-dev libncursesw5-dev lrzsz dos2unix lib32ncurses5 repo libssl-dev
执行完以上几步,基础环境算是安装完成了。
二、工具软件的安装
分为两个软件: STM32CudeProg和STM32CubeMX
我们这里只将这两个环境安装在window下面,方便开发
STM32CubeProgrammer 简称 STM32CubeProg,是一个适用于 STM32 系列产品的跨平台、多合一的程序烧写工具。开发板应用该工具来进行系统烧写。有如下特点:
(1)“跨平台”,体现在支持 Windows、macOS 和 Linux 操作系统,软件运行时需要 Java环境。
(2)“多合一”,体现在支持通过 USB、ST-LINK、UART、OTA 多种方式来烧写固件。
安装方式的话可以自行百度或者参考上方链接