This page explains what tools/light_pipeline.py does.
User-facing CLI:
python3 tools/light_pipeline.py
Compatibility wrapper:
python3 tools/run_workflow.py- forwards to
light_pipeline.py run
light_pipeline.py run executes this sequence:
- validate CLI args
- verify repo structure
- detect ESP-IDF
- initialize missing recursive submodules
- optionally apply patch files from top-level
patches/intoesp-matter/when--apply-patchesis passed - bootstrap Matter tooling if
gnis missing - generate manifest if
--countwas passed - optionally generate development attestation assets
- build firmware unless
--skip-build - generate factory data and onboarding codes
- generate labels unless
--skip-labels - optionally erase flash
- optionally flash selected device
- optionally open serial monitor
- If
tools/device_manifest.csvalready exists, manifest generation reuses it --countdoes not overwrite existing manifest automatically- Patch files are reported by default, not auto-applied
- Use
--apply-patchesif you want pipeline to mutateesp-matter/ - Passing
--porttorunmeans flashing happens automatically --flashstill exists, but only as deprecated compatibility flagflashsubcommand is better if you want flash-only behavior
The pipeline builds ESP-IDF and Matter environment variables internally.
That means normal use does not require manual source "$IDF_PATH/export.sh" first.
If gn is missing, pipeline runs Matter bootstrap automatically.
If nested submodules are missing, pipeline initializes them automatically.
If you run with --skip-build, pipeline can use provisioning-support/connectedhomeip from the release bundle instead of a live esp-matter/ checkout.
Default build dir:
build/light-c6-thread
The build logic writes generated sdkconfig overrides that include:
- target VID/PID
- 8 MB flash size
- custom partition table
- factory-backed providers
When flashing, pipeline:
- resolves device row from
tools/out/devices.csv - resolves firmware flashing metadata from build output
- generates exact
esptool.pycommand - optionally erases flash first
- flashes selected device
Plain flashing from a released build works without submodules.
erase-flash and idf.py monitor still need the upstream example checkout.
Unless --skip-labels is passed, pipeline also creates:
- per-device text labels
- printable HTML labels
- optional QR SVGs if
--render-qr-svgis used
- CLI options:
cli.md - identity and attestation:
identity-and-attestation.md - upstream and patches:
upstream-and-patches.md - outputs:
outputs.md