esp-at固件编译流程

1. 源码获取

首先使用git-bash拉取esp-at代码

git clone https://jihulab.com/esp-mirror/espressif/esp-at.git

切换到你想要编译的固件版本

git checkout release/v3.3.1.0

image
切记一定要使用git命令拉取,否则以下流程都不能执行!

2. 工程环境依赖安装

cmd 打开终端,切换到工程目录
image

安装当前工程第三方环境依赖

python build.py install

image

2.1 常见问题解决

2.1.1 网络环境问题

如果提示网络错误,请关闭相关代理软件
image
如果中途下载失败还需要重新执行

python build.py install

image

3. 工程配置

python build.py menuconfig

3.1 常见问题解决

3.1.1 如果提示以下错误需要配置idf环境

image

执行以下命令:

C:\projects\esp_3.3.1.0\esp-at>cd esp-idf

C:\projects\esp_3.3.1.0\esp-at\esp-idf>export.bat
Checking Python compatibility
Setting IDF_PATH: C:\projects\esp_3.3.1.0\esp-at\esp-idf

Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.29.0.
    C:\Espressif\tools\riscv32-esp-elf-gdb\12.1_20231023\riscv32-esp-elf-gdb\bin
    C:\Espressif\tools\riscv32-esp-elf\esp-2022r1-11.2.0\riscv32-esp-elf\bin
    C:\Espressif\tools\cmake\3.24.0\bin
    C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin
    C:\Espressif\tools\ninja\1.10.2\
    C:\Espressif\tools\idf-exe\1.0.3\
    C:\Espressif\tools\ccache\4.6.2\ccache-4.6.2-windows-x86_64
    C:\Espressif\python_env\idf5.0_py3.10_env\Scripts
    C:\projects\esp_3.3.1.0\esp-at\esp-idf\tools

Checking if Python packages are up to date...
Constraint file: C:\Espressif\espidf.constraints.v5.0.txt
Requirement files:
 - C:\projects\esp_3.3.1.0\esp-at\esp-idf\tools\requirements\requirements.core.txt
Python being checked: C:\Espressif\python_env\idf5.0_py3.10_env\Scripts\python.exe
Python requirements are satisfied.

Detected installed tools that are not currently used by active ESP-IDF version.
For removing old versions of ccache, dfu-util, esp-clang, esp-rom-elfs, esp32ulp-elf, ninja, openocd-esp32, riscv32-esp-elf, riscv32-esp-elf-gdb, xtensa-esp-elf, xtensa-esp-elf-gdb use command 'python.exe C:\projects\esp_3.3.1.0\esp-at\esp-idf\tools\idf_tools.py uninstall'
For free up even more space, remove installation packages of those tools. Use option 'python.exe C:\projects\esp_3.3.1.0\esp-at\esp-idf\tools\idf_tools.py uninstall --remove-archives'.


Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build


C:\projects\esp_3.3.1.0\esp-at\esp-idf>cd ..

3.1.2 提示A fatal error occurred: No module named 'xlrd'表示你环境有些没有下载完全

image
需要再重新执行python build.py install
image
最后再执行python build.py menuconfig
image

4 工程编译

python build.py build
posted @ 2025-08-21 16:13  我不是萧海哇~~~  阅读(36)  评论(0)    收藏  举报