一、liunx 环境
1.更换软件源,方便下载软件,打开文件 /etc/apt/sources.list 更换网址 例如清华源(代替文件内容)
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
2.更新软件源和安装包 sudo apt update // sudo apt upgrade
3.安装usb驱动 sudo apt -y install libusb-dev
4.安装其他工具
sudo apt -y install libreadline-de // sudo apt-get install git // sudo apt-get install clang-format // sudo apt-get install libreadline6-dev
// sudo apt-get install openocd // jlink:https://www.segger.com/downloads/jlink/(安装包)
git环境搭建 : https://blog.csdn.net/gjy211/article/details/84564481
5.安装gcc
解压安装包,修改添加环境变量到gcc的bin目录gcc-arm-none-eabi-9-2020-q2-update/bin 再安装插件 sudo apt install libncurses5
修改环境变量方法:
1.修改、/etc/profile 文件 在未行插入
1.1格式1为 PATH=“ P A T H : / h o m e / x p p / g c c − a r m − n o n e − e a b i − 9 − 2020 − q 2 − u p d a t e / b i n " 1.2 格式 2 为 e