Linux(Ubuntu)下ESP-IDF下载与安装完整流程(3)

esp32-freertos-sdk 工具包 See the Getting Started guide links above for a detailed setup guide. This is a quick reference for common commands when working with ESP-IDF projects: Setup Build Environment (See Getting Started guide for a full list of required steps with details.) Install host build dependencies mentioned in Getting Started guide. Add tools/ directory to the PATH Run python -m pip install -r requirements.txt to install Python dependencies Configuring the Project idf.py menuconfig Opens a text-based configuration menu for the project. Use up & down arrow keys to navigate the menu. Use Enter key to go into a submenu, Escape key to go out or to exit. Type ? to see a help screen. Enter key exits the help screen. Use Space key, or Y and N keys to enable (Yes) and disable (No) configuration items with checkboxes "[*]" Pressing ? while highlighting a configuration item displays help about that item. Type / to search the configuration items. Once done configuring, press Escape multiple times to exit and say "Yes" to save the new configuration when prompted. Compiling the Project idf.py build ... will compile app, bootloader and generate a partition table based on the config. Flashing the Project When the build finishes, it will print a command line to use esptool.py to flash the chip. However you can also do this automatically by running: idf.py -p PORT flash Replace PORT with the name of your serial port (like COM3 on Windows, /dev/ttyUSB0 on Linux, or /dev/cu.usbserial-X on MacOS. If the -p option is left out, idf.py flash will try to flash the first available serial port. This will flash the entire project (app, bootloader and partition table) to a new chip. The settings for serial port flashing can be configured with idf.py menuconfig. You don't need to run idf.py build before running idf.py flash, idf.py flash will automatically rebuild anything which needs it. Viewing Serial Output The idf.py monitor target uses the idf_monitor tool to display se
### 安装和配置 ESP-IDF 的方法 为了在 Ubuntu 上成功安装并配置 ESP-IDF 开发环境,可以按照以下说明操作: #### 1. 推荐的操作系统 建议使用 Ubuntu 环境来构建 ESP-IDF 编译环境。编译速度更快,并且官方文档提供了详细的指导[^1]。 #### 2. 设置开发环境 以下是设置 Ubuntu 18.04 或更高版本上的 ESP-IDF 环境的具体步骤: ##### 步骤 A: 更新包管理器索引 运行以下命令更新系统的软件包列表: ```bash sudo apt update && sudo apt upgrade -y ``` ##### 步骤 B: 安装必要的依赖项 执行以下命令以安装所需的工具链和其他依赖项: ```bash sudo apt install git wget flex bison gperf python3 python3-pip python-is-python3 cmake ninja-build ccache libffi-dev libssl-dev dfu-util -y ``` ##### 步骤 C: 下载 ESP-IDF 源码 创建一个目录用于存储 ESP-IDF 并克隆仓库到本地机器上: ```bash mkdir -p ~/esp cd ~/esp git clone -b release/v4.3 --recursive https://github.com/espressif/esp-idf.git cd esp-idf git submodule update --init -f --recursive ``` 上述命令会下载指定版本的 ESP-IDF 及其子模块[^4]。 ##### 步骤 D: 配置 Python 虚拟环境 ESP-IDF 使用 Python 工具进行项目管理和构建过程中的辅助功能支持。初始化虚拟环境如下所示: ```bash ./install.sh source ./export.sh ``` `install.sh` 将自动检测当前平台需求并完成相应组件部署;而 `export.sh` 则负责加载路径变量以便后续调用工具链等功能正常运作。 #### 3. 在 VSCode 中集成 ESP-IDF 扩展 如果希望利用 Visual Studio Code 来简化工作流程,则可以通过插件进一步增强体验效果。具体做法是在 VSCODE 菜单栏里依次点击 **查看->命令面板**, 输入框内键入关键字 “ESP-IDF”,找到选项 `ESP-IDF:Configure ESP-IDF extension`, 进行扩展设定[^2]。 通过以上描述的方法即可顺利完成基于 Linux 发行版之一——Ubuntu下的 Espressif IoT Development Framework (简称 IDF) 初始化准备工作!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

蓝天居士

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值