Skip to content

feat(esp8266): embedded LittleFS is automatic; retire FL_ESP8266_EMBEDDED_FS (#4947) - #4953

Merged
zackees merged 1 commit into
masterfrom
feat/4947-esp8266-embedded-fs
Oct 28, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/4947-esp8266-embedded-fs

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Stacked on #4952 (#4944). Fixes #4947. Part of #4949.

Problem

src/platforms/embedded_fs.h gated the on-chip LittleFS backend behind
FL_ESP8266_EMBEDDED_FS while ESP32 got it unconditionally — a code-enabling
define per the tracking issue.

Change

  • embedded_fs.h — #if defined(FL_IS_ESP32) || defined(FL_IS_ESP8266).
    The adapter (platforms/arduino/fs/embedded_fs_arduino.hpp) already guards on
    FL_HAS_INCLUDE(<LittleFS.h>) / <FS.h> and degrades to a null filesystem
    when the library is absent, so the change is safe even on a core without
    littlefs. The gate existed only to work around an empty littlefs submodule in
    fbuild's cached ESP8266 core; fbuild now packages it (ESP8266 core cached without the littlefs submodule; any <LittleFS.h> include fails fbuild#1380).
  • asset_scanner.embedded_fs_defines() — always empty now (the single
    decision point is kept for the future); the staged -DFL_ESP8266_EMBEDDED_FS
    is gone and announce_storage_requirements() reports the automatic selection.
  • The three tests that asserted the define was injected are updated.

Test plan / evidence

  • bash compile esp8266 --examples Blink succeeds, and the fl.fs.embedded
    TU's dependency file now lists the core's LittleFS/src/LittleFS.h — i.e. the
    real backend is selected with no define (null fallback not taken).
  • pytest ci/tests/test_asset_scanner.py ci/tests/test_source_manager.py ci/tests/test_embedded_fs_build_defines.py — 44 passed.
  • On-device read/write of the embedded FS is the remaining acceptance step
    (needs a board).

…DDED_FS

The on-chip LittleFS backend was gated behind FL_ESP8266_EMBEDDED_FS
(src/platforms/embedded_fs.h) while ESP32 got it unconditionally. Select
the backend the same way on both platforms.

- embedded_fs.h: . The
  adapter (platforms/arduino/fs/embedded_fs_arduino.hpp) already guards on
  FL_HAS_INCLUDE(<LittleFS.h>)/<FS.h> and degrades to a null filesystem
  when absent, so no opt-in define is needed. The gate existed only to
  work around an empty littlefs submodule in fbuild's cached ESP8266 core;
  fbuild now packages it (FastLED/fbuild#1380).
- asset_scanner.embedded_fs_defines(): always empty now (single decision
  point kept for the future); the staged -DFL_ESP8266_EMBEDDED_FS is gone
  and the storage-requirement report says the backend is automatic.
- Update the three tests that asserted the define was injected.

Verified: bash compile esp8266 --examples Blink succeeds and the
fl.fs.embedded TU's dep file now lists the core's LittleFS.h, i.e. the
real backend is selected with no define.

Refs #4947, #4949.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@zackees

zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Memory check (fbuild bloat, Blink, esp8266)

uv run ci/bloat.py esp8266 compared against the master baseline:

master this stack Δ
image_flash 264,671 B 264,667 B -4 B
attributed flash 203,252 B 203,249 B -3 B
RAM 6,808 B 6,808 B 0 B

No memory regression: the unused ESP8266 engines are dead-stripped (template selection + linker elimination), so naming none of them costs ~nothing, as intended (#2428).

@zackees
zackees changed the base branch from feat/4944-esp8266-uart-bus to master October 28, 2026 00:23
@zackees
zackees merged commit f5a08b6 into master Oct 28, 2026
3 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Oct 28, 2026
@zackees
zackees deleted the feat/4947-esp8266-embedded-fs branch November 5, 2026 05:52
TKDFusion pushed a commit to TKDFusion/Software-FastLED-FASTLED that referenced this pull request Nov 8, 2026
…rule (FastLED#4940)

Umbrella for the ESP8266 define-elimination epic (FastLED#4949): state the rule and
guard it.

- agents/docs/cpp-standards.md: new REQUIRED section 'Driver selection is by
  template, never a code-enabling define' with the BusTraits/BusSupports shape
  and the retired offenders (FASTLED_ESP8266_UART, FASTLED_ALL_PINS_HARDWARE_SPI,
  FL_ESP8266_EMBEDDED_FS).
- ci/lint_cpp/driver_enable_define_checker.py (new): a Python FileContentChecker
  that flags a preprocessor guard wrapping a 'platforms/...' include under
  src/platforms/** in an FL_*/FASTLED_* macro -- the code-enabling-define shape.
  The guards shipping today are grandfathered in
  driver_enable_define_amnesty.txt (regenerate with --generate-amnesty); new ones
  fail. Registered in run_all_checkers.py.
- ci/tests/test_driver_enable_define_checker.py (new): flagged/allowed cases plus
  a tree-wide check that the amnesty still covers src/platforms. Wired into
  PY_SMOKE (guard in test_native_ci_modes.py bumped 9 -> 10).

The three conversions land in FastLED#4951 / FastLED#4952 / FastLED#4953; this PR is the rule + guard.

Refs FastLED#4940, FastLED#4949.
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.

ESP8266: embedded LittleFS — retire the FL_ESP8266_EMBEDDED_FS define-gate

1 participant