Add flash dump, serial terminal, and UX fixes#7
Merged
Conversation
Flash dump via U-Boot: - flashdump.py: sf probe → sf read → md.b hex parser → binary file - detect_flash_from_text(): finds flash size from boot log or sf probe - Fixed false-positive: "RAM size: 128MB" no longer matches as 8MB - CLI: defib dump-flash -p PORT -o flash.bin [--size 16MB] - TUI: Ctrl-D triggers dump, WebUI: "Dump Flash" button Serial terminal (TUI): - TextArea-based terminal replaces broken RichLog approach - Direct keystroke passthrough via on_key → serial write - Backspace handling: interprets BS control chars from U-Boot - Backspace stops at line boundaries - Ctrl-key combos pass through to Textual actions (Ctrl-Q=quit etc) - Arrow keys send ANSI escape sequences (U-Boot command history) - Auto-scrolls to bottom on new output Serial console (WebUI): - Ctrl-C button, md.b hex parser for flash dump - sendUbootCmd() uses \r line endings Bug fixes: - \r not \n for U-Boot commands (all interfaces) - Ctrl-Q to quit (was q, intercepted typing) - CancelledError handled in flash dump worker - Flash size regex: context-aware, power-of-two validation Tests: 20 flashdump tests, 7 autoboot tests, 198 total passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Verified on real hardware
Test plan
🤖 Generated with Claude Code