Skip to content

firmware/esp32-csi-node: IDF 6 build, HE CSI config, unicore DSP, provision chip detect#522

Open
krish2718 wants to merge 4 commits intoruvnet:mainfrom
krish2718:pr/esp32-csi-node-c6-idf6
Open

firmware/esp32-csi-node: IDF 6 build, HE CSI config, unicore DSP, provision chip detect#522
krish2718 wants to merge 4 commits intoruvnet:mainfrom
krish2718:pr/esp32-csi-node-c6-idf6

Conversation

@krish2718
Copy link
Copy Markdown

@krish2718 krish2718 commented May 10, 2026

Summary

Bring firmware/esp32-csi-node in line with ESP-IDF 6+ and Wi-Fi 6 (HE) targets
(e.g. ESP32-C6): build fixes, correct CSI configuration layout, safe task pinning
on unicore SoCs, and provisioning that does not assume ESP32-S3.

Changes

  • IDF 6 / mbed TLS 4: Use PSA crypto for SHA-256 in rvf_parser instead of the
    removed public mbedtls/sha256.h API; set explicit REQUIRES in
    main/CMakeLists.txt so IDF 6 component resolution does not treat the component
    as dependency-free.
  • Wi-Fi 6 CSI: Initialize wifi_csi_config_t using the HE acquire bitfield path
    when CONFIG_SOC_WIFI_HE_SUPPORT is set, matching wifi_csi_acquire_config_t
    vs legacy boolean-style fields.
  • Unicore: Pin the edge DSP worker with portNUM_PROCESSORS so core 1 is
    never used on single-core chips.
  • Provisioning: Default esptool chip to auto (optional override); use
    write-flash spelling expected by current esptool.

Test plan

  • idf.py set-target esp32c6 (or your HE target), idf.py build
  • Flash, connect STA, confirm CSI path runs without assert on unicore
  • provision.py against a non-S3 device without hardcoding --chip esp32s3

Notes

Intended for ESP-IDF 6+ where the SHA-256 header and component REQUIRES
behavior changed; older IDF may still build but was not the focus of this series.

krish2718 and others added 4 commits May 10, 2026 21:27
…RES)

- rvf_parser: use psa_hash_* / psa_hash_compute; mbedTLS 4 has no public
  mbedtls/sha256.h on the IDF include path.
- main/CMakeLists: declare REQUIRES for WiFi, netif, HTTP, OTA, drivers, lwip,
  mbedtls per ESP-IDF v6 component dependency checks; optional wasm3 when
  CONFIG_WASM_ENABLE.

Signed-off-by: Chaitanya Tata <chaitanya@dotstarconsulting.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
When CONFIG_SOC_WIFI_HE_SUPPORT is set, wifi_csi_config_t is the
wifi_csi_acquire_config_t bitfield layout. The legacy bool fields
(lltf_en, htltf_en, ...) only apply to ESP32-S3-class targets.

Initialize acquire fields for HE targets; add MAC v3-only members when
CONFIG_SOC_WIFI_MAC_VERSION_NUM >= 3.

Verified: idf.py build for esp32c6 and esp32s3 (ESP-IDF v6.1).

Signed-off-by: Chaitanya Tata <chaitanya@dotstarconsulting.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
edge_processing_init used xTaskCreatePinnedToCore(..., core 1). ESP32-C6
runs FreeRTOS unicore (portNUM_PROCESSORS == 1), so core 1 trips the
xTaskCreatePinnedToCore range assert right after CSI init.

Use core 1 only when SMP is available; otherwise pin to core 0.

Signed-off-by: Chaitanya Tata <chaitanya@dotstarconsulting.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
provision.py always passed --chip esp32s3 to esptool, so flashing NVS on
ESP32-C6 failed. Default --chip to auto (esptool v5) and add an explicit
--chip override. Use write-flash instead of deprecated write_flash.

Signed-off-by: Chaitanya Tata <chaitanya@dotstarconsulting.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@krish2718 krish2718 force-pushed the pr/esp32-csi-node-c6-idf6 branch from 6043c72 to 2a3ddca Compare May 10, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant