Root cause of the dead data path (assoc/scan/RPC fine, zero data frames): esp-hosted 1.4.x is formally incompatible with IDF 5.5 (esp-hosted-mcu#47) and the factory C6 slave firmware was ancient (couldn't even answer a version RPC). Waveshare's examples pin 1.4.* — do not follow them. Fix: - host: espressif/esp_hosted ^2.12 (+ esp_wifi_remote 1.6) - slave: 2.12.11 network_adapter.bin embedded in the app (c6_ota.c streams it to the C6 over the SDIO RPC channel at boot when the reported version is < 2.x; ~10s, no wires, idempotent) - RAM diet for hosted 2.x's footprint (MEMPOOL_PREFER_SPIRAM, reduced WIFI_RMT buffers) — without it internal SRAM famine boot-loops in xTaskCreateStaticPinnedToCore before app_main - conservative 20MHz SDIO clock for first verified data path Verified on hardware: DHCP lease (even that healed), 8/8 pings to router and tower-of-joy at 1-5ms, WebSocket to the gateway connected, device registered at /devices as desklock-p4 with fw version. Also: wifi_diag.c L1 SoftAP diagnostic mode (DESKLOCK-DIAG) with review fixes, boot ping ladder in net.c, static-IP fallback, face_status() line, docs for the whole failure taxonomy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
# Target: Waveshare ESP32-P4-WIFI6-Touch-LCD-3.4C
|
|
CONFIG_IDF_TARGET="esp32p4"
|
|
|
|
# 32 MB NOR flash
|
|
CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y
|
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
|
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
|
|
|
# PSRAM at 200 MHz — REQUIRED for the 800x800 MIPI-DSI framebuffer.
|
|
# 200 MHz is gated behind IDF_EXPERIMENTAL_FEATURES; without it the build
|
|
# silently falls back to 20 MHz and the DSI underruns (mirrors the official
|
|
# 08_lvgl_demo_v9 example config).
|
|
CONFIG_SPIRAM=y
|
|
CONFIG_IDF_EXPERIMENTAL_FEATURES=y
|
|
CONFIG_SPIRAM_SPEED_200M=y
|
|
CONFIG_SPIRAM_XIP_FROM_PSRAM=y
|
|
CONFIG_CACHE_L2_CACHE_256KB=y
|
|
CONFIG_CACHE_L2_CACHE_LINE_128B=y
|
|
|
|
CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
|
CONFIG_FREERTOS_HZ=1000
|
|
|
|
# LVGL font for the bring-up placeholder face
|
|
CONFIG_LV_FONT_MONTSERRAT_48=y
|
|
|
|
# LVGL font for status/elapsed/clock chrome
|
|
CONFIG_LV_FONT_MONTSERRAT_28=y
|
|
|
|
# ESP-Hosted C6 radio
|
|
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y
|
|
|
|
# custom fonts are uncompressed, but enable the decoder as belt-and-braces
|
|
CONFIG_LV_USE_FONT_COMPRESSED=y
|
|
|
|
# ESP-Hosted board variant + wifi-remote data-path tuning (from factory brookesia config;
|
|
# without these the RPC control path works but data frames never flow)
|
|
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
|
|
CONFIG_ESP_HOSTED_CP_TARGET_ESP32C6=y
|
|
CONFIG_ESP_HOSTED_P4_DEV_BOARD_FUNC_BOARD=y
|
|
CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM=8
|
|
CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM=24
|
|
CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM=24
|
|
CONFIG_WIFI_RMT_AMPDU_TX_ENABLED=y
|
|
CONFIG_WIFI_RMT_TX_BA_WIN=16
|
|
CONFIG_WIFI_RMT_AMPDU_RX_ENABLED=y
|
|
CONFIG_WIFI_RMT_RX_BA_WIN=16
|
|
|
|
# hosted task stacks MUST stay in internal RAM (PSRAM stacks assert on P4)
|
|
CONFIG_ESP_HOSTED_DFLT_TASK_FROM_SPIRAM=n
|
|
|
|
# hosted 2.x: keep internal RAM for task stacks; buffers go to PSRAM
|
|
CONFIG_ESP_HOSTED_MEMPOOL_PREFER_SPIRAM=y
|
|
# conservative SDIO clock for first data-path proof (raise after verification)
|
|
CONFIG_ESP_HOSTED_SDIO_CLOCK_FREQ_KHZ=20000
|
|
|
|
# headroom for diag event handlers that touch LVGL
|
|
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
|