Skip to content
Snippets Groups Projects
Commit e11f6995 authored by Per's avatar Per
Browse files

for forked cortex-m

parent c278f3a2
No related branches found
No related tags found
No related merge requests found
[package] [package]
name = "cortex-m-debug" name = "cortex-m-debug"
version = "0.1.0" version = "0.1.1"
authors = ["Per Lindgren <per.lindgren@ltu.se>"] authors = ["Per Lindgren <per.lindgren@ltu.se>"]
[dependencies] [dependencies]
......
...@@ -4,18 +4,24 @@ ...@@ -4,18 +4,24 @@
#[macro_export] #[macro_export]
macro_rules! ip { macro_rules! ip {
($s:expr) => { ($s:expr) => {
{
extern crate cortex_m;
#[allow(unsafe_code)] #[allow(unsafe_code)]
cortex_m::itm::write_str( cortex_m::itm::write_str(
unsafe { &(&*cortex_m::peripheral::ITM.get()).stim[0] }, unsafe { &(&*cortex_m::peripheral::ITM.get()).stim[0] },
$s $s
); );
}
}; };
($($arg:tt)*) => { ($($arg:tt)*) => {
{
extern crate cortex_m;
#[allow(unsafe_code)] #[allow(unsafe_code)]
cortex_m::itm::write_fmt( cortex_m::itm::write_fmt(
unsafe { &(&*cortex_m::peripheral::ITM.get()).stim[0] }, unsafe { &(&*cortex_m::peripheral::ITM.get()).stim[0] },
format_args!($($arg)* format_args!($($arg)*)
)); );
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment