当前位置:网站首页>Vscode builds ESP32-C3 development environment
Vscode builds ESP32-C3 development environment
2022-07-29 13:57:00 【water ridge】
简介
ESP-IDF 是乐鑫官方的物联网开发框架,适用于 ESP32、ESP32-S 和 ESP32-C 系列 SoC.它基于 C/C++ 语言提供了一个自给自足的 SDK,方便用户在这些平台上开发通用应用程序.ESP-IDF 目前已服务支持数以亿计的物联网设备,并已开发构建了多种物联网产品,例如照明、消费电子大小家电、支付终端、工控等各类物联网设备.
工具安装
官网链接:esp32 c3快速入门
环境准备
- esp32-c3开发板
- 编译工具链
- 编译构建工具cmake和Ninja
- ESP-IDF软件开发框架
- 编辑器安装
IDE安装
安装教程:esp-idf
- 直接在vscode扩展里搜索Espressif IDF安装即可.
- 插件配置,按ctrl shift p输入:Configure ESP-IDF extension,Pay attention to the progress in the lower right corner,The configuration is explained later

其他工具安装
ESP-IDF 需要安装一些必备工具,才能围绕 ESP32-C3 构建固件,包括 Python、Git、交叉编译器、CMake 和 Ninja 编译工具等.
Click on Quick Start:ESP-IDF 工具安装器
This will install the following:
关于工具的安装,Here is a direct reference to the official documentation of the link,采用离线安装,这里不记录

使用命令提示符
在后续步骤中,我们将使用 Windows command prompt to operate.
ESP-IDF A tool installer is available at “开始”菜单中,创建一个打开 ESP-IDF A shortcut to the Command Prompt window.This shortcut can be opened Windows 命令提示符(即 cmd.exe),并运行 export.bat script to set various environment variables(比如 PATH,IDF_PATH 等).此外,You can still pass Windows Command Prompt uses various installed tools.
注意,This shortcut is only applicable ESP-IDF specified in the tool installer ESP-IDF 路径.If there are more than one on your computer ESP-IDF 路径(For example you need a different version ESP-IDF),You have the following two workarounds:
- 为 ESP-IDF The shortcut created by the tool installer creates a copy,and place the new shortcut ESP-IDF The working path is specified as you wish to use ESP-IDF 路径.
- 或者,您可以运行 cmd.exe,and switch to the one you wish to use ESP-IDF 目录,然后运行 export.bat.注意,这种方法要求 PATH 中存在 Python 和 Git.If you encounter it while using it“找不到 Python 或 Git”的错误信息,请使用第一种方法.
基本使用
首先下载examples,I recommend your own repository hereesp32-idf,Because the original repository download is slow.
官方命令–安装简单
- 拷贝examplesThe routines in the directory go to a certain directory
- 配置工程
idf.py set-target esp32c3 #设置“目标”芯片,此操作将清除并初始化项目之前的编译和配置(如有)
idf.py menuconfig #进行配置,There are default configurations in the sample code that can be ignored
idf.py build #Compile the project to compile the application and ESP-IDF 组件,Generate the bootloader、分区表和应用程序二进制文件
idf.py menuconfig --help #显示帮助信息
- 烧录程序
idf.py -p PORT [-b BAUD] flash
- 监视输出
idf.py -p PORT monitor
Ctrl+],退出 IDF 监视器
VScode编译下载–安装复杂
- 首先安装esp-idf插件,进行配置(搜索esp-idf configure),The installation package will be downloaded here,But we have already installed it offlineesp-idf开发工具包,Here we do not install,直接指定路径,What we have installed is not detected here,我们点击advancedSpecify the directory manually



- 使用vscode打开examples中的工程(esp-idf\examples\get-started\hello_world)
- 插件安装完成后,The serial port can be selected at the bottom

- Set the programming method,快捷方式"ctrl+ ,"


- 创建工程,Select chip type and engineering,This place might get stuck waiting a bit

- 编译工程,The problem of slow compilation will be solved in a later article


- 烧录,选择串口,进行烧录

- 打开log监控,It's completely over here

注意事项
- 请注意 ESP-IDF 和 ESP-IDF 工具的安装路径不能超过 90 个字符,Long installation paths may cause build failures
- Python 或 ESP-IDF must not contain spaces or parentheses in the installation path.
- Unless the operating system is configured to support it Unicode UTF-8,否则 Python 或 ESP-IDF cannot include special characters in the installation path(非 ASCII 码字符)
问题列表
cmake路径不在环境变量中
[Error: non zero exit code 2
ESP-IDF v4.3.3
'cmake' must be available on the PATH to use idf.py
at ChildProcess.<anonymous> (\dist\extension.js:1:4499)
at ChildProcess.emit (node:events:390:28)
at ChildProcess.emit (node:domain:475:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)]
添加环境变量即可
编辑不通过
删除工程目录下的build目录试试
边栏推荐
- gee引擎修改UI界面图文教程
- MLX90640 红外热成像仪测温传感器模块开发笔记(九)
- 【MySQL】ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- JS_ deleting the invalid data in the array undefined '0' null false NaN
- 【微信小程序】一文解决button、input、image组件
- 企业如何走出固定资产管理的困境?
- 开关电源-半桥LLC控制
- HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
- 关闭线程池 shutdown 和 shutdownNow 的区别
- 今日睡眠质量记录没有
猜你喜欢

项目经理:不错啊!SSO单点登录代码写出来了,把时序图也画一下?

还在开发短信验证码登录?试试(本机号码一键登录)

IJCAI 2022 outstanding papers published, China won two draft in 298 the first author

Alibaba CTO Cheng Li: open source is the source of basic software!

Leetcode66. 加一

BGP简单实验

抓住这几个关键点,做薪酬数据分析并不难

从KEIL仿真界面导出数据的技巧

如何把Netflix数据集转换成Movielens格式?

开关电源-PWM外设简介及MCC配置
随机推荐
全开放式耳机怎么样?不塞耳朵的蓝牙耳机推荐
何享健“A拆A”又败一局,美的旗下美智光电终止创业板IPO
开关电源-PWM外设简介及MCC配置
R Error in :missing values are not allowed in subscripted assignments of data frames
每日优鲜解散疑云:生鲜电商们苦渡生死劫
leetcode链表专题
来自 Qt 官网的呐喊
MLX90640 红外热成像仪测温传感器模块开发笔记(九)
How Navicat Connects to MySQL
浅谈防勒索病毒方案之主机加固
Project Manager: Not bad!The SSO single sign-on code is written, and the sequence diagram is also drawn?
Leetcode65. 有效数字
栈题目:标签验证器
简单了解单例模式
AutoAlignV2:多模态3D目标检测新SOTA!(ECCV2022)
如何使用MISRA改进嵌入式编程
【kaggle】Spaceship Titanic - 预测哪些乘客被运送到另一个维度【CatBoost - 10%】
trivy如何从非关系型数据库查询数据
kotlin协程与线程池
Go - reading (7), CopySheet Excelize API source code (the from and to the int)