Skip to content

Commit

Permalink
firmware/defmt-itm: Raise compile error on armv6m
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas committed Feb 10, 2021
1 parent d317f82 commit b94614a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions firmware/defmt-itm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ use core::{

use cortex_m::{interrupt, itm, peripheral::ITM, register};

#[cfg(armv6m)]
compile_error! {"`defmt-itm` cannot be used on Cortex-M0(+) chips, because it requires an ITM peripheral"}

static ENABLED: AtomicBool = AtomicBool::new(false);

/// Enables defmt logging over the ITM stimulus port 0.
Expand Down

0 comments on commit b94614a

Please sign in to comment.