下载MicroPython稳定版本包

https://github.com/micropython/micropython/releases
在该页面下载你需要的稳定版本资源包

安装 ESP-IDF

  1. 安装依赖

    1. sudo yum -y update && sudo yum install git wget flex bison gperf python3 python3-setuptools cmake ninja-build ccache dfu-util libusbx
    1. sudo apt-get install git wget flex bison gperf python3 python3-venv python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
    1. sudo pacman -S --needed gcc git make flex bison gperf python cmake ninja ccache dfu-util libusb
  2. 串口授权配置 ```bash

    Generic Linux

    sudo usermod -a -G dialout $USER

Arch Linux

sudo usermod -a -G uucp $USER

重启生效

  1. 3. 获取 esp-idf
  2. ```bash
  3. mkdir -p ~/esp
  4. cd ~/esp
  5. git clone --recursive https://github.com/espressif/esp-idf.git
  1. # Download an archive with submodules included
  2. https://dl.espressif.com/github_assets/espressif/esp-idf/releases/download/v4.3.3/esp-idf-v4.3.3.zip
  3. # 解压并移动到 ~/esp/ 目录下
  4. unzip esp-idf-v4.3.3.zip
  5. mv esp-idf-v4.3.3 ~/esp/
  1. 安装 esp-idf ```bash

    默认安装目录 $HOME/.espressif 如需要更改安装路径 export IDF_TOOLS_PATH=自定义路径

切换目录

cd ~/esp/esp-idf-v4.3.3

安装esp32相关

./install.sh esp32

安装全部

./insyall.sh all

也可以使用 install.fish 替换 install.sh

安装过程较慢,因为安装过程需要下载多个资源包,最好是成功安装完后备份这些资源包,这样切换电脑开发配置环境就方便快捷点

  1. 5. 配置环境别名
  2. ```bash
  3. # 可在 .profile|.bashrc|.zprofile 文件添加下面一行
  4. alias get_idf='. $HOME/esp/esp-idf-v4.3.3/export.sh'
  5. # 生效你配置的文件
  6. source ~/.bashrc