esp-at是espressif官方推出的esp8266与esp32的at命令包,对于esp8266来说,这个包止步于v2.2.1.0_esp8266这个tag,对应release/v2.2.0.0_esp8266这个分支。
下面小沃简单介绍一下方式:
一、取消IDF_PATH的系统配置
注意,这里和自己编译不同,这里不能添加IDF_PATH,因为系统会自己下载SDK,方法如下:
unset IDF_PATH
二、下载源码
git clone --recursive -b v2.2.1.0_esp8266
三、安装python库
python -m pip install pyyaml xlrd
四、初始化库文件
运行下面命令
./build.py menuconfig
会出现选择模组的选项,按照下方图片进行选择
(1)选esp8266
(2)选WROOM-02-N模组,因为这个模组与esp12-f相同,都是使用GPIO1与GPIO3
(3)选择删除不必要的log来减小img体积
等弹出menuconfig后可以关闭一些不必要的功能,如wps与smartconfig。
五、编译
./build.py build
六、烧录
esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyUSB0 -b 115200 --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 80m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x9000 build/ota_data_initial.bin 0x10000 build/esp-at.bin 0xF0000 build/at_customize.bin 0xF1000 build/customized_partitions/factory_param.bin 0xF8000 build/customized_partitions/client_cert.bin 0xFA000 build/customized_partitions/client_key.bin 0xFC000 build/customized_partitions/client_ca.bin 0x104000 build/customized_partitions/mqtt_cert.bin 0x106000 build/customized_partitions/mqtt_key.bin 0x108000 build/customized_partitions/mqtt_ca.bin
文章作者:沃航科技