Objdump in Hard Fault Handler Should Drop --release
In the section Getting Started->Exceptions->The hard fault handler, explicit directions are not given to run the program. That is probably acceptable, but I'm assuming most people would have made the changes to memory.x and switch to the last target in .cargo/config and then run openocd like this:
FLASH : ORIGIN = 0x08000000, LENGTH = 256K RAM : ORIGIN = 0x20000000, LENGTH = 40K
target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)
After that they would run openocd. I would expect that "cargo build" would have been expected in another terminal which by default build a debug version. Finally I get to my question:
Shouldn't argo objdump --bin app --release -- -d -no-show-raw-insn -print-imm-hex actually be: argo objdump --bin app -- -d -no-show-raw-insn -print-imm-hex to create a dump of the debug version just compiled?
If "--release" is left out, the pc of:
ExceptionFrame { ... pc: 0x08000e00, xpsr: 0x61000200, }
matches this:
08000dfa core::ptr::read_volatile::h436b41ad0b34e32b: 8000dfa: sub sp, #0xc 8000dfc: str r0, [sp, #0x4] 8000dfe: ldr r0, [sp, #0x4] 8000e00: ldr r0, [r0]
and once again the ldr is the cause, but not at a ResetTrampoline
Perhaps there should be a small block with compile directions or maybe even a small note stating "--release" is not needed in the objdump if it was compiled in debug - which most people would do when building for use with gdb.