Skip to content

feat: add USB CDC support and ReadFlash protocol#24

Merged
deadprogram merged 1 commit intotinygo-org:mainfrom
jgangemi:jae/usb-cdc-infra
Apr 12, 2026
Merged

feat: add USB CDC support and ReadFlash protocol#24
deadprogram merged 1 commit intotinygo-org:mainfrom
jgangemi:jae/usb-cdc-infra

Conversation

@jgangemi
Copy link
Copy Markdown
Contributor

@jgangemi jgangemi commented Apr 11, 2026

  • chunk SLIP writes to 64 bytes for USB CDC endpoint compatibility
  • use 1KB RAM upload blocks for USB connections
  • add ReadFlash protocol with SLIP-framed blocks and cumulative ACKs
  • add SLIP leftover buffer for multi-frame USB transfers
  • add port re-open recovery for TinyUSB CDC re-enumeration

- chunk SLIP writes to 64 bytes for USB CDC endpoint compatibility
- use 1KB RAM upload blocks for USB connections
- add ReadFlash protocol with SLIP-framed blocks and cumulative ACKs
- add SLIP leftover buffer for multi-frame USB transfers
- add port re-open recovery for TinyUSB CDC re-enumeration
@jgangemi jgangemi force-pushed the jae/usb-cdc-infra branch from 3e5c1ae to 812a5a1 Compare April 11, 2026 16:08
@deadprogram
Copy link
Copy Markdown
Member

Hello @jgangemi I tried this branch out on my xiao ESP32-S3 and noticed that it was MUCH slower on the initial connection. It did work to flash the device once it finally connected.

Worked as expected on the Xiao ESP32-C3

@deadprogram
Copy link
Copy Markdown
Member

Further update: if I use this along with the updated stubs as it is in PR #23 then it does work on both ESP32-C3 and ESP32-S3 boards.

@deadprogram deadprogram merged commit e9d4fce into tinygo-org:main Apr 12, 2026
3 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.

2 participants