gdb + openocd 调试嵌入式软件
2016-12-06 23:16
302 查看
1.openocd是硬件层次的调试,gdb是源码层次的调试。
2.在gdb中可以使用monitor发送openocd的命令,例如monitor reset;halt
3.JTAG有4种复位方式:
There are many kinds of reset possible through JTAG, but they may not
all work with a given board and adapter. That’s part of why reset
configuration can be error prone.
System Reset, the SRST hardware signal resets all chips connected to the JTAG adapter, such as processors, power management chips, and I/O controllers. Normally resets triggered with this signal behave exactly like pressing a RESET button.
JTAG TAP Reset, the TRST hardware signal resets just the TAP
controllers con- nected to the JTAG adapter. Such resets should not be
visible to the rest of the system; resetting a device’s TAP controller
just puts that controller into a known state.
Emulation Reset, many devices can be reset through JTAG commands.
These resets are often distinguishable from system resets, either
explicitly (a “reset reason” register says so) or implicitly (not all
parts of the chip get reset).
Other Resets, system-on-chip devices often support several other
types of reset. You may need to arrange that a watchdog timer stops
while debugging, preventing a watchdog reset. There may be individual
module resets.
In the best case, OpenOCD can hold SRST, then reset the TAPs via TRST and send commands through JTAG to halt the CPU at the reset vector before the 1st instruction is executed. Then when it finally releases
the SRST signal, the system is halted under debugger control before
any code has executed. This is the behavior required to support the
reset halt and reset init commands; after reset init a board-specific
script might do things like setting up DRAM. (See [Reset Command],
page 97.)
2.在gdb中可以使用monitor发送openocd的命令,例如monitor reset;halt
3.JTAG有4种复位方式:
There are many kinds of reset possible through JTAG, but they may not
all work with a given board and adapter. That’s part of why reset
configuration can be error prone.
System Reset, the SRST hardware signal resets all chips connected to the JTAG adapter, such as processors, power management chips, and I/O controllers. Normally resets triggered with this signal behave exactly like pressing a RESET button.
JTAG TAP Reset, the TRST hardware signal resets just the TAP
controllers con- nected to the JTAG adapter. Such resets should not be
visible to the rest of the system; resetting a device’s TAP controller
just puts that controller into a known state.
Emulation Reset, many devices can be reset through JTAG commands.
These resets are often distinguishable from system resets, either
explicitly (a “reset reason” register says so) or implicitly (not all
parts of the chip get reset).
Other Resets, system-on-chip devices often support several other
types of reset. You may need to arrange that a watchdog timer stops
while debugging, preventing a watchdog reset. There may be individual
module resets.
In the best case, OpenOCD can hold SRST, then reset the TAPs via TRST and send commands through JTAG to halt the CPU at the reset vector before the 1st instruction is executed. Then when it finally releases
the SRST signal, the system is halted under debugger control before
any code has executed. This is the behavior required to support the
reset halt and reset init commands; after reset init a board-specific
script might do things like setting up DRAM. (See [Reset Command],
page 97.)
相关文章推荐
- 嵌入式linux调试:用gdbserver调试共享库
- 使用GDB调试Linux软件
- 嵌入式Linux系统的GDB远程调试实践(转)
- 嵌入式Linux系统的GDB远程调试的实现
- 【嵌入式Linux学习七步曲之第四篇 Linux内核移植】GDB和BDI2000调试PPC Linux内核
- 嵌入式软件调试开发环境Tornado
- 使用 GDB 调试 Linux 软件
- 建立嵌入式gdb调试环境
- 在嵌入式开发环境里调试,用gdb和gdbserver调试应用程序。
- 嵌入式开发远程调试arm-linux-gdb的移植
- 嵌入式linux下用gdbserver调试共享库
- 嵌入式Linux的GDB远程调试的实现
- 使用VIM开发软件项目 - (15) 在VIM中使用GDB调试 (一)
- 使用gdb来调试嵌入式系统
- 嵌入式Linux系统的GDB远程调试实践
- gdb 远程调试 嵌入式系统下的程序
- 使用GDB调试Linux软件
- 使用GDB调试Linux软件
- 低成本的ARM调试方案——有关于Wiggler、H-Jtag、OpenOCD、GDB、Insight
- 使用 GDB 调试 Linux 软件