[ 物联网篇 ] ESP32 开发板 编译esp-avs
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/z2066411585/article/details/88955900
参考 Espressif Systems Github上开源的代码,编译出完整的固件跑通Alexa。
- 源代码下载
// 下载源码,详细说明可以参考 esp-va-sdk/README-Getting-Started.md
$ git clone --recursive https://github.com/espressif/esp-idf.git
$ cd esp-idf; git checkout release/v3.1; cd ..
$ git clone https://github.com/espressif/esp-avs-sdk.git
// 打补丁
$ cd esp-idf
$ git apply ../esp-avs-sdk/esp-idf-patches/memset-i2s-dma-buffers-zero.patch
$ git apply ../esp-avs-sdk/esp-idf-patches/esp-tls-Add-support-for-global-CA-store.-All-mbedtls.patch
- 配置相关参数
make menuconfig
Component config -> ESP32 Specific -> SPI RAM config -> Type of SPIRAM in use->select ESP-PSRAM64
- 擦除Flash
make erase_flash
esptool --port /dev/ttyUSB0 erase_flash
- 编译代码/烧录固件
// 编译加监控串口输出
make -j 4 flash VOICE_ASSISTANT=alexa monitor
- 烧录固件
// 烧录固件之后,发现系统一直重启
>>Registering command: task-dump
Registering command: cpu-dump
Registering command: heap-trace
Registering command: nvs-get
Registering command: nvs-set
Registering command: nvs-erase
Registering command: reboot
Registering command: wifi-set
ret: 0
I (191) net80211: OS adapter function version error! Version 2 is expected, but it is 1
E (201) conn_mgr_prov: Failed to init wifi
E (211) app_main: Error getting device provisioning state
abort() was called at PC 0x400d777a on core 0
Backtrace: 0x400900c4:0x3ffc65d0 0x400902bf:0x3ffc65f0 0x400d777a:0x3ffc6610 0x400d2bb6:0x3ffc66c0
Rebooting...