How linux-goxceed/gxdl-rs works
gxdl-rs is a Rust library and CLI for uploading loaders to NationalChip GX BootROM devices and issuing bootloader commands. The main flow parses CLI options, selects a loader (or attaches to an existing prompt), opens a serial connection, performs BootROM synchronization and staged upload, then dispatches optional commands. Commands cover serial/USB transfers, flash and OTP operations, network transfers, and host-side file comparison. The graph follows shown calls and README-described behavior; unsampled command handlers are grouped by capability rather than inferred individually.
Main entry points: protocol.rs Boot protocol session · commands.rs Command parsing · main.rs Application entry · uploader.rs Uploader API
Components 16
CLI and API
- CLI options
src/cli.rs - Application entry
src/main.rs - Uploader API
src/uploader.rs
Loader and Boot
- Loader selection
src/loader.rs - Bundled loaders
src/loaders
Protocol Transport
- Boot protocol session
src/protocol.rs - Serial transport
src/serial.rs
Command Operations
- Command parsing
src/commands.rs - Serial / USB I/O
src/commands.rs - Flash and OTP
src/commands.rs - Host file utilities
src/commands.rs
Network Transfer
- Network commands
src/commands.rs - TFTP server
src/tftp.rs
Other components
- Operator / API caller
- GX BootROM / bootloader
- PC TFTP server
Connections 23
- Operator / API caller → CLI options: provides options
README.md - Application entry → CLI options: parses and validates
src/main.rs - Application entry → Command parsing: parses command
src/main.rs - Application entry → Loader selection: resolves image
src/main.rs - Application entry → Uploader API: configures and invokes
src/main.rs - Loader selection → Bundled loaders: loads embedded images
README.md - Uploader API → Serial transport: opens device
src/uploader.rs - Uploader API → Boot protocol session: creates and boots session
src/uploader.rs - Boot protocol session → Loader selection: uses image and bootcode data
src/protocol.rs - Boot protocol session → Serial transport: reads and writes
src/protocol.rs - Boot protocol session → GX BootROM / bootloader: synchronizes and uploads stages
README.md - Uploader API → Command parsing: dispatches commands
src/uploader.rs - Command parsing → Serial / USB I/O: parses transfer operations
src/commands.rs - Command parsing → Flash and OTP: parses device operations
README.md - Command parsing → Host file utilities: parses host utilities
src/commands.rs - Command parsing → Network commands: parses network operations
README.md - Serial / USB I/O → Boot protocol session: issues device commands
src/commands.rs - Flash and OTP → Boot protocol session: issues device commands
src/commands.rs - Host file utilities → Operator / API caller: reads or compares files
README.md - Network commands → Boot protocol session: configures device transfer
src/commands.rs - Network commands → TFTP server: starts send or receive
src/commands.rs - TFTP server → PC TFTP server: transfers files with
README.md - GX BootROM / bootloader → TFTP server: exchanges TFTP packets
README.md