feat(tools): integration of automated firmware flashing and protocol testing - #1
Open
q23818 wants to merge 5 commits into
Open
feat(tools): integration of automated firmware flashing and protocol testing#1q23818 wants to merge 5 commits into
q23818 wants to merge 5 commits into
Conversation
added 5 commits
July 15, 2026 18:30
…prehensive README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates automated firmware deployment with physical hardware protocol validation for the ESP32-C3 chassis controller, resolving dynamic port mapping limitations on macOS/Linux hosts and establishing an unattended flashing-to-testing pipeline.
Issues Addressed & Solutions
Host Serial Port Hardcoding
tests/test_uart.pypreviously hardcoded/dev/ttyS1, causing immediate connection failures on macOS targets.argparseto allow dynamic runtime port injection (e.g.,/dev/cu.usbmodem*).CMD_RESETguard in the connectionfinallyblock to prevent lingering hardware spin states post-execution.Decoupled Flash-Test Pipeline
--testflag totools/batch_burner.py. When enabled, the runner automatically spawns the updatedtest_uart.pysubprocess 1.0 second after a successful flash (allowing host USB subsystem renegotiation).Documentation Debt
README.mdto define standard project topology, Espressif asset mirror configs (solving high-latency GitHub downloads in domestic networks), and detailed SOPs for standalone tests and automated pipeline stages.File Changes
tools/batch_burner.py:--testargument parser logic.sys.executablesubprocess invocation targeting the dynamically discoveredtest_uart.pypath.pyserialand test assets.tests/test_uart.py:README.md:Verification & Test Run
Executed end-to-end regression tests on macOS 15.x target:
Dynamic Testing Validation:
Result: Successfully passed all 26 assertions regarding init handshakes, velocity control, bad-checksum rejection, and out-of-bounds error state machine blocks.
Pipeline Integration Validation:
Result: Target detected -> Flashed successfully at 921600 bps -> Subprocess executed -> 26 assertions passed on live hardware -> Safe disconnect.