Skip to content
Snippets Groups Projects
Commit e4d92af5 authored by anttib-5's avatar anttib-5
Browse files

bare1_2

parent 1e379a53
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,8 @@ fn main() -> ! {
let mut _x = 0;
loop {
_x += 1;
cortex_m::asm::nop();
cortex_m::asm::bkpt();
//cortex_m::asm::nop();
//cortex_m::asm::bkpt();
_x -= 1;
}
}
......@@ -70,30 +70,30 @@ fn main() -> ! {
// (gdb) disassemble
//
//Dump of assembler code for function Reset:
// => 0x0800061a <+0>: bl 0x800068a <DefaultPreInit>
// 0x0800061e <+4>: b.n 0x8000620 <Reset+6>
// 0x08000620 <+6>: movw r0, #0
// 0x08000624 <+10>: movt r0, #8192 ; 0x2000
// 0x08000628 <+14>: movw r1, #0
// 0x0800062c <+18>: movt r1, #8192 ; 0x2000
// 0x08000630 <+22>: bl 0x800068c <r0::zero_bss>
// 0x08000634 <+26>: b.n 0x8000636 <Reset+28>
// 0x08000636 <+28>: movw r0, #0
// 0x0800063a <+32>: movt r0, #8192 ; 0x2000
// 0x0800063e <+36>: movw r1, #0
// 0x08000642 <+40>: movt r1, #8192 ; 0x2000
// 0x08000646 <+44>: movw r2, #2580 ; 0xa14
// 0x0800064a <+48>: movt r2, #2048 ; 0x800
// 0x0800064e <+52>: bl 0x80006d4 <r0::init_data>
// 0x08000652 <+56>: b.n 0x8000654 <Reset+58>
// 0x08000654 <+58>: movw r0, #60808 ; 0xed88
// 0x08000658 <+62>: movt r0, #57344 ; 0xe000
// 0x0800065c <+66>: ldr r1, [r0, #0]
// 0x0800065e <+68>: orr.w r1, r1, #15728640 ; 0xf00000
// 0x08000662 <+72>: bl 0x800074e <core::ptr::write_volatile>
// 0x08000666 <+76>: b.n 0x8000668 <Reset+78>
// 0x08000668 <+78>: bl 0x800066e <ResetTrampoline>
// 0x0800066c <+82>: udf #254 ; 0xfe
// => 0x08000616 <+0>: bl 0x8000686 <DefaultPreInit>
// 0x0800061a <+4>: b.n 0x800061c <Reset+6>
// 0x0800061c <+6>: movw r0, #0
// 0x08000620 <+10>: movt r0, #8192 ; 0x2000
// 0x08000624 <+14>: movw r1, #0
// 0x08000628 <+18>: movt r1, #8192 ; 0x2000
// 0x0800062c <+22>: bl 0x8000688 <r0::zero_bss>
// 0x08000630 <+26>: b.n 0x8000632 <Reset+28>
// 0x08000632 <+28>: movw r0, #0
// 0x08000636 <+32>: movt r0, #8192 ; 0x2000
// 0x0800063a <+36>: movw r1, #0
// 0x0800063e <+40>: movt r1, #8192 ; 0x2000
// 0x08000642 <+44>: movw r2, #2580 ; 0xa14
// 0x08000646 <+48>: movt r2, #2048 ; 0x800
// 0x0800064a <+52>: bl 0x80006d0 <r0::init_data>
// 0x0800064e <+56>: b.n 0x8000650 <Reset+58>
// 0x08000650 <+58>: movw r0, #60808 ; 0xed88
// 0x08000654 <+62>: movt r0, #57344 ; 0xe000
// 0x08000658 <+66>: ldr r1, [r0, #0]
// 0x0800065a <+68>: orr.w r1, r1, #15728640 ; 0xf00000
// 0x0800065e <+72>: bl 0x800074a <core::ptr::write_volatile>
// 0x08000662 <+76>: b.n 0x8000664 <Reset+78>
// 0x08000664 <+78>: bl 0x800066a <ResetTrampoline>
// 0x08000668 <+82>: udf #254 ; 0xfe
// End of assembler dump.
//
// Commit your answers (bare1_2)
......@@ -105,43 +105,7 @@ fn main() -> ! {
// (gdb) disassemble
//
//
// Dump of assembler code for function main:
// 0x08000404 <+0>: sub sp, #16
// 0x08000406 <+2>: movs r0, #0
// 0x08000408 <+4>: str r0, [sp, #12]
// 0x0800040a <+6>: b.n 0x800040c <main+8>
// 0x0800040c <+8>: ldr r0, [sp, #12]
// 0x0800040e <+10>: adds r1, r0, #1
// 0x08000410 <+12>: mov r2, r1
// 0x08000412 <+14>: cmp r1, r0
// 0x08000414 <+16>: str r2, [sp, #8]
// 0x08000416 <+18>: bvs.n 0x800043a <main+54>
// 0x08000418 <+20>: b.n 0x800041a <main+22>
// 0x0800041a <+22>: ldr r0, [sp, #8]
// 0x0800041c <+24>: str r0, [sp, #12]
// 0x0800041e <+26>: bl 0x8000400 <cortex_m::asm::nop>
// 0x08000422 <+30>: b.n 0x8000424 <main+32>
// => 0x08000424 <+32>: bkpt 0x0000
// 0x08000426 <+34>: b.n 0x8000428 <main+36>
// 0x08000428 <+36>: ldr r0, [sp, #12]
// 0x0800042a <+38>: subs r1, r0, #1
// 0x0800042c <+40>: cmp r0, #1
// 0x0800042e <+42>: str r1, [sp, #4]
// 0x08000430 <+44>: bvs.n 0x8000448 <main+68>
// 0x08000432 <+46>: b.n 0x8000434 <main+48>
// 0x08000434 <+48>: ldr r0, [sp, #4]
// 0x08000436 <+50>: str r0, [sp, #12]
// 0x08000438 <+52>: b.n 0x800040c <main+8>
// 0x0800043a <+54>: movw r0, #2268 ; 0x8dc
// 0x0800043e <+58>: movt r0, #2048 ; 0x800
// 0x08000442 <+62>: bl 0x800046a <panic>
// 0x08000446 <+66>: udf #254 ; 0xfe
// 0x08000448 <+68>: movw r0, #2340 ; 0x924
// 0x0800044c <+72>: movt r0, #2048 ; 0x800
// 0x08000450 <+76>: bl 0x800046a <panic>
// 0x08000454 <+80>: udf #254 ; 0xfe
// End of assembler dump.
//
// Commit your answers (bare1_3)
//
// 4. Now remove the comment for `cortex_m::asm::bkpt()`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment