[][src]Crate panic_rtt_core

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

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

Usage

This example is not tested
#![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");
}

Macros

rprint

Prints to the print RTT channel. Works just like the standard print.

rprintln

Prints to the print RTT channel, with a newline. Works just like the standard println.

rtt_init_print

Initializes RTT with a single up channel and sets it as the print channel for the printing macros.