2 releases
0.1.1 | Feb 25, 2025 |
---|---|
0.1.0 | Feb 24, 2025 |
#2363 in Embedded development
305 downloads per month
Used in panic-dcc
8KB
80 lines
arm-dcc
a library for sending formatted text to the Arm Debug Communication Channel (DCC) interface
This project is developed and maintained by the [Cortex-R team][team].
See the docs at https://docs.rs/arm-dcc
Minimum Supported Rust Version (MSRV)
This crate is guaranteed to compile on stable Rust 1.59 and up. It might compile with older versions but that may change in any new patch release.
License
The arm-dcc
crate is distributed under the terms of both the MIT license and
the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
lib.rs
:
Debug Communication Channel (DCC) API
Example
Device side
use arm_dcc::dprintln;
fn main() {
dprintln!("Hello, world!");
}
Host side
$ # XSDB = Xilinx System Debugger
$ xsdb
xsdb% # connect
xsdb% conn
xsdb% # select a Cortex-R core
xsdb% targets -set 0
xsdb% # hold the processor in reset state
xsdb% rst -processor
xsdb% # load program
xsdb% dow hello.elf
xsdb% # open a file
xsdb% set f [open dcc.log w]
xsdb% # redirect DCC output to file handle `f`
xsdb% readjtaguart -start -handle $f
xsdb% # start program execution
xsdb% con
$ # on another terminal
$ tail -f dcc.log
Hello, world!
Supported Rust version
- Rust >=1.59
Optional features
nop
Turns dcc::write
into a "no-operation" (not the instruction). This is useful when the DCC is
disabled as dcc::write
blocks forever in that case.