- Starting OpenOCD for STMicroelectronics NUCLEO Boards:
openocd -f board/st_nucleo_f7.cfg
-
Starting GDB with Your Binary:
arm-none-eabi-gdb target/thumbv7em-none-eabihf/debug/your_project_name
-
Connecting GDB to OpenOCD:
target remote :3333
-
Loading the Program onto the Board:
load
-
Running the Program:
continue
-
Interrupting the Program Execution:
Ctrl+C
-
Detaching GDB from the Target:
detach
-
Exiting GDB:
quit
-
Disassembling the Code:
arm-none-eabi-objdump -Cd target/thumbv7em-none-eabihf/debug/your_project_name
-
Reading ELF File Headers:
arm-none-eabi-readelf -h target/thumbv7em-none-eabihf/debug/your_project_name
-
Setting a Breakpoint:
break [function_name or file_name:line_number]
-
Viewing the Source Code:
list
-
Stepping Through the Code:
- Next Line (Step Over):
next
- Into a Function (Step In):
step
- Next Line (Step Over):
-
Inspecting Variables:
print [variable_name]
-
Examining Memory:
x/[length][format] [address]
-
Viewing Register Values:
info registers