Repository navigation
Upload files over the console (YMODEM) - #123
Merged
Merged
Conversation
scripts/ymodem_send.py sends files to the device over its UART console: it types dmell's `ymodem recv -d DEST`, waits for the receiver and sends a YMODEM batch (1024 / 128-byte blocks, CRC-16) - directories with everything in them, names kept under DEST. Only the standard library. The upload-files target sends DMBOOT_UPLOAD_SOURCES (build/sdcard by default) to the running device, install-all flashes first and waits for it to start. Co-Authored-By: Claude Opus 5.5 <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.
What
Uploads files the firmware does not hold (views, configurations, anything for the SD card) to the device over its UART console, using dmell's
ymodemcommand (choco-technologies/dmell#60).scripts/ymodem_send.pytypesymodem recv -d DESTinto the console, waits for the receiver'sCand sends a YMODEM batch with 1024-byte blocks (--block 128is also possible) and CRC-16.SRC=NAMEsends SRC as NAME.--wait SECONDSretries the command until a device that is still starting answers.upload-filessendsDMBOOT_UPLOAD_SOURCES(defaultbuild/sdcard) to the running device.install-allrunsinstall-firmware, then uploads the files once the device has started.Tested on STM32F746G-DISCO
8 × 300 KB to
/mnt/dmsdio0_0p1: no block sent again, ~31 KiB/s. With every 7th packet deliberately broken (lost bytes, bad CRC, half a packet), every file still arrived complete.Needs on the device: choco-technologies/dmell#60 (
ymodem), choco-technologies/dmuart#8 (RX by DMA, a 4 KiB ring) and choco-technologies/dm_sw_ring#8.🤖 Generated with Claude Code