| Crates.io | dvcdbg |
| lib.rs | dvcdbg |
| version | 0.3.0 |
| created_at | 2025-08-09 20:13:46.344622+00 |
| updated_at | 2025-09-03 11:57:27.823742+00 |
| description | Lightweight diagnostics toolkit for embedded (no_std, I2C scan, quick tests) |
| homepage | |
| repository | https://github.com/p14c31355/dvcdbg |
| max_upload_size | |
| id | 1788210 |
| size | 101,177 |
🛠️ Lightweight debugging crate for embedded Rust (no_std friendly)
dvcdbg is a lightweight, no_std-friendly debugging library for embedded Rust. It is designed to simplify the initial setup and bring-up of new hardware by providing a convenient set of diagnostic tools.
no_std environmentsscan_i2c)write_hex!)measure_cycles!)quick_diag!cargo add dvcdbg --no-default-features --features "ehal_0_2"
Logging & Formatting
write_hex!(dst, &buf)12 AB FF ).write_bin!(dst, &buf)10101010 11110000 ).assert_log!(cond, logger, "msg")Diagnostics
scan_i2c(i2c, serial)
Scan I2C bus and log found devices.quick_diag!(serial, i2c, timer [, { expr }])Timing & Control
measure_cycles!(expr, timer)loop_with_delay!(delay, ms, { body })Adapters
adapt_serial!(AdapterName)core::fmt::Write]embedded_io::Write]nb::serial::Write<u8>]Explore
Since dvcdbg is designed for a no_std environment, it is important to minimise the final binary size.
Enabling LTO (link-time optimisation) and strip during release builds will remove unused code from dvcdbg and other dependent crates, significantly reducing the binary size.
Add the following settings to your application's Cargo.toml.
# Cargo.toml (application)
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true
no_stdBug reports, feature suggestions, and pull requests are welcome! See CONTRIBUTING.md for guidelines.
MIT OR Apache-2.0