Skip to content

Add esp32s2 spi (FSPI) support, some code usability improvements - #1411

Merged
samguyer merged 3 commits into
FastLED:masterfrom
m-g-m:master
Nov 26, 2022
Merged

samguyer merged 3 commits into
FastLED:masterfrom
m-g-m:master

Conversation

@m-g-m

@m-g-m m-g-m commented Jul 17, 2022

Copy link
Copy Markdown
Contributor

Add FSPI bus to support ESP32S2.
Add spi.h include for easier compilation.
Make ledSPI static to avoid multiple instantiations.

@samguyer
samguyer merged commit add6cf5 into FastLED:master Nov 26, 2022
@samguyer

Copy link
Copy Markdown
Contributor

@m-g-m Thank you for your contribution! A few people have been asking for this update, so it will be much appreciated.

zackees added a commit that referenced this pull request Sep 9, 2026
The 8-way matrix was sized when a serial sweep took "several hours" because
every sketch rebuilt the framework sources. That was FastLED/fbuild
#1411/#1413 -- the ESP32 SDK-libs completion check required
`<mcu>/lib/libfreertos.a`, which ESP32-S3 alone does not ship there, so every
build re-extracted the 298 MB SDK before doing any work. It shipped fixed in
fbuild 2.5.22 and FastLED has been on 2.5.23 since #4158.

Measured rather than extrapolated, and measured on one branch on one day so
the two numbers are comparable -- #3956's lesson is that a cross-build
comparison proves almost nothing:

    shards   wall clock   runner minutes
         1     35.0 min          35.0
         3     21.8 min          61.9
         8     14.4 min          80.3   (09-06 run, for reference)

The headline is the per-shard cost. The issue estimated duplicated setup at
~35 s per shard from step timings, and concluded "sharding is not costing
much in overhead". Measured, each extra shard duplicates about 8.9 minutes --
roughly fifteen times that -- which is why 8 shards spend more than twice a
serial sweep's runner time to save 20 minutes of wall clock.

3 is the balance. The gate finishes in ~22 minutes, less than half the
45-minute bound in build_template.yml with room for the sweep to grow, and
runner consumption falls by about a third. Serial fits as well, at 35
minutes, but leaves only 10 minutes of headroom on a set of examples that
only gets bigger -- and #3791's whole lesson was that a gate which quietly
runs long is how a defect hides.

`build_template.yml` keeps the `timeout_minutes` input that made the
measurement possible. It defaults to 45, so every caller keeps exactly the
bound it has today, and re-measuring this does not need the workflow edited
again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
zackees added a commit that referenced this pull request Sep 9, 2026
* ci(esp32s3): measure a serial example sweep (#4165)

MEASUREMENT ONLY -- not for merge as-is. #4165 asks for a real serial
number before changing the shard count, since the 8-way matrix was sized
against an fbuild bug (per-sketch framework rebuilds) that shipped fixed in
2.5.22 and is no longer the cost it was written for.

Runs the sweep as a single shard with a 120-minute bound. The template gains
a `timeout_minutes` input defaulting to 45, so every existing caller keeps
exactly the bound it had.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

* ci(esp32s3): measure a 3-shard sweep for comparison (#4165)

MEASUREMENT ONLY. The serial run on this branch took 35m03s. Comparing that
against the 8-shard numbers in the issue would be a cross-build comparison
across three days and a different branch, which this repo's own lessons file
warns proves almost nothing -- so the candidate is measured here under the
same conditions instead of extrapolated.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

* ci(esp32s3): reduce the example sweep from 8 shards to 3 (#4165)

The 8-way matrix was sized when a serial sweep took "several hours" because
every sketch rebuilt the framework sources. That was FastLED/fbuild
#1411/#1413 -- the ESP32 SDK-libs completion check required
`<mcu>/lib/libfreertos.a`, which ESP32-S3 alone does not ship there, so every
build re-extracted the 298 MB SDK before doing any work. It shipped fixed in
fbuild 2.5.22 and FastLED has been on 2.5.23 since #4158.

Measured rather than extrapolated, and measured on one branch on one day so
the two numbers are comparable -- #3956's lesson is that a cross-build
comparison proves almost nothing:

    shards   wall clock   runner minutes
         1     35.0 min          35.0
         3     21.8 min          61.9
         8     14.4 min          80.3   (09-06 run, for reference)

The headline is the per-shard cost. The issue estimated duplicated setup at
~35 s per shard from step timings, and concluded "sharding is not costing
much in overhead". Measured, each extra shard duplicates about 8.9 minutes --
roughly fifteen times that -- which is why 8 shards spend more than twice a
serial sweep's runner time to save 20 minutes of wall clock.

3 is the balance. The gate finishes in ~22 minutes, less than half the
45-minute bound in build_template.yml with room for the sweep to grow, and
runner consumption falls by about a third. Serial fits as well, at 35
minutes, but leaves only 10 minutes of headroom on a set of examples that
only gets bigger -- and #3791's whole lesson was that a gate which quietly
runs long is how a defect hides.

`build_template.yml` keeps the `timeout_minutes` input that made the
measurement possible. It defaults to 45, so every caller keeps exactly the
bound it has today, and re-measuring this does not need the workflow edited
again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

* ci: correct the runner-consumption figure and drop the timeout input

Two review findings.

The percentage was wrong, and it was a claim about my own measurement:
80.3 -> 61.9 runner-minutes is 22.9%, not "roughly a third". The comment now
gives both numbers so the arithmetic is checkable, and records that serial
is cheaper still at 35.0 -- a 56% cut -- with the reason 3 is preferred
anyway.

The `timeout_minutes` input is gone and `build_template.yml` is back to
master untouched. GitHub's `type: number` accepts 0, -1 and 1.5, all of
which make a job-level `timeout-minutes` invalid, and the value is evaluated
before the job starts so no step can guard it. I had justified keeping it on
"re-measuring should not need the workflow edited again" -- but the serial
sweep turned out to take 35 minutes, under the existing 45-minute bound, so
raising the timeout was never actually necessary. Keeping speculative API
with a validity footgun in a PR-gate workflow to save a five-line temporary
edit is the wrong trade.

The measurement stands; it is recorded in the PR and in the comment above
the matrix.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

2 participants