Skip to content

Commit f2faa01

Browse files
committed
Switch from V4 platform (ESP-IDF 4.4.x / arduino-esp32 v2.0.5) to V5 (ESP-IDF 5.3.4 / arduino-esp32 v3.1.4).
Based on wled#4838.
1 parent 2b73a34 commit f2faa01

1 file changed

Lines changed: 33 additions & 35 deletions

File tree

platformio.ini

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ build_flags =
244244
-D WLED_ENABLE_GIF
245245

246246
[esp32]
247-
platform = ${esp32_idf_V4.platform}
247+
platform = ${esp32_idf_V5.platform}
248248
platform_packages =
249249
build_unflags = ${common.build_unflags}
250-
build_flags = ${esp32_idf_V4.build_flags}
251-
lib_deps = ${esp32_idf_V4.lib_deps}
250+
build_flags = ${esp32_idf_V5.build_flags}
251+
lib_deps = ${esp32_idf_V5.lib_deps}
252252

253253
tiny_partitions = tools/WLED_ESP32_2MB_noOTA.csv
254254
default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
@@ -263,14 +263,12 @@ AR_build_flags = ;; -fsingle-precision-constant ;; forces ArduinoFFT to use floa
263263
AR_lib_deps = ;; for pre-usermod-library platformio_override compatibility
264264

265265

266-
[esp32_idf_V4]
267-
;; build environment for ESP32 using ESP-IDF 4.4.x / arduino-esp32 v2.0.5
268-
;;
269-
;; please note that you can NOT update existing ESP32 installs with a "V4" build. Also updating by OTA will not work properly.
270-
;; You need to completely erase your device (esptool erase_flash) first, then install the "V4" build from VSCode+platformio.
266+
[esp32_idf_V5]
267+
;; please note that you can NOT update existing ESP32 installs with a "V5" build. Also updating by OTA will not work properly.
268+
;; You need to completely erase your device (esptool erase_flash) first, then install the "V5" build from VSCode+platformio.
269+
;; build environment for ESP32 using ESP-IDF 5.3.4 / arduino-esp32 v3.1.4
270+
platform = https://github.com/tasmota/platform-espressif32/releases/download/2025.09.30/platform-espressif32.zip
271271

272-
;; select arduino-esp32 v2.0.9 (arduino-esp32 2.0.10 thru 2.0.14 are buggy so avoid them)
273-
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.06.02/platform-espressif32.zip ;; Tasmota Arduino Core 2.0.9 with IPv6 support, based on IDF 4.4.4
274272
build_unflags = ${common.build_unflags}
275273
build_flags = -g
276274
-Wshadow=compatible-local ;; emit warning in case a local variable "shadows" another local one
@@ -284,7 +282,7 @@ lib_deps =
284282

285283
[esp32s2]
286284
;; generic definitions for all ESP32-S2 boards
287-
platform = ${esp32_idf_V4.platform}
285+
platform = ${esp32_idf_V5.platform}
288286
build_unflags = ${common.build_unflags}
289287
build_flags = -g
290288
-DARDUINO_ARCH_ESP32
@@ -295,14 +293,14 @@ build_flags = -g
295293
-DARDUINO_USB_MODE=0 ;; this flag is mandatory for ESP32-S2 !
296294
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
297295
;; ARDUINO_USB_CDC_ON_BOOT
298-
${esp32_idf_V4.build_flags}
296+
${esp32_idf_V5.build_flags}
299297
lib_deps =
300-
${esp32_idf_V4.lib_deps}
298+
${esp32_idf_V5.lib_deps}
301299
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
302300

303301
[esp32c3]
304302
;; generic definitions for all ESP32-C3 boards
305-
platform = ${esp32_idf_V4.platform}
303+
platform = ${esp32_idf_V5.platform}
306304
build_unflags = ${common.build_unflags}
307305
build_flags = -g
308306
-DARDUINO_ARCH_ESP32
@@ -312,15 +310,15 @@ build_flags = -g
312310
-DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3
313311
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
314312
;; ARDUINO_USB_CDC_ON_BOOT
315-
${esp32_idf_V4.build_flags}
313+
${esp32_idf_V5.build_flags}
316314
lib_deps =
317-
${esp32_idf_V4.lib_deps}
315+
${esp32_idf_V5.lib_deps}
318316
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
319317
board_build.flash_mode = qio
320318

321319
[esp32s3]
322320
;; generic definitions for all ESP32-S3 boards
323-
platform = ${esp32_idf_V4.platform}
321+
platform = ${esp32_idf_V5.platform}
324322
build_unflags = ${common.build_unflags}
325323
build_flags = -g
326324
-DESP32
@@ -331,9 +329,9 @@ build_flags = -g
331329
-DCO
332330
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
333331
;; ARDUINO_USB_MODE, ARDUINO_USB_CDC_ON_BOOT
334-
${esp32_idf_V4.build_flags}
332+
${esp32_idf_V5.build_flags}
335333
lib_deps =
336-
${esp32_idf_V4.lib_deps}
334+
${esp32_idf_V5.lib_deps}
337335
board_build.partitions = ${esp32.large_partitions} ;; default partioning for 8MB flash - can be overridden in build envs
338336

