-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move to embedded-hal v0.2 and cortex-m-rt v0.5 to reduce the number o…
…f unstable features
- Loading branch information
Showing
40 changed files
with
681 additions
and
896 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,36 @@ | ||
//! Prints "Hello, world" on the OpenOCD console | ||
#![deny(unsafe_code)] | ||
#![deny(warnings)] | ||
#![no_main] | ||
#![no_std] | ||
|
||
#[macro_use(entry, exception)] | ||
extern crate cortex_m_rt as rt; | ||
extern crate cortex_m_semihosting as semihosting; | ||
extern crate f3; | ||
extern crate panic_semihosting; | ||
|
||
use core::fmt::Write; | ||
|
||
use rt::ExceptionFrame; | ||
use semihosting::hio; | ||
|
||
fn main() { | ||
entry!(main); | ||
|
||
fn main() -> ! { | ||
writeln!(hio::hstdout().unwrap(), "Hello, world!").unwrap(); | ||
|
||
loop {} | ||
} | ||
|
||
exception!(HardFault, hard_fault); | ||
|
||
fn hard_fault(ef: &ExceptionFrame) -> ! { | ||
panic!("{:#?}", ef); | ||
} | ||
|
||
exception!(*, default_handler); | ||
|
||
fn default_handler(irqn: i16) { | ||
panic!("Unhandled exception (IRQn = {})", irqn); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.