Skip to content

fix(examples): ESP32 compile matrix — S2 dram0 overflow + H2 WiFi-less build (#3576 Phase 4) - #3583

Merged
zackees merged 1 commit into
masterfrom
fix/idf-compile-matrix-3576
Jul 2, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/idf-compile-matrix-3576

Conversation

@zackees

@zackees zackees commented Jul 2, 2026 •

Copy link
Copy Markdown
Member

Phase 4 of #3576: verified the AutoResearch harness compiles across the IDF and chip matrix, and fixed the two failures found.

Matrix (AutoResearch, --no-filter)

Target Result
esp32dev @ IDF 4.4 (platform v4.4.0) ✅
esp32dev @ IDF 5.5 (pioarduino) ✅
esp32dev @ IDF 6.0 (pioarduino prep_IDF6) ✅
esp32s3 / esp32c6 / esp32p4 / esp32c3 ✅
esp32s2 ❌ → ✅ (this PR)
esp32h2 ❌ → ✅ (this PR)

Fixes

  • esp32s2: .dram0.bss overflowed by 3696 bytes — the RPC benchmark handler held two static 8 KB buffers; now heap-allocated on first use (frees 16 KB of bss everywhere).
  • esp32h2: the WiFi/OTA example TUs gated on the family macro FL_IS_ESP32, but H2 has no WiFi silicon and esp_wifi.h fails to preprocess there. Guard is now FL_IS_ESP32 && SOC_WIFI_SUPPORTED, routing WiFi-less chips to the existing stub branch.

Host: 345/345; lint clean.

Refs #3576.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved ESP32 compatibility by only enabling Wi‑Fi-based networking and OTA features when supported by the hardware.
    • ESP32 variants without Wi‑Fi now use the fallback behavior instead of failing to build or run Wi‑Fi setup paths.
  • Refactor
    • Updated the remote memcpy benchmark to use dynamically managed buffers for more reliable memory handling during execution.

…s build (#3576 Phase 4)

Compile-matrix sweep of AutoResearch across IDF 4.4 / 5.5 / 6.0 and the
ESP32 chip family surfaced two failures; both fixed here.

- esp32s2: .dram0.bss overflowed by 3696 bytes. The RPC benchmark
  handler kept two static 8 KB buffers in bss; they are now
  heap-allocated fl::vector storage sized on first use (frees 16 KB of
  bss on every platform).
- esp32h2: AutoResearchNet/AutoResearchOta gated their ESP-IDF WiFi
  implementations on the family macro FL_IS_ESP32, but ESP32-H2 has no
  WiFi silicon and esp_wifi.h does not even preprocess there
  (CONFIG_ESP_WIFI_* absent from its sdkconfig). The guard is now
  FL_IS_ESP32 && SOC_WIFI_SUPPORTED so WiFi-less family members take
  the existing no-op stub branch.

Matrix results (AutoResearch, --no-filter):
- esp32dev on IDF 4.4 (platform v4.4.0), IDF 5.5 (pioarduino 55.x),
  IDF 6.0 (pioarduino prep_IDF6): PASS
- esp32s3 / esp32c6 / esp32p4 / esp32c3: PASS (unchanged)
- esp32s2 / esp32h2: FAIL -> PASS with this commit

Host: 345/345, lint clean.

Co-Authored-By: Claude Fable 5 <[email protected]>
@zackees
zackees merged commit 55856bf into master Jul 2, 2026
7 checks passed
@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e31b430d-13a0-4086-8757-713caa36a8e2

📥 Commits

Reviewing files that changed from the base of the PR and between 9377539 and b3b9621.

📒 Files selected for processing (3)
  • examples/AutoResearch/AutoResearchNet.cpp
  • examples/AutoResearch/AutoResearchOta.cpp
  • examples/AutoResearch/AutoResearchRemoteBenchmarkMethods.cpp

📝 Walkthrough

Walkthrough

This PR tightens ESP32 compilation guards in the AutoResearch networking and OTA example files to require SOC_WIFI_SUPPORTED in addition to FL_IS_ESP32, falling back to stub implementations otherwise. It also replaces fixed-size static buffers with heap-backed fl::vector buffers in the memcpy benchmark probe.

Changes

AutoResearch example fixes

Layer / File(s) Summary
Net implementation WiFi capability gating
examples/AutoResearch/AutoResearchNet.cpp
Conditionally includes soc/soc_caps.h and requires SOC_WIFI_SUPPORTED alongside FL_IS_ESP32 for the real implementation, updating the else branch to fall back to stub startNetServer/startNetClient/runNetClientTest/runNetLoopback/stopNet functions.
OTA implementation WiFi capability gating
examples/AutoResearch/AutoResearchOta.cpp
Conditionally includes soc/soc_caps.h and requires SOC_WIFI_SUPPORTED alongside FL_IS_ESP32 for the WiFi Soft AP OTA implementation, updating the else branch to select stub startOta/stopOta functions.
Memcpy benchmark buffer change
examples/AutoResearch/AutoResearchRemoteBenchmarkMethods.cpp
Adds fl/stl/vector.h include and replaces fixed-size static uint8_t arrays with lazily-resized static fl::vector<uint8_t> buffers used via data() pointers in perfProbeMemcpy.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • FastLED/FastLED#3118: Both PRs touch the AutoResearch perfProbeMemcpy timing probe implementation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/idf-compile-matrix-3576

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant