MaxAtslega / embedded-rust-esp32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embedded Rust Example for ESP32

Useful Commands for ARM Cortex-M Development and Debugging

Setting Up and Running OpenOCD

  • Starting OpenOCD for STMicroelectronics NUCLEO Boards:
    openocd -f board/st_nucleo_f7.cfg
    

Starting and Using GDB

  • 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

Additional Debugging Commands

  • 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
  • Inspecting Variables:

    print [variable_name]
  • Examining Memory:

    x/[length][format] [address]
  • Viewing Register Values:

    info registers

About


Languages

Language:Rust 100.0%