A native Rust implementation of a flash utility for WinnerMicro MCUs (W800/W801 family), including the DSO3D12 oscilloscope.
Based on the reference Python tool from the WinnerMicro IoT SDK: https://github.com/winnermicro/wm_iot_sdk/tree/master
- Auto-detects the highest supported baud rate (up to 2 Mbps)
- XMODEM-1K protocol with CRC-16 verification
- Progress bar with ETA during flashing
- Lists available serial ports with USB product info
- Optional flash erase before writing
- DTR/RTS-based automatic device reset
A graphical application that allows you to visualize and save dumps and screenshots from the ZeeWeii DSO3D12 oscilloscope.
Once connected, the application automatically retrieves debug dumps and snapshot view data from the device, provided these features have been activated via the device buttons. These graphs can be saved as PNG files or exported as CSV data.
To use the snapshot view feature, you must install the modified firmware. For more details, visit ZeeTweak. The debug dump export feature is available by default.
- Rust toolchain (stable, 2021 edition or later)
- A USB-to-serial adapter connected to the target device (or integrated one)
cargo build --releaseThe binaries are produced at:
| Binary | Path |
|---|---|
| CLI flasher | target/release/flash |
| CLI capture | target/release/capture |
| GUI viewer | target/release/dso3d12-gui |
cargo run --bin dso3d12-gui./target/release/flash -lAuto-selects the port and negotiates the highest available baud rate:
./target/release/flash -i dso3d12_v3.0.6_III.flsSpecify the port explicitly:
./target/release/flash -p /dev/tty.usbserial-1110 -i dso3d12_v3.0.6_III.flsFlash multiple images in one pass:
./target/release/flash -p /dev/tty.usbserial-1110 \
-i bootloader.fls -i app.fls./target/release/flash -p /dev/tty.usbserial-1110 -e./target/release/flash -p /dev/tty.usbserial-1110 -e -i firmware.flsSupported rates: 2000000, 1000000, 921600, 460800, 115200.
./target/release/flash -p /dev/tty.usbserial-1110 -b 460800 -i firmware.fls- Connect the supplied USB cable to your PC while the oscilloscope is powered off.
- Press and hold the power button. The scope may enter a power-cycling loop — keep the button held down continuously until flashing reaches 100%.
- The tool resets the device automatically via DTR/RTS. Use
-m/--manual-resetto suppress the automatic reboot after flashing.
Flash tool for Winner Micro MCU
Usage: flash [OPTIONS]
Options:
-p, --port <PORT> serial port
-b, --baudrate <BAUDRATE> serial baudrate
-i, --image <IMAGE> image file paths (repeatable)
-n, --name <NAME> firmware names to burn. Ex: app,bootloader,partition_table,custom...
-e, --erase erase device flash
-l, --list list serial ports
-m, --manual-reset skip automatic reboot after burning
-h, --help Print help
-V, --version Print version
Repository: https://github.com/rssdev10/wm-tools
Listens for the 2048-byte screenshot packet the oscilloscope sends when you open Gallery and select a saved waveform, then prints the parsed settings and samples:
./target/release/capture -p /dev/tty.usbserial-1110 -s screen.bin
./target/release/capture --load screen.bin -d dso3d12 # re-parse a saved packetOptions: -p/--port, -l/--list, -d/--device (dso3d12, dso2512g-v2, dso2512g-v1),
-s/--save, --load, -t/--timeout (seconds, 0 waits forever).
Cargo workspace (resolver = "2"). Shared dependencies are in [workspace.dependencies].
| Package | Path | Purpose |
|---|---|---|
wm-tools |
flasher/ |
CLI binaries flash (XMODEM-1K flasher for W800/W801) and capture (screenshot packet listener). Has its own version. |
dso-parser |
dso-parser/ |
Library: parses the ASCII debug dump and the binary screenshot packet into typed structs; .zwcap container. |
dso3d12-gui |
gui/ |
Desktop viewer and firmware updater (iced 0.14). |
| File | Responsibility |
|---|---|
main.rs |
Boots iced::application(App::new, App::update, App::view) with .subscription(). |
app.rs |
App state, messages, view composition, subscriptions; headless unit tests. |
canvas.rs |
Scope canvas program: grid, traces, measurement and device cursors. |
range_slider.rs |
Custom two-knob range slider widget (canvas::Program). |
serial.rs |
Background serial listener: port list, auto-reconnect, capture detection. |
flash.rs |
Background firmware update over XMODEM-1K. |
export_image.rs |
PNG export (tiny-skia, antialiased text). |
settings.rs |
JSON settings in <config dir>/dso3d12-gui/settings.json. |
logging.rs |
Logger: stderr by default, file on request. |
i18n.rs |
rust-i18n setup and system-locale detection. |
- The serial listener (
serial::start_listening) and the firmware update (flash::start_flash) each run on their ownstd::thread. They report to the GUI through atokio::sync::mpscunbounded channel, whichApp::subscriptionpolls. - Each thread is stopped through an
Arc<AtomicBool>flag in its handle (SerialHandle,FlashHandle); dropping a handle sets the flag and joins the thread. - The listener treats 500 ms without new bytes as the end of a capture, reads with a 100 ms timeout so it notices the stop flag, and retries a lost port every 2 s.
- A serial port has one owner at a time: the GUI stops the listener before it starts a firmware update.
- Opening a port can pulse DTR/RTS, which the DSO3D12 uses as reset lines. Where the platform allows, the listener opens the port natively and clears both lines at once.
The GUI has two independent kinds of cursors; never share state, sliders or toggles between them:
- Measurement cursors: set by the user with the right-hand two-knob range sliders, one per axis. Drawn pink.
- Device cursors: read-only, taken from the capture's metadata and toggled from the data-controls panel. The toggles are disabled when the capture has no device-cursor data. Drawn green.
iced::application(boot, update, view).title(...).theme(...).run():boottakes no arguments.Space::new().width(...).height(...), notwith_width.checkbox(bool).label(s).on_toggle(fn); leave outon_toggleto render it disabled.iced::widget::rule::horizontal(px)andrule::vertical(px).canvas::Text { align_x, align_y, .. }, nothorizontal_alignment.canvas::Program::update(&self, &mut State, &Event, Rectangle, mouse::Cursor) -> Option<canvas::Action<Message>>. Emit messages withcanvas::Action::publish(msg).and_capture()and request redraws withAction::request_redraw().canvas::Eventisiced_core::event::Event(mouse, keyboard, touch, window).
- Capture baud rate: 115200. The flasher negotiates up to 2 Mbps (see
-b). - Acquisition buffer: 60 000 samples per channel.
- Device variants with different packet fields:
dso3d12,dso2512g-v2,dso2512g-v1. - The screenshot packet needs the ZeeTweak firmware; the debug dump works on stock firmware.
| Document | Contents |
|---|---|
| docs/GUI_DESIGN.md | GUI layout, panels, cursor model, serial behaviour, PNG export, settings, logging. |
| docs/USER_MANUAL.md | End-user guide for the viewer. |
| docs/SCREENSHOT_PROTOCOL.md | Screenshot packet layout, ADC-to-voltage conversion, settings offsets, variant differences. |
| packaging/README.md | Files used to assemble the release packages. |
cargo test --workspace # unit tests
cargo clippy --workspace --all-targets -- -D warnings # lint (must be warning-free)Tests live in the crate they test and need no serial device.
The GUI's strings are in gui/locales/ (en, ru, zh, es, hi). Every key exists in
all five files.
RUST_LOGsets the GUI's stderr log level.DSO_LOG_FILE=1also writes<config dir>/dso3d12-gui/dso3d12-gui.log(rotated at 1 MB).
.github/workflows/tests.ymlbuilds, tests and runs clippy on Linux, Windows and macOS for every pull request and every push tomain..github/workflows/release.ymlruns when a GitHub release is created. It buildswm-toolsanddso3d12-guifor each platform and attaches the packages assembled frompackaging/.