Commit 21ff86c7 authored by DevDoggo's avatar DevDoggo

Bare1.1 done

parent 5c792b31
#!/bin/bash
#cargo build --target thumbv7em-none-eabihf --release
cargo build --target thumbv7em-none-eabihf --example bare0
#cargo build --target thumbv7em-none-eabihf --example bare1
#cargo build --target thumbv7em-none-eabihf --example bare0
cargo build --target thumbv7em-none-eabihf --example bare1
......@@ -19,16 +19,19 @@ extern crate cortex_m_debug;
#[inline(never)]
fn main() {
// ITM trace (fast)
cortex_m::asm::bkpt();
// start `itmdump` before `openocd`
ipln!("ITM: Hello World");
cortex_m::asm::bkpt();
// semihosting trace (slow)
sprintln!("SEMIHOSTING: Hello World");
// to prevent returning
loop {
// cortex_m::asm::nop();
// cortex_m::asm::bkpt();
cortex_m::asm::bkpt();
sprintln!("SEMIHOSTING: boye");
}
}
......@@ -42,10 +45,14 @@ fn main() {
// loop, (press pause/suspend to verify this).
// what is the output in the ITM console
// ** your answer here **
//
// >> ITM: Hello World
//
// what is the output in the semihosting (openocd) console
// ** your answer here **
//
// >> SEMIHOSTING: Hello World
//
// commit your answers (bare1_1)
//
// 2. inspecting the assembly
......
#!/bin/bash
TARGET=thumbv7em-none-eabihf
#arm-none-eabi-gdb target/$TARGET/release/examples/bare0
#arm-none-eabi-gdb target/$TARGET/debug/examples/bare0
arm-none-eabi-gdb target/$TARGET/debug/examples/bare0
#arm-none-eabi-gdb target/$TARGET/debug/examples/bare1
arm-none-eabi-gdb target/$TARGET/debug/examples/bare1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment