ESP-IDF在windows下编译的速度过慢,所以还是搭建一个Linux开发环境,速度快10倍。
1 安装基础工具
sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-cryptography python-future
2. 下载编译链工具
3. 解压
4. 导出路径
export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"
5. 获取esp-idf
cd ~/esp
git clone -b v3.2 --recursive https://github.com/espressif/esp-idf.git
6. 导出开发框架库
export IDF_PATH=~/esp/esp-idf
7. 安装相应的依赖库
python -m pip install --user -r $IDF_PATH/requirements.txt
8. 复制例子
cp -r $IDF_PATH/examples/get-started/hello_world .
9.配置
cd hello_world
make menuconfig
10.编译
make 或者make all
11.烧录
make flash
12.查看运行结果
make monitor 或者make simple_monitor
monitor的一些操作:
Ctrl+]退出
Ctrl-T Ctrl-F重新烧录相当于 make flash
Ctrl-T Ctrl-A相当于 make app-flash
Ctrl-T Ctrl-R重启
Ctrl-T Ctrl-P暂停
领取专属 10元无门槛券
私享最新 技术干货