Skip to content

Commit c3aa31a

Browse files
committed
buildenv updates
* suppress NeoPixelBus warning: 'maybe_unused' attribute directive ignored * add -D USERMOD_CUSTOMEFFECTS to all Soudreactive environments * Add default squelch for boards with SPM1423 (PDM mic) * fixed some broken SoundReactive build envs * updated default_envs : major SR builds * added debug binaries
1 parent 2a9a545 commit c3aa31a

File tree

4 files changed

+43
-13
lines changed

4 files changed

+43
-13
lines changed

platformio.ini

+37-10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
# Release binaries
1515
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, esp32c3
1616

17+
# WLEDSR Relase binaries
18+
default_envs = soundReactive_esp32dev, soundReactive_esp32_eth, esp32_4MB_max, esp32_4MB_min_debug, esp32_4MB_min_micdebug, esp32_pico_4MB_min, wemos_shield_esp32_4MB_max, wemos_shield_esp32_16MB_max
19+
1720
# WLED sound-reactive binaries
1821
; default_envs = soundReactive_lolin_d32
1922
; default_envs = soundReactive_esp32dev
@@ -26,7 +29,7 @@
2629

2730
; default_envs = esp32_4MB_min, esp32_4MB_max, esp32_16MB_max, wemos_shield_esp32_4MB_max, wemos_shield_esp32_16MB_max, esp32_pico_4MB_min
2831
; default_envs = esp32_4MB_min
29-
default_envs = esp32_4MB_max ; recommended default
32+
; default_envs = esp32_4MB_max ; recommended default
3033
; default_envs = esp32_16MB_max
3134
; default_envs = wemos_shield_esp32_4MB_max
3235
; default_envs = wemos_shield_esp32_16MB_max
@@ -228,7 +231,8 @@ platform = [email protected]
228231

229232
platform_packages = framework-arduinoespressif32 @ https://github.com/Aircoookie/arduino-esp32.git#1.0.6.4
230233

231-
build_flags = -g
234+
build_flags = -g
235+
-Wno-attributes -Wno-unused-variable -Wno-unused-function ;; WLEDSR disables some stupid warnings, like NeoPixelBus warning: 'maybe_unused' attribute directive ignored
232236
-DARDUINO_ARCH_ESP32
233237
#-DCONFIG_LITTLEFS_FOR_IDF_3_2
234238
-D CONFIG_ASYNC_TCP_USE_WDT=0
@@ -439,6 +443,7 @@ platform_packages = ${esp32.platform_packages}
439443
upload_speed = 460800 ; 921600
440444
build_unflags = ${common.build_unflags}
441445
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=soundReactive_esp32dev -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
446+
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod
442447
lib_deps = ${esp32.lib_deps}
443448
monitor_filters = esp32_exception_decoder
444449
board_build.partitions = ${esp32.default_partitions}
@@ -452,6 +457,7 @@ platform_packages = ${esp32.platform_packages}
452457
upload_speed = 921600
453458
build_unflags = ${common.build_unflags}
454459
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=soundReactive_esp32_eth -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
460+
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod
455461
lib_deps = ${esp32.lib_deps}
456462
board_build.partitions = ${esp32.default_partitions}
457463
; board_build.f_flash = 80000000L
@@ -464,6 +470,7 @@ platform_packages = ${esp32.platform_packages}
464470
upload_speed = 921600
465471
build_unflags = ${common.build_unflags}
466472
build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
473+
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod
467474
lib_deps = ${esp32.lib_deps}
468475
monitor_filters = esp32_exception_decoder
469476
board_build.partitions = ${esp32.default_partitions}
@@ -477,17 +484,18 @@ platform_packages = ${esp32.platform_packages}
477484
upload_speed = 921600
478485
build_unflags = ${common.build_unflags}
479486
build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
487+
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod
480488
lib_deps = ${esp32.lib_deps}
481489
monitor_filters = esp32_exception_decoder
482490
board_build.f_cpu = 240000000L
483491
board_upload.flash_size = 16MB
484492
board_upload.maximum_size = 16777216
485-
board_build.partitions = tools/SoundReactive_ESP32_16MB.csv
493+
board_build.partitions = tools/WLED_ESP32_16MB.csv ; for esp32_16MB with 16MB flash
486494
board_build.f_flash = 80000000L
487495
board_build.flash_mode = qio
488496

489497
[env:soundReactive_m5atom]
490-
board = esp32dev
498+
board = m5stack-atom
491499
platform = ${esp32.platform}
492500
platform_packages = ${esp32.platform_packages}
493501
upload_speed = 1500000
@@ -499,18 +507,19 @@ build_flags = ${common.build_flags_esp32}
499507
-D WLED_DISABLE_LOXONE
500508
-D LEDPIN=27
501509
-D BTNPIN=39
502-
-D DMENABLED=5
510+
-D DMENABLED=5 -D SR_SQUELCH=5 -D SR_GAIN=75 ;; SPM1423 specific
503511
-D I2S_SDPIN=26
504512
-D I2S_WSPIN=32
505513
-D I2S_CKPIN=-1
514+
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod
506515
lib_deps = ${esp32.lib_deps}
507516
monitor_filters = esp32_exception_decoder
508517
board_build.partitions = ${esp32.default_partitions}
509518
board_build.f_flash = 80000000L
510519
board_build.flash_mode = dio
511520

