esp32 - 使用 platform.io 为 ESP32 设置 sdkconfig

标签 esp32 platformio

我想知道是否有人在使用 platform.io 上传代码时成功地为 ESP32 设置了 SDKConfig.h 文件,如果是的话是如何完成的。

提前致谢!

✌️<​​/p>

最佳答案

您可以将文件 SDKConfig.h 复制并修改到您的项目 include 文件夹中:

/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/config/

or paste "CONFIG_ULP_COPROC_RESERVE_MEM" in your code and <Ctrl+LClick> to go to this file in your system.

并将其添加到您的platformio.ini,以便您项目中的文件具有优先权

build_flags = 
  -Iinclude

使用 framework-arduinoespressif32 版本 3.10006.210326 (1.0.6) 测试

让我知道它是否适合您,我猜它可以与其他框架一起使用?

如果一些定义给你带来了问题,因为它们是在别处定义的,只需像这样添加一个守卫:

#ifndef CONFIG_FLASHMODE_DIO
#define CONFIG_FLASHMODE_DIO 1
#endif

关于esp32 - 使用 platform.io 为 ESP32 设置 sdkconfig,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55165260/

相关文章:

c++ - 未调用库中的 ESP32 函数

c++ - 通过有限的 AT 命令实现 SSL(ESP32、AI Thinker A9G)

build - PlatformIO 致命构建错误 : LiquidCrystal. h "No such file or directory"

c++ - 如何在不刷新的情况下运行 ESP32 的单元测试?

c++ - 不能使用 platformio 在库中包含 i2s.h

c++ - VSCode 上的 PlatformIO 未编译 : collect2. exe:错误:ld 返回 1 退出状态

c++ - 在记录集中搜索/更新值

C++:在包含的头文件中使用#define 常量 (Arduino)

arduino - 将字符串写入 Arduino ESP32 的永久闪存

toolchain - 安装 PlatformIO 后如何安装 ESP-IDF?