Skip to content

Commit 843722e

Browse files
committed
Disable semi-hosting
1 parent ce20d3e commit 843722e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/semi_hosting.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// see http://embed.rs/articles/2016/semi-hosting-rust/
22

3+
#![allow(dead_code)]
4+
35
use core::fmt;
46

57
unsafe fn call_svc(num: usize, addr: *const ()) -> usize {
@@ -61,9 +63,9 @@ macro_rules! hprint {
6163
});
6264
}
6365

64-
pub fn print(args: fmt::Arguments) {
65-
use core::fmt::Write;
66-
Stdout.write_fmt(args).unwrap();
66+
pub fn print(_args: fmt::Arguments) {
67+
//use core::fmt::Write;
68+
//Stdout.write_fmt(args).unwrap();
6769
}
6870

6971
static mut STDOUT_BUFFER: ([u8; 100], usize) = ([0; 100], 0);
@@ -99,9 +101,9 @@ macro_rules! hprint_err {
99101
});
100102
}
101103

102-
pub fn print_err(args: fmt::Arguments) {
103-
use core::fmt::Write;
104-
Stderr.write_fmt(args).unwrap();
104+
pub fn print_err(_args: fmt::Arguments) {
105+
//use core::fmt::Write;
106+
//Stderr.write_fmt(args).unwrap();
105107
}
106108

107109
struct Stderr;

0 commit comments

Comments
 (0)