$ openocd -f nucleo-l152re.cfg # Starts the OpenOCD server.
You can find
nucleo-l152re.cfg
here.
$ telnet localhost 4444 # Connects to the OpenOCD server.
> reset halt # Performs as hard a reset as possible, and immediately halts the target.
$ arm-none-eabi-gdb
(gdb) target remote localhost:3333
Loads symbols from foo.elf
:
(gdb) file foo.elf
Prints the name of a symbol which is stored at address <addr>
:
(gdb) info symbol <addr>
Disassembles the next source line:
(gdb) set disassemble-next-line on
Prints the instruction to be executed next:
(gdb) x/i $pc
Examines memory at location <addr>
:
(gdb) x/xw <addr>