Esp32 Arduino API参考 Help

SDK配置

在platformio.ini中可以在 build_flags 中添加宏,从而修改一些配置。
当我们选择了具体开发板时,在\platforms\espressif32\boards文件夹下的json中build的下一级extra_flags会含有预设的宏定义。 如果需要覆盖这个参数则在platformio.ini中对应的选项中通过board_build.extra_flags字段修改,建议将原有定义复制出来之后修改值。
正常情况下建议使用build_flags

例如

[env:esp32cam] platform = espressif32 framework = arduino board = esp32cam monitor_speed = 115200 upload_speed = 921600 build_flags = -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO -D CONFIG_ARDUHAL_LOG_COLORS=1
Last modified: 17 十一月 2024