在ESP-IDF 4.4中,esp_vfs_fat_sdmmc.h头文件已被移动到新的位置。因此,在代码中包含该头文件时会遇到编译错误。

错误信息:

le or directory
#include "esp_vfs_fat_sdmmc.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[7/16] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/periph/uart.c.obj

解决方法:

  1. 打开您的代码中的uart.c文件。
  2. #include "esp_vfs_fat_sdmmc.h"改为#include "esp_vfs_fat.h"
  3. 保存文件并重新编译您的代码。

完成以上步骤后,您应该能够成功编译代码。

ESP-IDF 4.4: 解决

原文地址: https://www.cveoy.top/t/topic/bBVU 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录