Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions platformio_override.sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -536,3 +536,36 @@ extends = env:esp32dev
build_flags = ${env:esp32dev.build_flags} -D USERMOD_RF433
lib_deps = ${env:esp32dev.lib_deps}
sui77/rc-switch @ 2.6.4

# ------------------------------------------------------------------------------
# Advanced example: Inheriting all settings from an upstream "base" config, and
# adding/overriding specific build flags, which is useful if you want to base
# your environment on a stable core env but just override certain WLED defaults.
# ------------------------------------------------------------------------------

[env:esp32_eth_custom]
;; Inherit all settings from upstream config. We can then override specific settings.
;; WARNING: The upstream environment's name, such as "esp32_eth" in this example,
;; must also be specified in the other inherited settings (see example below).
extends = env:esp32_eth

;; Remove conflicting upstream flags to fix compiler "variable redefined" warnings.
;; WARNING: Must specify the EXACT upstream "build_flags" flag VALUES to unset;
;; because if we don't specify any value then it unsets ALL instances of the
;; flag, meaning that it would erase our new values too.
;; NOTE: If the upstream values are ever changed, the compiler will encounter
;; duplicate values and complain about "variable redefined" again, meaning that
;; these values will simply need to be revised. So maintenance is safe and easy.
build_unflags = ${env:esp32_eth.build_unflags}
;; Unset the old, conflicting flag values:
-D WLED_RELEASE_NAME=\"ESP32_Ethernet\"
-D RLYPIN=-1

;; Inherit all upstream flags and then overwrite/append with some custom values.
;; NOTE: You can add/modify ANY of the WLED build-time variables here (it doesn't
;; have to be values that were in the original upstream config).
build_flags = ${env:esp32_eth.build_flags}
;; Set/add your new flag values:
-D WLED_RELEASE_NAME=\"ESP32_Ethernet_Custom\"
-D RLYPIN=24

Comment thread
Arcitec marked this conversation as resolved.