#arm #communication-channel #dcc #panic-handler #panic-message #debugging

no-std panic-dcc

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

2 releases

0.1.1 Feb 25, 2025
0.1.0 Feb 24, 2025

#1176 in Embedded development

Download history 153/week @ 2025-02-19 125/week @ 2025-02-26

278 downloads per month

MIT/Apache

15KB
93 lines

arm-dcc

a panic handler that uses arm-dcc to print the panic info over an 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/panic-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 panic-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:

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

Dependencies