512521
[env:soundReactive_m5stamp-pico]
513-
board = esp32dev
522+
board = pico32
514523
platform = ${esp32.platform}
515524
platform_packages = ${esp32.platform_packages}
516525
upload_speed = 1500000
@@ -522,15 +531,16 @@ build_flags = ${common.build_flags_esp32}
522531
-D WLED_DISABLE_LOXONE
523532
-D LEDPIN=27
524533
-D BTNPIN=39
525-
-D DMENABLED=5
534+
-D DMENABLED=5 -D SR_SQUELCH=5 -D SR_GAIN=75 ;; SPM1423 specific
526535
-D I2S_SDPIN=32
527536
-D I2S_WSPIN=33
528537
-D I2S_CKPIN=-1
538+
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod
529539
lib_deps = ${esp32.lib_deps}
530540
monitor_filters = esp32_exception_decoder
531541
board_build.partitions = ${esp32.default_partitions}
532542
board_build.f_flash = 80000000L
533-
board_build.flash_mode = dio
543+
board_build.flash_mode = dout
534544

535545
# ------------------------------------------------------------------------------
536546
# custom board configurations
@@ -549,6 +559,7 @@ build_flags = ${common.build_flags_esp32}
549559
-D UWLED_USE_MY_CONFIG
550560
-D USERMOD_DALLASTEMPERATURE
551561
-D USERMOD_FOUR_LINE_DISPLAY
562+
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod
552563
-D TEMPERATURE_PIN=23
553564
lib_deps = ${esp32.lib_deps}
554565
OneWire@~2.3.5
@@ -627,6 +638,21 @@ build_flags = ${esp32_4MB_min_base.build_flags}
627638
; RAM: [== ] 24.1% (used 78900 bytes from 327680 bytes)
628639
; Flash: [======== ] 83.7% (used 1315729 bytes from 1572864 bytes)
629640

641+
; esp32_4MB_min_debug: bin entry, uses esp32_4MB_min_base + WLED_DEBUG
642+
[env:esp32_4MB_min_debug]
643+
extends = esp32_4MB_min_base
644+
build_flags = ${esp32_4MB_min_base.build_flags}
645+
-D WLED_RELEASE_NAME=esp32_4MB_min_debug ; This will be included in the firmware.bin filename
646+
-D WLED_DEBUG ; lots of generic debug messages
647+
-D SR_DEBUG -D NO_MIC_LOGGER ; some extra debug messages from audioreactive
648+
649+
; esp32_4MB_min_micdebug: bin entry, uses esp32_4MB_min_base + MIC_LOGGER
650+
[env:esp32_4MB_min_micdebug]
651+
extends = esp32_4MB_min_base
652+
build_flags = ${esp32_4MB_min_base.build_flags}
653+
-D WLED_RELEASE_NAME=esp32_4MB_min_micdebug ; This will be included in the firmware.bin filename
654+
; -D MIC_LOGGER ; mic signal plotting with arduino serial plotter
655+
630656
; esp32_4MB_max: bin entry, uses esp32_4MB_max_base
631657
[env:esp32_4MB_max]
632658
extends = esp32_4MB_max_base
@@ -735,8 +761,9 @@ build_flags = ${esp32_4MB_min_base.build_flags}
735761
; -D SR_DEBUG -D NO_MIC_LOGGER ; some extra debug messages from audioreactive
736762
; -D MIC_LOGGER ; mic signal plotting with arduino serial plotter
737763
; -D WLED_USE_MY_CONFIG
738-
; RAM: [=== ] 32.4% (used 106284 bytes from 327680 bytes)
739-
; Flash: [======== ] 80.6% (used 1267505 bytes from 1572864 bytes);
764+
; -D WLED_USE_CIE_BRIGHTNESS_TABLE
765+
; RAM: [=== ] 32.5% (used 106356 bytes from 327680 bytes)
766+
; Flash: [======== ] 81.3% (used 1278269 bytes from 1572864 bytes)
740767
monitor_filters = esp32_exception_decoder
741768
lib_ignore = IRremoteESP8266 ;; for faster compilation
742769

wled00/wled.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ void WLED::setup()
445445
#ifdef WLED_ENABLE_ADALIGHT
446446
//Serial RX (Adalight, Improv, Serial JSON) only possible if GPIO3 unused
447447
//Serial TX (Debug, Improv, Serial JSON) only possible if GPIO1 unused
448-
if (!pinManager.isPinAllocated(3) && !pinManager.isPinAllocated(1)) {
448+
if (!pinManager.isPinAllocated(3) && (!pinManager.isPinAllocated(1) || (pinManager.getPinOwner(1) == PinOwner::DebugOut))) { // WLEDSR allow TX = debugOut
449449
Serial.println(F("Ada"));
450450
}
451451
#endif

wled00/wled.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,16 @@ WLED_GLOBAL byte briS _INIT(128); // default brightness
358358
WLED_GLOBAL byte inputLevelS _INIT(128); // WLEDSR default inputLevel
359359
#if !defined(SR_SQUELCH)
360360
WLED_GLOBAL byte soundSquelch _INIT(10); // default squelch value for volume reactive routines
361-
WLED_GLOBAL byte sampleGain _INIT(40); // default sample gain
362361
WLED_GLOBAL byte soundAgc _INIT(0); // default Automagic gain control
363362
#else
364363
WLED_GLOBAL byte soundSquelch _INIT(SR_SQUELCH); // default squelch value
365-
WLED_GLOBAL byte sampleGain _INIT(30); // default sample gain
366364
WLED_GLOBAL byte soundAgc _INIT(2); // squelch was provided - we can enable AGC by default
367365
#endif
366+
#if !defined(SR_GAIN)
367+
WLED_GLOBAL byte sampleGain _INIT(40); // default sample gain
368+
#else
369+
WLED_GLOBAL byte sampleGain _INIT(SR_GAIN); // default sample gain
370+
#endif
368371

369372
WLED_GLOBAL byte nightlightTargetBri _INIT(0); // brightness after nightlight is over
370373
WLED_GLOBAL byte nightlightDelayMins _INIT(60);

0 commit comments

Comments
 (0)