Skip to content

Report embedded rust panic messages to the host using RTT / jlink

License

Notifications You must be signed in to change notification settings

tstellanova/panic-rtt-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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");
}

About

Report embedded rust panic messages to the host using RTT / jlink

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages