diff --git a/platformio.ini b/platformio.ini index c80de4cf..12cf85a6 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1306,6 +1306,43 @@ lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compila ;; RAM: [== ] 24.3% (used 79524 bytes from 327680 bytes) ;; Flash: [========= ] 93.2% (used 1466389 bytes from 1572864 bytes) +;; similar to 4MB_PSRAM_S, but optimized for WROVER-E (chip revision >= 3) that doesn't need any workarounds for PSRAM any more +;; tl;dr: its faster on PSRAM. But it will not work on all boards. +[env:esp32_4MB_PSRAM_REV3_S] +extends = esp32_4MB_V4_S_base +;board = esp32cam +board = lolin_d32_pro +;default_partitions = tools/WLED_ESP32_4MB_256KB_FS.csv ;; Alternative for 4MB flash: 1.8MB firmware, 256KB filesystem (esptool erase_flash needed before changing) +build_unflags = ${esp32_4MB_V4_S_base.build_unflags} + -DARDUINO_EVENT_RUNNING_CORE=1 ;; we want to run wifi on core0, so remove the standard flag + -mfix-esp32-psram-cache-issue ;; this fix is not needed any more for revision 3 + -mfix-esp32-psram-cache-strategy=memw ;; same as above + ;;-Os ;; if you want to be even faster - use together with "-O2" in build_flags. Enable alternative default_partitions (above) to have more program space. + +build_flags = ${esp32_4MB_V4_S_base.build_flags} + -DARDUINO_EVENT_RUNNING_CORE=0 ;; assign Wifi to core0, to have more CPU on core#1 (arduino loop) + -DARDUINO_RUNNING_CORE=1 ;; should be default, but does not hurt + ;-DCONFIG_MBEDTLS_DYNAMIC_BUFFER=1 ;; optional - seems to move more buffers into PSRAM + ;; enable the next line together with "-Os" in build_unflags (unfortunately --> 104.0%% Flash) + ;;-O2 -fno-jump-tables -fno-tree-switch-conversion -Wwrite-strings -fstrict-volatile-bitfields + -DBOARD_HAS_PSRAM -D WLED_USE_PSRAM_JSON ;; -D WLED_USE_PSRAM ;; WLED_USE_PSRAM causes major slow-down (slow LEDs) on some ESP32 boards + -D WLED_RELEASE_NAME=esp32_4MB_PSRAM_REV3_S + -D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BROWNOUT_DET + -D ARDUINO_USB_CDC_ON_BOOT=0 ; needed for arduino-esp32 >=2.0.4; avoids errors on startup + -D WLED_DISABLE_LOXONE ; FLASH 1272 bytes + -D WLED_DISABLE_HUESYNC ; RAM 122 bytes; FLASH 6308 bytes + -D WLED_DISABLE_ALEXA ; RAM 116 bytes; FLASH 13524 bytes + -D WLED_DISABLE_MQTT ; RAM 216 bytes; FLASH 16496 bytes + -D WLED_DISABLE_INFRARED ;RAM 136 bytes; FLASH 24492 bytes ewowi: disabled to stay below 100% + ;-D WLED_DISABLE_ADALIGHT ;; To disable serial protocols (see upstream #3128) + ; -D WLED_ENABLE_DMX + ; -D WLED_DEBUG + ; -D SR_DEBUG + ; -D MIC_LOGGER +lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation +;; RAM: [== ] 16.8% (used 55124 bytes from 327680 bytes) +;; Flash: [========= ] 92.7% (used 1458729 bytes from 1572864 bytes) + ;; PSRAM build env that only leaves 300Kb for filesystem (instead of 1MB), but adds 300kB for program space [env:esp32_4MB_PSRAM_M] extends = esp32_4MB_V4_M_base