How to use ifdef or Macro in platformio.ini file

Something like ifdefs are not possible within an ini file.

But why reinventing the wheel and not simply using 2 environments?

[env]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
monitor_port = COM11

[env:OTA]
upload_port = 199.xxx.xx.x
upload_protocol = espota

[env:USB]
upload_port = COM11
upload_speed=921600
1 Like