Daryl Rodrigo
Daryl Rodrigo

Reputation: 1397

Setting sdkconfig using platform.io for the ESP32

I was wondering if anybody managed to set the SDKConfig.h file for the ESP32 when using platform.io to upload code, and if so how it is done.

Thanks in advance!

✌️

Upvotes: 4

Views: 2842

Answers (1)

genghisnico13
genghisnico13

Reputation: 1

You can copy and modify the file SDKConfig.h into your project include folder from:

/.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.

And add this to your platformio.ini so that the file in your project has priority

build_flags = 
  -Iinclude

Tested with framework-arduinoespressif32 Version 3.10006.210326 (1.0.6)

Let me know if it works for you, I'm guessing it could work with the other frameworks?

if some of the definitions gives you a problem because they are defined elsewhere just add a guard like this:

#ifndef CONFIG_FLASHMODE_DIO
#define CONFIG_FLASHMODE_DIO 1
#endif

Upvotes: 0

Related Questions