339337

@@ -428,23 +426,23 @@ custom_usermods = audioreactive
428426

429427
[env:esp32dev]
430428
board = esp32dev
431-
platform = ${esp32_idf_V4.platform}
429+
platform = ${esp32_idf_V5.platform}
432430
build_unflags = ${common.build_unflags}
433431
custom_usermods = audioreactive
434-
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_V4\" #-D WLED_DISABLE_BROWNOUT_DET
432+
build_flags = ${common.build_flags} ${esp32_idf_V5.build_flags} -D WLED_RELEASE_NAME=\"ESP32_V5\" #-D WLED_DISABLE_BROWNOUT_DET
435433
-DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
436-
lib_deps = ${esp32_idf_V4.lib_deps}
434+
lib_deps = ${esp32_idf_V5.lib_deps}
437435
monitor_filters = esp32_exception_decoder
438436
board_build.partitions = ${esp32.default_partitions}
439437
board_build.flash_mode = dio
440438

441439
[env:esp32dev_8M]
442440
board = esp32dev
443-
platform = ${esp32_idf_V4.platform}
441+
platform = ${esp32_idf_V5.platform}
444442
custom_usermods = audioreactive
445443
build_unflags = ${common.build_unflags}
446-
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_8M\" #-D WLED_DISABLE_BROWNOUT_DET
447-
lib_deps = ${esp32_idf_V4.lib_deps}
444+
build_flags = ${common.build_flags} ${esp32_idf_V5.build_flags} -D WLED_RELEASE_NAME=\"ESP32_8M\" #-D WLED_DISABLE_BROWNOUT_DET
445+
lib_deps = ${esp32_idf_V5.lib_deps}
448446
monitor_filters = esp32_exception_decoder
449447
board_build.partitions = ${esp32.large_partitions}
450448
board_upload.flash_size = 8MB
@@ -454,11 +452,11 @@ board_upload.maximum_size = 8388608
454452

455453
[env:esp32dev_16M]
456454
board = esp32dev
457-
platform = ${esp32_idf_V4.platform}
455+
platform = ${esp32_idf_V5.platform}
458456
custom_usermods = audioreactive
459457
build_unflags = ${common.build_unflags}
460-
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_16M\" #-D WLED_DISABLE_BROWNOUT_DET
461-
lib_deps = ${esp32_idf_V4.lib_deps}
458+
build_flags = ${common.build_flags} ${esp32_idf_V5.build_flags} -D WLED_RELEASE_NAME=\"ESP32_16M\" #-D WLED_DISABLE_BROWNOUT_DET
459+
lib_deps = ${esp32_idf_V5.lib_deps}
462460
monitor_filters = esp32_exception_decoder
463461
board_build.partitions = ${esp32.extreme_partitions}
464462
board_upload.flash_size = 16MB
@@ -468,7 +466,7 @@ board_build.flash_mode = dio
468466

469467
[env:esp32_eth]
470468
board = esp32-poe
471-
platform = ${esp32_idf_V4.platform}
469+
platform = ${esp32_idf_V5.platform}
472470
upload_speed = 921600
473471
custom_usermods = audioreactive
474472
build_unflags = ${common.build_unflags}
@@ -479,17 +477,17 @@ board_build.partitions = ${esp32.default_partitions}
479477
board_build.flash_mode = dio
480478

481479
[env:esp32_wrover]
482-
extends = esp32_idf_V4
480+
extends = esp32_idf_V5
483481
board = ttgo-t7-v14-mini32
484482
board_build.f_flash = 80000000L
485483
board_build.flash_mode = qio
486484
board_build.partitions = ${esp32.extended_partitions}
487485
custom_usermods = audioreactive
488486
build_unflags = ${common.build_unflags}
489-
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_WROVER\"
487+
build_flags = ${common.build_flags} ${esp32_idf_V5.build_flags} -D WLED_RELEASE_NAME=\"ESP32_WROVER\"
490488
-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue ;; Older ESP32 (rev.<3) need a PSRAM fix (increases static RAM used) https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/external-ram.html
491489
-D DATA_PINS=25
492-
lib_deps = ${esp32_idf_V4.lib_deps}
490+
lib_deps = ${esp32_idf_V5.lib_deps}
493491

494492
[env:esp32c3dev]
495493
extends = esp32c3
@@ -616,11 +614,11 @@ lib_deps = ${esp32s2.lib_deps}
616614

617615
[env:usermods]
618616
board = esp32dev
619-
platform = ${esp32_idf_V4.platform}
617+
platform = ${esp32_idf_V5.platform}
620618
build_unflags = ${common.build_unflags}
621-
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_USERMODS\"
619+
build_flags = ${common.build_flags} ${esp32_idf_V5.build_flags} -D WLED_RELEASE_NAME=\"ESP32_USERMODS\"
622620
-DTOUCH_CS=9
623-
lib_deps = ${esp32_idf_V4.lib_deps}
621+
lib_deps = ${esp32_idf_V5.lib_deps}
624622
monitor_filters = esp32_exception_decoder
625623
board_build.flash_mode = dio
626624
custom_usermods = * ; Expands to all usermods in usermods folder

0 commit comments

Comments
 (0)