diff --git a/examples/bare1.rs b/examples/bare1.rs index 5de39964b43fce5a918fdb66d64af9ad90e5bc00..e8eb61a0a89698da255630560eb94a68e2286844 100644 --- a/examples/bare1.rs +++ b/examples/bare1.rs @@ -24,7 +24,7 @@ fn main() -> ! { let mut _x = 0; loop { _x += 1; - //cortex_m::asm::nop(); + cortex_m::asm::nop(); //cortex_m::asm::bkpt(); _x -= 1; } @@ -104,8 +104,33 @@ fn main() -> ! { // What is the output of: // (gdb) disassemble // +//Dump of assembler code for function Reset: +// => 0x0800061e <+0>: bl 0x800068e <DefaultPreInit> + // 0x08000622 <+4>: b.n 0x8000624 <Reset+6> + // 0x08000624 <+6>: movw r0, #0 + // 0x08000628 <+10>: movt r0, #8192 ; 0x2000 + // 0x0800062c <+14>: movw r1, #0 + // 0x08000630 <+18>: movt r1, #8192 ; 0x2000 + // 0x08000634 <+22>: bl 0x8000690 <r0::zero_bss> + // 0x08000638 <+26>: b.n 0x800063a <Reset+28> + // 0x0800063a <+28>: movw r0, #0 + // 0x0800063e <+32>: movt r0, #8192 ; 0x2000 + // 0x08000642 <+36>: movw r1, #0 + // 0x08000646 <+40>: movt r1, #8192 ; 0x2000 + // 0x0800064a <+44>: movw r2, #2580 ; 0xa14 + // 0x0800064e <+48>: movt r2, #2048 ; 0x800 + // 0x08000652 <+52>: bl 0x80006d8 <r0::init_data> + // 0x08000656 <+56>: b.n 0x8000658 <Reset+58> + // 0x08000658 <+58>: movw r0, #60808 ; 0xed88 + // 0x0800065c <+62>: movt r0, #57344 ; 0xe000 + // 0x08000660 <+66>: ldr r1, [r0, #0] + // 0x08000662 <+68>: orr.w r1, r1, #15728640 ; 0xf00000 + // 0x08000666 <+72>: bl 0x8000752 <core::ptr::write_volatile> + // 0x0800066a <+76>: b.n 0x800066c <Reset+78> + // 0x0800066c <+78>: bl 0x8000672 <ResetTrampoline> + // 0x08000670 <+82>: udf #254 ; 0xfe +// End of assembler dump. // - // Commit your answers (bare1_3) // // 4. Now remove the comment for `cortex_m::asm::bkpt()`