Crate panic_dcc

Crate panic_dcc 

Source
Expand description

Report panic messages to the host using the Debug Communication Channel (DCC)

§Example

§Device side

use panic_dcc;

fn main() {
    panic!("Oops");
}

§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
panicked at 'Oops', src/hello.rs:4:4

§Supported Rust version

  • Rust >=1.59