Skip to content

Commit

Permalink
Use defmt-rtt for 1170EVK board
Browse files Browse the repository at this point in the history
Following the precedent of other EVKs. Tested on hardware.
  • Loading branch information
mciantyre committed Oct 27, 2023
1 parent 964be75 commit dbe1a13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
5 changes: 2 additions & 3 deletions board/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,9 @@ imxrt1170evk-cm7 = [
"imxrt-ral/imxrt1176_cm7",
"imxrt-hal/imxrt1170",
"imxrt1170evk-fcb",
"rtt-target",
"panic-rtt-target",
"defmt-rtt",
"panic-probe",
"imxrt-log",
"imxrt-log/defmt",
]

# Some boards (Teensy 4) require a resource
Expand Down
14 changes: 9 additions & 5 deletions board/src/imxrt1170evk-cm7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ mod imxrt11xx {
use imxrt11xx::clock_tree;

#[cfg(target_arch = "arm")]
use imxrt1170evk_fcb as _;
use defmt_rtt as _;
#[cfg(target_arch = "arm")]
use panic_rtt_target as _;
use imxrt1170evk_fcb as _;

use panic_probe as _;

#[defmt::panic_handler]
fn defmt_panic() -> ! {
cortex_m::asm::udf();
}

/// You'll find log messages using the serial console, through the DAP.
pub(crate) const DEFAULT_LOGGING_BACKEND: crate::logging::Backend = crate::logging::Backend::Lpuart;
Expand Down Expand Up @@ -159,9 +166,6 @@ pub struct Specifics {

impl Specifics {
pub(crate) fn new(common: &mut crate::Common) -> Self {
#[cfg(target_arch = "arm")]
rtt_target::rtt_init_print!();

// Manually configuring IOMUXC_SNVS pads, since there's no
// equivalent API in imxrt-iomuxc.
let iomuxc_snvs = unsafe { ral::iomuxc_snvs::IOMUXC_SNVS::instance() };
Expand Down

0 comments on commit dbe1a13

Please sign in to comment.