Skip to content

Commit 3f50643

Browse files
committed
update for esp32dev_debug
* disable build_type = debug (causes stack smashing in ArduinoJSON) * refine no-flto flags * remove "-Os" (already set by pioarduino) * add lib_ignore * remove AR usermod (causes bootloop)
1 parent 0589031 commit 3f50643

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

platformio.ini

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ build_flags =
273273

274274
[esp32]
275275
platform = ${esp32_idf_V5.platform}
276-
platform_packages =
276+
platform_packages = ${esp32_idf_V5.platform_packages}
277277
build_unflags = ${esp32_idf_V5.build_unflags}
278278
build_flags = ${esp32_idf_V5.build_flags}
279279
lib_deps = ${esp32_idf_V5.lib_deps}
@@ -786,23 +786,25 @@ board_build.flash_mode = dio
786786

787787
[env:esp32dev_debug]
788788
extends = env:esp32dev
789-
build_type = debug
789+
;;build_type = debug ;; disabled - leads to stack smashing in ArduinoJSON "Unhandled debug exception: Stack canary watchpoint triggered (loopTask)"
790790
monitor_filters = esp32_exception_decoder
791791
upload_speed = 921600
792+
custom_usermods = ;; audioreactive usermod crashes on classic esp32
792793
build_unflags = ${esp32_idf_V5.build_unflags}
793794
-D WLED_RELEASE_NAME=\"ESP32\"
794795
;; -DCORE_DEBUG_LEVEL=0
795796
;; -DNDEBUG ;; re-enable debug assertions
796-
-flto ;; remove LTO flag, to make stack traces usable
797+
-flto -flto=auto ;; remove LTO flags, to make stack traces usable
797798
build_flags = ${common.build_flags} ${esp32_idf_V5.build_flags}
798799
-D WLED_DEBUG
799800
-D WLED_RELEASE_NAME=\"ESP32_DEBUG\"
800801
-DARDUINO_USB_CDC_ON_BOOT=0
801-
;; -DCORE_DEBUG_LEVEL=2
802-
-Os ;; ok to use even in debug mode; makes the firmware smaller
802+
;; -DCORE_DEBUG_LEVEL=2 -D WLED_DISABLE_ESPNOW
803803
-g3 -ggdb -fno-lto ;; to make stack traces meaningful again
804804
lib_deps = ${esp32_idf_V5.lib_deps}
805805
;; gmag11/QuickDebug ;; needed by QuickEspNow in debug mode
806+
lib_ignore = ${esp32_idf_V5.lib_ignore}
807+
;; QuickEspNow ;; use together with -D WLED_DISABLE_ESPNOW
806808

807809
[env:esp32dev_8M]
808810
board = esp32dev

0 commit comments

Comments
 (0)