#rtt #panic #jlink #panic-message #panic-handler #panic-impl

no-std panic-rtt-core

Report panic messages to the host using RTT / jlink

3 unstable releases

0.2.1 Aug 23, 2020
0.1.1 May 20, 2020
0.1.0 Apr 10, 2020

#1448 in Embedded development

Download history 21/week @ 2024-03-13 26/week @ 2024-03-20 53/week @ 2024-03-27 59/week @ 2024-04-03 26/week @ 2024-04-10 64/week @ 2024-04-17 38/week @ 2024-04-24 22/week @ 2024-05-01 20/week @ 2024-05-08 23/week @ 2024-05-15 27/week @ 2024-05-22 16/week @ 2024-05-29 22/week @ 2024-06-05 20/week @ 2024-06-12 29/week @ 2024-06-19 12/week @ 2024-06-26

84 downloads per month
Used in 12 crates

BSD-3-Clause

4KB

panic-rtt-core

Set the panicking behavior to log to a JLINK debugger and break. This leverages the rtt-target crate.

Currently, this crate only supports the ARM Cortex-M architecture.

Example

#![no_std]
use panic_rtt_core::{self, rtt_init_print, rprintln};

fn main() {
  // you must create a print channel if you wish to see print output in RTT
  rtt_init_print!(NoBlockTrim);
  let value = 5;
  rprintln!("Hello world! {}", value);
  panic!("message logged to jlink debugger");
}

lib.rs:

Set the panicking behavior to log to a JLINK debugger and break.

Currently, this crate only supports the ARM Cortex-M architecture.

Usage

#![no_std]

use panic_rtt_core::{self, rtt_init_print, rprintln};

fn main() {
    // you must create a print channel if you wish to see print output in RTT
    rtt_init_print!(NoBlockTrim);
    let value = 5;
    rprintln!("Hello world! {}", value);
    panic!("message logged to jlink debugger");
}

Dependencies

~1MB
~13K SLoC