Skip to content

Commit fe195bb

Browse files
committed
ESP32-P4 coprocessor and parlio pins
Front-End ======== - Add P4 coprocessor info Back-End ======== - System status: Add P4 coprocessor info - Parallel driver: pins also for ParLIO
1 parent 77a31dd commit fe195bb

File tree

9 files changed

+12762
-12721
lines changed

9 files changed

+12762
-12721
lines changed

docs/moonbase/inputoutput.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,20 @@ For each board the following presets are defined:
5656
![Dig Quad](https://quinled.info/wp-content/uploads/2021/11/QuinLED-Dig-Quad-AB_v3r1-2048x1154.png){: style="width:100px"}
5757
![Dig Octa](https://quinled.info/wp-content/uploads/2024/10/20240924_141857-2048x1444.png){: style="width:100px"}
5858

59-
* Dig 2Go, Dig Uno, Dig Quad: Choose the esp32-d0 (4MB) board in the [MoonLight Installer](../../gettingstarted/installer/)
60-
* Dig Octa: Choose the esp32-d0-16mb board in the [MoonLight Installer](../../gettingstarted/installer/)
59+
* [Dig 2Go](https://quinled.info/quinled-dig2go/), [Dig Uno](https://quinled.info/pre-assembled-quinled-dig-quad/), [Dig Quad](https://quinled.info/quinled-dig-octa/): Choose the esp32-d0 (4MB) board in the [MoonLight Installer](../../gettingstarted/installer/)
60+
* [Dig Octa](https://quinled.info/quinled-dig-octa/): Choose the esp32-d0-16mb board in the [MoonLight Installer](../../gettingstarted/installer/)
6161
* On first install, erase flash first (Especially when other firmware like WLED was on it) as MoonLight uses a partition scheme with 3MB of flash (currently no OTA support).
6262
* You might need to reset your router if you first run WLED on the same MCU and no new IP is assigned.
6363

6464
!!! Tip "Dig Uno USB"
6565
Remove fuse to connect USB cable to flash the board.
6666

67+
### MyHome-Control ESP32-P4 shield
68+
69+
![ESP32-P4 shield](https://shop.myhome-control.de/thumbnail/87/41/c2/1762031307/WLED_ESP32_P4_Shield_02_1920x1326.jpg?ts=1762031315){: style="width:320px"}
70+
71+
[ESP32-P4 shield](https://shop.myhome-control.de/en/ABC-WLED-ESP32-P4-shield/HW10027)
72+
6773
### SE16 v1
6874

6975
![SE-16p](../firmware/installer/images/esp32-s3-stephanelec-16p.jpg){: style="width:100px"}

firmware/esp32-p4.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ lib_deps =
1919
; platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip
2020
; board = ESP32-P4 ; https://github.com/pioarduino/platform-espressif32/blob/565f02434cd38858a59b7a010c950ffb2bec51df/boards/esp32-p4.json#L24
2121
board = esp32-p4-evboard ; https://github.com/pioarduino/platform-espressif32/blob/565f02434cd38858a59b7a010c950ffb2bec51df/boards/esp32-p4-evboard.json
22-
platform_packages = framework-arduinoespressif32 @ https://github.com/troyhacks/arduino-esp32#feature/esp32p4
23-
framework-arduinoespressif32-libs @ https://github.com/troyhacks/esp32-arduino-libs#main
22+
; platform_packages = framework-arduinoespressif32 @ https://github.com/troyhacks/arduino-esp32#feature/esp32p4
23+
; framework-arduinoespressif32-libs @ https://github.com/troyhacks/esp32-arduino-libs#main
2424
board_build.partitions = default_16MB.csv ;boards/ESP32_8MB.csv
2525
upload_speed = 921600
2626
; framework = arduino

interface/src/lib/types/models.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ export type StaticSystemInformation = {
140140
flash_chip_size: number;
141141
flash_chip_speed: number;
142142
cpu_reset_reason: string;
143-
heap_info_app: string;
144-
heap_info_dma: string;
143+
heap_info_app: string; // 🌙
144+
heap_info_dma: string; // 🌙
145+
coprocessor: string; // 🌙
145146
};
146147

147148
export type SystemInformation = Analytics & StaticSystemInformation;

interface/src/routes/system/status/SystemStatus.svelte

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,21 @@
452452
</div>
453453
</div>
454454

455+
<!-- 🌙 -->
456+
{#if systemInformation.coprocessor}
457+
<div class="rounded-box bg-base-100 flex items-center space-x-3 px-4 py-2">
458+
<div class="mask mask-hexagon bg-primary h-auto w-10 flex-none">
459+
<CPU class="text-primary-content h-auto w-full scale-75" />
460+
</div>
461+
<div>
462+
<div class="font-bold">Coprocessor</div>
463+
<div class="text-sm opacity-75">
464+
{systemInformation.coprocessor}
465+
</div>
466+
</div>
467+
</div>
468+
{/if}
469+
455470
<div class="rounded-box bg-base-100 flex items-center space-x-3 px-4 py-2">
456471
<div class="mask mask-hexagon bg-primary h-auto w-10 flex-none">
457472
<Speed class="text-primary-content h-auto w-full scale-75" />

lib/framework/SystemStatus.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@
3232
#include "esp32c6/rom/rtc.h"
3333
#define ESP_TARGET "ESP32-C6";
3434
#elif CONFIG_IDF_TARGET_ESP32P4 // 🌙
35-
#include "esp32p4/rom/rtc.h"
36-
#define ESP_TARGET "ESP32-P4";
35+
#include "esp32p4/rom/rtc.h"
36+
#define ESP_TARGET "ESP32-P4";
37+
#include "esp_hosted_api_types.h"
38+
#include <esp_hosted.h>
39+
// #include "esp_hosted_host_fw_ver.h"
40+
// #include "esp_hosted_misc.h"
41+
// #include "esp_hosted_ota.h"
3742
#else
3843
#error Target CONFIG_IDF_TARGET is not supported
3944
#endif
@@ -169,6 +174,13 @@ esp_err_t SystemStatus::systemStatus(PsychicRequest *request)
169174
root["core_temp"] = temperatureRead();
170175
root["cpu_reset_reason"] = verbosePrintResetReason(esp_reset_reason());
171176
root["uptime"] = millis() / 1000;
177+
#ifdef CONFIG_IDF_TARGET_ESP32P4
178+
esp_hosted_coprocessor_fwver_t c6_fw_version;
179+
esp_hosted_get_coprocessor_fwversion(&c6_fw_version);
180+
char hfw[10];
181+
snprintf(hfw, 32, "v%d.%d.%d", c6_fw_version.major1, c6_fw_version.minor1, c6_fw_version.patch1);
182+
root["coprocessor"] = hfw;
183+
#endif
172184

173185
heapHealth(root["heap_info_app"].to<JsonVariant>(), MALLOC_CAP_INTERNAL);
174186
heapHealth(root["heap_info_dma"].to<JsonVariant>(), MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA);

0 commit comments

Comments
 (0)