ESP32 官方AT固件编译(从零开始环境搭建到编译完成全过程)

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

1、下载VMware免费版

https://download3.vmware.com/software/WKST-PLAYER-1702/VMware-player-full-17.0.2-21581411.exe

2、下载Ubuntu ubuntu-22.04.2-desktop-amd64.iso**

https://releases.ubuntu.com/jammy/ubuntu-22.04.2-desktop-amd64.iso

3、安装VMware与Ubuntu虚拟机

可能需要进电脑的BIOS打开一个选项才能安装成功虚拟机

4、ctrl+alt+t打开控制台 安装git

5、克隆AT固件源文件

git clone --recursive https://github.com/espressif/esp-at.git

参考
https://docs.espressif.com/projects/esp-at/zh_CN/latest/esp32/Compile_and_Develop/How_to_clone_project_and_compile_it.html

6、在esp-at文件夹下下载安装esp-idf

依次操作

  • 克隆
    git clone -b release/v5.0 --recursive https://github.com/espressif/esp-idf.git
  • 进入esp-idf文件夹
  • 切换下载地址为乐鑫
    export IDF_GITHUB_ASSETS=“dl.espressif.com/github_assets”
  • 下载安装工具链
    ./install.sh
  • 设置环境变量
    . ./export.sh

7、编译AT固件

进入esp-at文件夹
依次操作

  • 配置工程期间会让你选择芯片型号并更新idf
    ./build.py menuconfig
  • 编译
    ./build.py build

截图里就是编译成功的画面记录好bin文件里的地址信息烧录的时候需要用到
在这里插入图片描述

8、转移虚拟机编译好的固件到windows电脑

参考
https://blog.csdn.net/qq_44177918/article/details/129191160

9、过程中常见问题的解决

cmake未安装cmake" must be available on the PATH to use idf.py
解决方法输入sudo apt install cmake

编译提示RAM不足优化RAM
参考解决https://blog.csdn.net/Marchtwentytwo/article/details/117046234

编译失败提示ip_addr_t’ {aka ‘struct ip4_addr’} has no member named 'type
LWIP里面使能IPV6可以解决

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6