Just a heads up, I've been refreshing myself on the nuances of OpenOCD-based HAL fun and hit this when following the discovery book:
Fauna2:bma222e me$ cargo run --example hello
Compiling cortex-m-rt v0.6.7 # This is currently 0.6.5 in the project
Compiling bma222e v0.1.0 (/Users/me/Documents/Code/rust/bma222e)
Finished dev [unoptimized + debuginfo] target(s) in 1.07s
Running `arm-none-eabi-gdb -q -x openocd.gdb target/thumbv7m-none-eabi/debug/examples/hello`
Reading symbols from target/thumbv7m-none-eabi/debug/examples/hello...
cortex_m_semihosting::export::hstdout_fmt (args=...)
at /Users/me/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-semihosting-0.3.2/src/export.rs:44
44 interrupt::free(|_| unsafe {
Breakpoint 1 at 0x1424: file /Users/me/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-rt-0.6.7/src/lib.rs, line 553.
Function "UserHardFault" not defined.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
Breakpoint 2 at 0x1390: file /Users/me/.cargo/registry/src/github.com-1ecc6299db9ec823/panic-halt-0.2.0/src/lib.rs, line 33.
Breakpoint 3 at 0x49a: file examples/hello.rs, line 13.
semihosting is enabled
Loading section .vector_table, size 0x400 lma 0x0
Loading section .text, size 0x1210 lma 0x400
openocd.gdb:29: Error in sourced command file:
Load failed
(gdb)