Skip to content

Fix agent CLI progress, CRC32 timeout, and labels#32

Merged
widgetii merged 4 commits intomasterfrom
fix-agent-cli-and-docs
Apr 6, 2026
Merged

Fix agent CLI progress, CRC32 timeout, and labels#32
widgetii merged 4 commits intomasterfrom
fix-agent-cli-and-docs

Conversation

@widgetii
Copy link
Copy Markdown
Member

@widgetii widgetii commented Apr 6, 2026

Summary

  • Progress display: console.print() with \r was appending lines instead of overwriting in-place; switched to plain print() with flush=True
  • CRC32 timeout: hardcoded 10s timeout was too short for 16MB verification; now scales with data size (~1s/MB + 5s baseline)
  • Misleading label: agent upload showed "Sending U-Boot" / "U-Boot complete" — now correctly shows "Sending Agent" / "Agent complete"
  • README: added Flash Agent section documenting agent upload, read, write, info, and scan commands

Test plan

  • Verified on real hardware (hi3516ev300 via /dev/uart-IVGHP203Y-AF)
  • 16MB flash dump completes with CRC32 verification passing
  • Progress output overwrites in-place correctly
  • Agent upload shows correct "Sending Agent" label

🤖 Generated with Claude Code

widgetii and others added 4 commits April 4, 2026 19:39
handle_flash_write now sends per-packet ACK (matching handle_write).
write_flash reuses _write_block for consistent backpressure behavior.

Flash write still fails at ~1MB due to FMC soft reset accumulation
during page programming. RAM write (16MB) verified at 921600 baud.
Flash write needs further debugging of fmc_enter_boot impact.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix progress display: use plain print() instead of Rich console.print()
  which was adding newlines instead of overwriting in-place via \r
- Scale CRC32 verification timeout with data size (~1s/MB) to avoid
  timeout on large reads (16MB was timing out at 10s hard limit)
- Show "Sending Agent" instead of "Sending U-Boot" during agent upload
- Document flash agent commands in main README

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- `agent read` no longer requires -a and -s; defaults to 0x14000000 and
  queries flash size from the device via get_info()
- `agent write` defaults -a to 0x14000000
- `agent read` -o defaults to flash_dump.bin
- Update README examples to show the simpler invocation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@widgetii widgetii merged commit 3752e0d into master Apr 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant