diff --git a/examples/bare0.rs b/examples/bare0.rs index c63d88e92e4760d7028a0da1fc0755a89e25ffda..cf7c5cc5b06f007a797f41edc79b2b0b090dde91 100644 --- a/examples/bare0.rs +++ b/examples/bare0.rs @@ -9,7 +9,7 @@ // Minimal runtime / startup for Cortex-M microcontrollers extern crate cortex_m_rt; -const X_INIT: u32 = 10; +const X_INIT: u32 = 0xFFFF_FFFF; static mut X: u32 = X_INIT; static mut Y: u32 = 0; @@ -24,8 +24,7 @@ fn main() { X += 1; Y = X; assert!(x == X && X == Y); - } - } + } } } // 1. run the program in the debugger, @@ -47,7 +46,7 @@ fn main() { // // 2. alter the constant X_INIT so that line 22 directly causes the x to wrap // what happens when x wraps -// ** your answer here ** +// Fail and go to exception handler in lib.rs // // commit your answers (bare0_2) //