Crate arm_dcc

Source
Expand description

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.

Macros§

dprint
Macro for printing to the DCC
dprintln
Macro for printing to the DCC, with a newline.

Structs§

Writer
Proxy struct that implements the fmt::Write

Functions§

write
Writes a single word to the DCC
write_all
Writes the bytes to the DCC
write_str
Writes the string to the DCC