Description
When copying large files (>1 KB) to the board's internal filesystem via mpremote cp, the USB connection intermittently drops mid-transfer. This makes it unreliable to deploy scripts or drivers to the board without using mpremote mount.
Symptoms
mpremote cp fails with SerialException or OSError: [Errno 5] Input/output error
- The board disappears from
/dev/ttyACM* and needs to be unplugged/replugged
- Not reproducible 100% of the time — suggests a race condition in the DAPLink firmware
- Small files (<500 bytes) copy reliably
Impact
- Cannot reliably deploy standalone scripts (e.g., calibration
main.py) to run without USB
- Driver files (
device.py) are often too large to copy reliably
- Workaround: use
mpremote mount (requires USB connection during execution)
Workaround
Use mpremote mount lib/ to run scripts directly from the host instead of copying to the board's flash.
Root cause
Likely a race condition in the STM32F103 DAPLink USB CDC bridge. See steamicc/DAPLink#6 for the firmware-side investigation.
Related
Description
When copying large files (>1 KB) to the board's internal filesystem via
mpremote cp, the USB connection intermittently drops mid-transfer. This makes it unreliable to deploy scripts or drivers to the board without usingmpremote mount.Symptoms
mpremote cpfails withSerialExceptionorOSError: [Errno 5] Input/output error/dev/ttyACM*and needs to be unplugged/repluggedImpact
main.py) to run without USBdevice.py) are often too large to copy reliablympremote mount(requires USB connection during execution)Workaround
Use
mpremote mount lib/to run scripts directly from the host instead of copying to the board's flash.Root cause
Likely a race condition in the STM32F103 DAPLink USB CDC bridge. See steamicc/DAPLink#6 for the firmware-side investigation.
Related