1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! Report panic messages to the host using the Debug Communication Channel (DCC)
//!
//! # Example
//!
//! ## Device side
//!
//! ``` ignore
//! use panic_dcc;
//!
//! fn main() {
//! panic!("Oops");
//! }
//! ```
//!
//! ## Host side
//!
//! ``` text
//! $ # 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
//! ```
//!
//! ``` text
//! $ # on another terminal
//! $ tail -f dcc.log
//! panicked at 'Oops', src/hello.rs:4:4
//! ```
//!
//! # Supported Rust version
//!
//! - Rust >=1.59
use ;
use ;
use Writer;
!