feat: add M5StackChan CoreS3 web flashing - #554
Conversation
📝 WalkthroughWalkthroughAdds M5StackChan CoreS3 support across dependency preparation, firmware bundling and validation, web flashing, tests, CI checks, and flashing documentation. ChangesM5StackChan CoreS3 firmware flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant FirmwareWrapper
participant DependencyPreparer
participant BundleScript
participant ModdableBuild
participant WebFlashTool
FirmwareWrapper->>DependencyPreparer: Prepare CoreS3 IDF dependencies
DependencyPreparer-->>FirmwareWrapper: Return manifest path
BundleScript->>ModdableBuild: Run mcbundle and mcconfig
ModdableBuild-->>BundleScript: Produce firmware binaries
BundleScript->>BundleScript: Validate binaries and factory partition capacity
WebFlashTool->>BundleScript: Use CoreS3 firmware manifest and binaries
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@firmware/package.json`:
- Line 37: Add a release note or changeset describing the user-visible firmware
and web changes, including the new M5StackChan CoreS3 target and removed M5Stack
Fire target, and classify the appropriate release impact such as minor. If the
repository does not require one for these changes, document the reason instead.
In `@firmware/scripts/firmware.mjs`:
- Around line 43-51: Update the prepareM5StackChanCoreS3IdfDependencies call in
the firmware build flow to derive mode from the active CLI/build configuration
instead of always using 'debug'. Map release and instrumented invocations to
their corresponding dependency directories while preserving debug as the default
when no mode is specified.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cf3f74cd-ccf1-4c85-b006-825028974699
📒 Files selected for processing (13)
.github/workflows/bundle.ymlfirmware/docs/flashing-firmware-web.mdfirmware/docs/flashing-firmware-web_ja.mdfirmware/host/app/bundle-manifest.architecture.tsfirmware/host/app/manifest.jsonfirmware/package.jsonfirmware/scripts/bundle.mjsfirmware/scripts/firmware.mjsfirmware/scripts/lib/idf-dependencies.mjsfirmware/scripts/lib/idf-dependencies.test.mjsweb/flash/index.htmlweb/flash/manifest_esp32_m5stackchan_cores3.jsonweb/web-ui.test.mjs
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@firmware/scripts/firmware.mjs`:
- Around line 38-42: The requested release-impact classification, verification
details, and changeset/release note are PR metadata rather than code changes;
update the PR description to classify the impact as none, patch, minor, or
major, document tested targets, hardware-specific behavior, and reproduction or
verification steps, and add the repository’s required changeset or release note
for the firmware behavior affected by readOption, dryRun, or
readBuildConfiguration.
- Around line 126-128: Update the mode-handling logic around the mode resolution
and debug argument construction to preserve an explicitly supplied specific
debug flag such as -dx, -dn, or -dl when mode is debug. Reuse that command-line
flag when present instead of always returning args: ['-d']; fall back to -d only
when no specific debug flag was provided.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8f1e56f0-05cc-4d23-8a2e-c08fd1e072bb
📒 Files selected for processing (4)
firmware/scripts/bundle.mjsfirmware/scripts/firmware.mjsfirmware/scripts/lib/idf-dependencies.mjsfirmware/scripts/lib/idf-dependencies.test.mjs
🚧 Files skipped from review as they are similar to previous changes (3)
- firmware/scripts/lib/idf-dependencies.mjs
- firmware/scripts/lib/idf-dependencies.test.mjs
- firmware/scripts/bundle.mjs
|
@coderabbitai run pre-merge checks |
✅ Actions performedRunning Pre-merge checks. Results will be posted in the summary comment once complete. |
|
@coderabbitai run pre-merge checks |
✅ Actions performedRunning Pre-merge checks. Results will be posted in the summary comment once complete. |
|
@coderabbitai ignore pre-merge checks |
ℹ️ Actions performedPre-merge checks override executed successfully. Overridden by Approval outcome: Approval skipped: request-changes workflow disabled. |
Summary
Stack-chan[・_・], and remove the EOL M5Stack Fire from active bundle/Web targetsWhy
The standard
mcbundleonly covers registered devices and cannot include the repository's custom M5StackChan CoreS3 subplatform. The full 24px Japanese font also made the generic M5Stack image exceed its app partition. The new bundle orchestration builds the custom target explicitly, produces release images, and prevents oversized or missing artifacts from being deployed.M5StackChan CoreS3 requires both
espressif/esp32-cameraandespressif/esp_audio_codec. Moddable 8.3.1 launches multipleidf.py add-dependencycommands concurrently, allowing one generated-manifest update to overwrite the other on a clean runner. The repository-local preparation step writes both dependencies beforemcconfigand is covered by an idempotence test.User impact
The github.io Web Flash page can install the M5StackChan CoreS3-specific host. Existing supported M5Stack targets remain available, while the EOL Fire target is removed from the active selector.
Release impact
minorRelease note
Web Flash now supports installing the M5StackChan CoreS3 host. The EOL M5Stack Fire target has been removed from the active firmware bundle and Web Flash selector.
Validation
npm run bundlefrom clean generated output (all four active images fit their factory partitions)npm run build:m5stackchan_cores3from clean generated outputnpm testinfirmware(164 tests)npm run check:architecture(56 tests)npx biome ci . --error-on-warningsinfirmware(415 files)npm testinweb(90 tests)m5stackchan_cores3release bundle to a physical device via/dev/ttyACM0, erased a pre-existing MOD partition, and confirmed device operationNotes
The generic M5Stack release image has 38,752 bytes (about 1%) remaining in its factory partition.
Summary by CodeRabbit