Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion docs/gettingstarted/installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For devices that already have MoonLight installed, go to [Update](#update-moonli

## Prepare an ESP32 device

Recommended plug-and-play device to get started with, up to 4096 LEDs: [QuinLED-dig2go](https://quinled.info/quinled-dig2go/)
Recommended plug-and-play device to get started with, up to 1024 LEDs @ 30FPS (one output) or 4096 LEDs over the network (Art-Net): [QuinLED-dig2go](https://quinled.info/quinled-dig2go/)

![Dig2Go](https://shop.allnetchina.cn/cdn/shop/products/Led_4.jpg?v=1680836018&width=1600){: style="width:250px"}

Expand Down
14 changes: 12 additions & 2 deletions firmware/esp32-c3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,41 @@ lib_deps =


; commented out as c3 generate FastLED error: FastLED/src/platforms/esp/32/rmt_4/idf4_clockless_rmt_esp32.h:81:46: error: static assertion failed: Invalid pin specified
; see also [env:esp32c3dev_4MB_M]
[env:esp32-c3]
board = esp32-c3-devkitm-1
board = esp32-c3-devkitm-1 ; https://github.com/platformio/platform-espressif32/blob/master/boards/esp32-c3-devkitm-1.json
board_build.mcu = esp32c3
; Uncomment min_spiffs.csv setting if using EMBED_WWW with ESP32
; board_build.partitions = min_spiffs.csv
board_build.partitions = boards/ESP32_4MB_NO_OTA.csv
; Use USB CDC for firmware upload and serial terminal
; board_upload.before_reset = usb_reset
build_flags = ${esp32-c3-base.build_flags}
-D WLED_WATCHDOG_TIMEOUT=0
-D CONFIG_ASYNC_TCP_USE_WDT=0
-Wno-misleading-indentation -Wno-format-truncation
-DARDUINO_USB_CDC_ON_BOOT=0 ;; disable CDC USB
-DLOLIN_WIFI_FIX
lib_deps = ${esp32-c3-base.lib_deps}
; RAM: [= ] 13.6% (used 44696 bytes from 327680 bytes)
; Flash: [==========] 98.4% (used 1934442 bytes from 1966080 bytes)


; Replaced partitioning by no OTA because flash > 100% other partitioning (no ota?) or Tasmota platform needed
; see also WLED-MM esp32c3mini_dio_4MB_M
[env:esp32-c3-supermini]
board = esp32-c3-devkitm-1
board = esp32-c3-devkitm-1 ; https://github.com/platformio/platform-espressif32/blob/master/boards/esp32-c3-devkitm-1.json
board_build.mcu = esp32c3
; Uncomment min_spiffs.csv setting if using EMBED_WWW with ESP32
; board_build.partitions = min_spiffs.csv
board_build.partitions = boards/ESP32_4MB_NO_OTA.csv
; Use USB CDC for firmware upload and serial terminal
board_upload.before_reset = usb_reset
board_build.flash_mode = dio ;; some super-mini boards are unstable with "qio" mode
build_flags = ${esp32-c3-base.build_flags}
-D LOLIN_WIFI_FIX ; some boards have wifi issues if this is not defined, this sets WIFI_POWER_8_5dBm
-DARDUINO_USB_CDC_ON_BOOT=0
-D WLED_DISABLE_BROWNOUT_DET ;; the board only has a 500mA LDO, better to disable brownout detection
lib_deps = ${esp32-c3-base.lib_deps}
; RAM: [== ] 22.5% (used 73592 bytes from 327680 bytes)
; Flash: [====== ] 64.9% (used 2041112 bytes from 3145728 bytes)
40 changes: 33 additions & 7 deletions firmware/esp32-d0.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ board = esp32dev ; https://github.com/platformio/platform-espressif32/blob/devel
board_build.partitions = boards/ESP32_4MB_NO_OTA.csv
; board_build.partitions = min_spiffs.csv
build_flags = ${esp32-d0-base.build_flags}
-D HTTPD_STACK_SIZE=6144 ; d0-tuning... 4096 ;8192 ; also set by livescripts default 4096 but not enough for more complex read and update (esp32 has no livescripts therefore set this explicitly here
-D HTTPD_STACK_SIZE=6144 ; instead of the default 8192 d0-tuning... 4096 ;8192 ; also set by livescripts default 4096 but not enough for more complex read and update (esp32 has no livescripts therefore set this explicitly here
-D LOLIN_WIFI_FIX ; some boards have wifi issues if this is not defined, this sets WIFI_POWER_8_5dBm
; -D LED_BUILTIN=2
; -D KEY_BUILTIN=0
Expand All @@ -40,7 +40,7 @@ lib_deps = ${esp32-d0-base.lib_deps}
board = esp32_16MB
board_build.partitions = boards/ESP32_16MB_3MBFlash.csv ; standard for 16MB flash: 3MB firmware, 10 MB filesystem
build_flags = ${esp32-d0-base.build_flags}
-D HTTPD_STACK_SIZE=6144 ;d0-tuning...4096 ;8192 ; also set by livescripts default 4096 but not enough for more complex read and update (esp32 has no livescripts therefore set this explicitly here
-D HTTPD_STACK_SIZE=6144 ;instead of the default 8192 d0-tuning...4096 ;8192 ; also set by livescripts default 4096 but not enough for more complex read and update (esp32 has no livescripts therefore set this explicitly here
-D LOLIN_WIFI_FIX ; some boards have wifi issues if this is not defined, this sets WIFI_POWER_8_5dBm
lib_deps = ${esp32-d0-base.lib_deps}

Expand Down Expand Up @@ -85,7 +85,7 @@ board_build.partitions = boards/ESP32_4MB_NO_OTA.csv
; board_build.partitions = min_spiffs.csv
build_flags = ${env.build_flags}
-D CONFIG_IDF_TARGET_ESP32=1
-D HTTPD_STACK_SIZE=6144 ; a bit more as there are no app tasks atm
-D HTTPD_STACK_SIZE=6144 ; instead of the default 8192 a bit more as there are no app tasks atm
-D LOLIN_WIFI_FIX ; some boards have wifi issues if this is not defined, this sets WIFI_POWER_8_5dBm
; -D LED_BUILTIN=2
; -D KEY_BUILTIN=0
Expand All @@ -103,7 +103,7 @@ board_build.partitions = boards/ESP32_4MB_NO_OTA.csv
; board_build.partitions = min_spiffs.csv
build_flags = ${env.build_flags}
-D CONFIG_IDF_TARGET_ESP32=1
-D HTTPD_STACK_SIZE=6144 ; a bit more as there are no app tasks atm
-D HTTPD_STACK_SIZE=6144 ; instead of the default 8192 a bit more as there are no app tasks atm
-D LOLIN_WIFI_FIX ; some boards have wifi issues if this is not defined, this sets WIFI_POWER_8_5dBm
-D ARDUINO_USB_CDC_ON_BOOT=0 ; Make sure that the right HardwareSerial driver is picked in arduino-esp32 (needed on "classic ESP32")
-DBOARD_HAS_PSRAM
Expand All @@ -116,7 +116,33 @@ lib_deps = ${env.lib_deps}

[env:esp32-d0-pico2]
board = esp32-pico-devkitm-2 ; https://github.com/platformio/platform-espressif32/blob/master/boards/esp32-pico-devkitm-2.json
board_build.partitions = default_8MB.csv ; boards/ESP32_8MB.csv
; see also https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32/esp32-pico-devkitm-2/index.html
board_build.partitions = default_8MB.csv ; boards/ESP32_8MB.csv has not enough flash (2MB)
board_build.arduino.memory_type = qio_qspi ; Added: PSRAM memory type
board_build.flash_mode = qio ; Added: Flash mode for PSRAM
upload_speed = 460800 ; upload_speed = 921600 was too fast ... if not set esphome web installer even uses slower speed
build_flags = ${esp32-d0-base.build_flags}
-D HTTPD_STACK_SIZE=6144
lib_deps = ${esp32-d0-base.lib_deps}
; -D HTTPD_STACK_SIZE=6144 ; instead of the default 8192
-DBOARD_HAS_PSRAM ; Added: Enable PSRAM
; -mfix-esp32-psram-cache-issue ; Added: Fix ESP32 PSRAM cache bug
; -D CONFIG_ESP_IPC_TASK_STACK_SIZE=2048 ; ← ADD THIS (double the default)
; -D CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=0 ; ← ADD (keep IPC/system stacks in internal RAM)
; -D CONFIG_I2S_ISR_IRAM_SAFE=1
lib_deps = ${esp32-d0-base.lib_deps}

; [env:esp32-d0-pico2-quin]
; board = esp32dev ; https://github.com/platformio/platform-espressif32/blob/master/boards/esp32-pico-devkitm-2.json
; ; see also https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32/esp32-pico-devkitm-2/index.html
; board_build.partitions = default_8MB.csv ;boards/ESP32_8MB.csv ; Fixed: was default_8MB.csv (doesn't exist)
; ; board_build.arduino.memory_type = qio_qspi ; Added: PSRAM memory type
; upload_speed = 460800 ; upload_speed = 921600 was too fast ... if not set esphome web installer even uses slower speed
; build_flags = ${esp32-d0-base.build_flags}
; -D HTTPD_STACK_SIZE=6144. ; instead of the default 8192
; -DBOARD_HAS_PSRAM ; Added: Enable PSRAM
; ; -mfix-esp32-psram-cache-issue ; Added: Fix ESP32 PSRAM cache bug
; lib_deps = ${esp32-d0-base.lib_deps}
; monitor_filters = esp32_exception_decoder
; board_upload.flash_size = 8MB
; board_upload.maximum_size = 8388608
; ; board_build.f_flash = 80000000L
; board_build.flash_mode = dio
2 changes: 2 additions & 0 deletions interface/src/lib/types/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ export type StaticSystemInformation = {
arduino_version: string;
flash_chip_size: number;
flash_chip_speed: number;
flash_chip_mode: string; // 🌙
psram_mode: string; // 🌙
cpu_reset_reason: string;
heap_info_app: string; // 🌙
heap_info_dma: string; // 🌙
Expand Down
4 changes: 2 additions & 2 deletions interface/src/routes/system/status/SystemStatus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
{((systemInformation.used_psram / systemInformation.psram_size) * 100).toFixed(1)} %
of {Math.round(systemInformation.psram_size / 1000).toLocaleString('en-US')} KB
<span
>({Math.round(systemInformation.free_psram / 1000).toLocaleString('en-US')} KB free)</span
>({Math.round(systemInformation.free_psram / 1000).toLocaleString('en-US')} KB free, {systemInformation.psram_mode})</span
>
</div>
</div>
Expand Down Expand Up @@ -490,7 +490,7 @@
<div class="text-sm opacity-75">
{Math.round(systemInformation.flash_chip_size / 1000).toLocaleString('en-US')} KB / {(
systemInformation.flash_chip_speed / 1000000
).toLocaleString('en-US')} MHz
).toLocaleString('en-US')} MHz ({systemInformation.flash_chip_mode}) <!-- 🌙 -->
</div>
</div>
</div>
Expand Down
23 changes: 23 additions & 0 deletions lib/framework/SystemStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ esp_err_t SystemStatus::systemStatus(PsychicRequest *request)
root["free_psram"] = ESP.getFreePsram();
root["used_psram"] = ESP.getPsramSize() - ESP.getFreePsram();
root["psram_size"] = ESP.getPsramSize();
// #if CONFIG_ESP32S3_SPIRAM_SUPPORT // WLEDMM -S3 has "qspi" or "opi" PSRAM mode
#if CONFIG_SPIRAM_MODE_OCT
root["psram_mode"] = "🚀 OPI";
#elif CONFIG_SPIRAM_MODE_QUAD
root["psram_mode"] = "QSPI";
#else
root["psram_mode"] = "other";
#endif
// #endif
}
root["cpu_freq_mhz"] = ESP.getCpuFreqMHz();
root["cpu_type"] = ESP.getChipModel();
Expand All @@ -169,6 +178,20 @@ esp_err_t SystemStatus::systemStatus(PsychicRequest *request)
root["arduino_version"] = ARDUINO_VERSION;
root["flash_chip_size"] = ESP.getFlashChipSize();
root["flash_chip_speed"] = ESP.getFlashChipSpeed();
switch (ESP.getFlashChipMode()) { // 🌙
// missing: Octal modes
case FM_QIO: root["flash_chip_mode"] = "QIO"; break;
case FM_QOUT: root["flash_chip_mode"] = "QOUT";break;
case FM_DIO: root["flash_chip_mode"] = "DIO"; break;
case FM_DOUT: root["flash_chip_mode"] = "DOUT or other";break;
#if defined(CONFIG_IDF_TARGET_ESP32S3) && CONFIG_ESPTOOLPY_FLASHMODE_OPI
case FM_FAST_READ: root["flash_chip_mode"] = "🚀OPI";break;
#else
case FM_FAST_READ: root["flash_chip_mode"] = "fast_read";break;
#endif
case FM_SLOW_READ: root["flash_chip_mode"] = "slow_read";break;
default: root["flash_chip_mode"] = "other"; break;
}
root["fs_total"] = ESPFS.totalBytes();
root["fs_used"] = ESPFS.usedBytes();
root["core_temp"] = temperatureRead();
Expand Down
Loading