Skip to content
Snippets Groups Projects
Commit 21ff86c7 authored by DevDoggo's avatar DevDoggo
Browse files

Bare1.1 done

parent 5c792b31
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
#cargo build --target thumbv7em-none-eabihf --release #cargo build --target thumbv7em-none-eabihf --release
cargo build --target thumbv7em-none-eabihf --example bare0 #cargo build --target thumbv7em-none-eabihf --example bare0
#cargo build --target thumbv7em-none-eabihf --example bare1 cargo build --target thumbv7em-none-eabihf --example bare1
...@@ -19,16 +19,19 @@ extern crate cortex_m_debug; ...@@ -19,16 +19,19 @@ extern crate cortex_m_debug;
#[inline(never)] #[inline(never)]
fn main() { fn main() {
// ITM trace (fast) // ITM trace (fast)
cortex_m::asm::bkpt();
// start `itmdump` before `openocd` // start `itmdump` before `openocd`
ipln!("ITM: Hello World"); ipln!("ITM: Hello World");
cortex_m::asm::bkpt();
// semihosting trace (slow) // semihosting trace (slow)
sprintln!("SEMIHOSTING: Hello World"); sprintln!("SEMIHOSTING: Hello World");
// to prevent returning // to prevent returning
loop { loop {
// cortex_m::asm::nop(); // cortex_m::asm::nop();
// cortex_m::asm::bkpt(); cortex_m::asm::bkpt();
sprintln!("SEMIHOSTING: boye");
} }
} }
...@@ -43,9 +46,13 @@ fn main() { ...@@ -43,9 +46,13 @@ fn main() {
// what is the output in the ITM console // what is the output in the ITM console
// ** your answer here ** // ** your answer here **
// //
// >> ITM: Hello World
//
// what is the output in the semihosting (openocd) console // what is the output in the semihosting (openocd) console
// ** your answer here ** // ** your answer here **
// //
// >> SEMIHOSTING: Hello World
//
// commit your answers (bare1_1) // commit your answers (bare1_1)
// //
// 2. inspecting the assembly // 2. inspecting the assembly
......
#!/bin/bash #!/bin/bash
TARGET=thumbv7em-none-eabihf TARGET=thumbv7em-none-eabihf
#arm-none-eabi-gdb target/$TARGET/release/examples/bare0 #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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment