This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 88//!
99//! Target program:
1010//!
11- //! ```
12- //! #[macro_use]
13- //! extern crate cortex_m_semihosting;
11+ //! ```no_run
1412//! use cortex_m_semihosting::debug::{self, EXIT_SUCCESS, EXIT_FAILURE};
1513//!
1614//! fn main() {
Original file line number Diff line number Diff line change 2929//!
3030//! This example will demonstrate how to print formatted strings.
3131//!
32- //! ```rust
33- //! extern crate cortex_m_semihosting;
34- //!
32+ //! ```no_run
3533//! use cortex_m_semihosting::hio;
3634//! use core::fmt::Write;
3735//!
108106//!
109107//! Target program:
110108//!
111- //! ```
112- //! extern crate cortex_m_semihosting;
109+ //! ```no_run
110+ //! use cortex_m_semihosting::syscall ;
113111//!
114112//! // This function will be called by the application
115113//! fn print() {
133131//!
134132//! Example:
135133//!
136- //! ```
134+ //! ```no_run
137135//! const UUID: *mut u32 = 0x0009_FC70 as *mut u32;
138136//! dbg!(UUID);
139137//! let mut uuid: [u32; 4] = [0; 4];
140138//! for i in 0..4 {
141139//! dbg!(i);
142- //! uuid[i] = unsafe { dbg!(UUID.offset(i as isize).read_volatile()) }; }
140+ //! uuid[i] = unsafe { dbg!(UUID.offset(i as isize).read_volatile()) };
143141//! }
144142//! ```
145143//! outputs
146- //! ```
144+ //! ```text
147145//! [examples/semihosting.rs:37] UUID = 0x0009fc70
148146//! [examples/semihosting.rs:40] i = 0
149147//! [examples/semihosting.rs:41] UUID.offset(i as isize).read_volatile() = 3370045464
186184#![ deny( warnings) ]
187185#![ no_std]
188186
189- extern crate cortex_m;
190-
191187#[ macro_use]
192188mod macros;
193189
You can’t perform that action at this time.
0 commit comments