ubuntu, esp-idf, arduino

1, 把 esp-idf 文件夹拷贝到 ubuntu, 不是拷贝 zip。 这样做是为了在 ubuntu 里能检测到 git

2, 把 esp-idf 里的 hello-world 拷贝出来

3, 在 hello-world 里建立文件夹 components, 把 arduino 文件夹拷贝进去

esp-idf 和 arduino文件夹版本需要匹配

4, esp-idf 文件夹里

4.1 需要安装系统工具

sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0

4.2 第一步中已经拷贝了 esp-idf, 这样的好处是无需再用 git clone 重新下载了

4.3 然后需要安装 esp-idf 相应的工具,通过 ./install 这个脚本来下载安装

要设置选择用 espressif 的服务器,这样下载速度会很快, 一定要设置

Standard Toolchain Setup for Linux and macOS - ESP32 - — ESP-IDF Programming Guide latest documentation

cd ~/esp/esp-idf

export IDF_GITHUB_ASSETS="dl.espressif.com/github_assets"

./install.sh

4.4 Customizing the Tools Installation Path

4.5 设置 alias, 方便使用

5, 去 hello-world 文件夹直接编译就可以了

会遇到频率不是 1000 的错误

可以临时把 cmakelist.txt 里 频率改成 100

Workaround for Compile Error "esp32-arduino requires CONFIG_FREERTOS_HZ=1000 (currently 100)" · espressif/arduino-esp32 · Discussion #8375 · GitHub

5, 然后就成功了, 没了

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值