diff --git a/src/getting-started/01.00.BUILD.md b/src/getting-started/01.00.BUILD.md index 83a6688..4ed17e7 100644 --- a/src/getting-started/01.00.BUILD.md +++ b/src/getting-started/01.00.BUILD.md @@ -116,7 +116,7 @@ If you have forgotten how to do this, try looking at [the cargo book][cargo]. ``` rust #![no_std] -extern crate panic_abort; +extern crate panic_halt; fn main() { } @@ -141,8 +141,8 @@ neither the crt0 nor the rust runtime are available, so even implementing `start` would not help us. We need to replace the operating system entry point. -You could for example name a function after the default entry point, -which for linux is `_start`, and start that way. +You could for example name a function after the default entry point, +which for linux is `_start`, and start that way. Note, you would also need to disable [name mangling][nm]: ``` rust @@ -232,15 +232,15 @@ and cargo will automatically add `--target thumbv6m-none-eabi`. ### `src/main.rs` -``` rust +``` rust #![no_std] #![no_main] -extern crate panic_abort; +extern crate panic_halt; use cortex_m_rt::entry; -#[entry]; +#[entry] fn main() { } ``` @@ -271,7 +271,7 @@ An easy way to implement this is to use an infinite loop. #![no_std] #![no_main] -extern crate panic_abort; +extern crate panic_halt; use cortex_m_rt::entry; diff --git a/src/getting-started/Cargo.toml b/src/getting-started/Cargo.toml index 186ff92..17270b2 100644 --- a/src/getting-started/Cargo.toml +++ b/src/getting-started/Cargo.toml @@ -3,6 +3,6 @@ name = "start" version = "0.2.0" [dependencies] -panic-abort = "~0.3" -microbit="~0.6" +panic-halt = "~0.2" +microbit="~0.7" cortex-m-rt="~0.6" diff --git a/src/getting-started/src/main.rs b/src/getting-started/src/main.rs index db8c9ce..9937665 100644 --- a/src/getting-started/src/main.rs +++ b/src/getting-started/src/main.rs @@ -3,7 +3,7 @@ extern crate cortex_m_rt; extern crate microbit; -extern crate panic_abort; +extern crate panic_halt; use cortex_m_rt::entry;