ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2011年2月14日 星期一

openocd : target_scrupt , target configure -event

以前的 opencoded 操作範例 都又 target_script 0 .. 但是現在做起來卻說不認識 target_script_0,google 說 target_script 已經被 event 機制取代 這一篇也有說 target_script 已經淘汰了,由 targget event 取代 target_script <target#> <eventname> <scriptname> use <target_name> configure -event <eventname> "script <scriptname>" 至於 event 有哪些,要看 opencod 的 user manual:

The following target events are defined:

  • debug-halted The target has halted for debug reasons (i.e.: breakpoint)
  • debug-resumed The target has resumed (i.e.: gdb said run)
  • early-halted Occurs early in the halt process
  • gdb-attach When GDB connects. This is before any communication with the target, so this can be used to set up the target so it is possible to probe flash. Probing flash is necessary during gdb connect if gdb load is to write the image to flash. Another use of the flash memory map is for GDB to automatically hardware/software breakpoints depending on whether the breakpoint is in RAM or read only memory.
  • gdb-detach When GDB disconnects
  • gdb-end When the target has halted and GDB is not doing anything (see early halt)
  • gdb-flash-erase-start Before the GDB flash process tries to erase the flash
  • gdb-flash-erase-end After the GDB flash process has finished erasing the flash
  • gdb-flash-write-start Before GDB writes to the flash
  • gdb-flash-write-end After GDB writes to the flash
  • gdb-start Before the target steps, gdb is trying to start/resume the target
  • halted The target has halted
  • reset-assert-pre Issued as part of reset processing after reset_init was triggered but before either SRST alone is re-asserted on the scan chain, or reset-assert is triggered.
  • reset-assert Issued as part of reset processing after reset-assert-pre was triggered. When such a handler is present, cores which support this event will use it instead of asserting SRST. This support is essential for debugging with JTAG interfaces which don't include an SRST line (JTAG doesn't require SRST), and for selective reset on scan chains that have multiple targets.
  • reset-assert-post Issued as part of reset processing after reset-assert has been triggered. or the target asserted SRST on the entire scan chain.
  • reset-deassert-pre Issued as part of reset processing after reset-assert-post has been triggered.
  • reset-deassert-post Issued as part of reset processing after reset-deassert-pre has been triggered and (if the target is using it) after SRST has been released on the scan chain.
  • reset-end Issued as the final step in reset processing.
  • reset-init Used by reset init command for board-specific initialization. This event fires after reset-deassert-post.

    This is where you would configure PLLs and clocking, set up DRAM so you can download programs that don't fit in on-chip SRAM, set up pin multiplexing, and so on. (You may be able to switch to a fast JTAG clock rate here, after the target clocks are fully set up.)

  • reset-start Issued as part of reset processing before reset_init is called.

    This is the most robust place to use jtag_rclk or adapter_khz to switch to a low JTAG clock rate, when reset disables PLLs needed to use a fast clock.

  • resume-start Before any target is resumed
  • resume-end After all targets have resumed
  • resume-ok Success
  • resumed Target has resumed

event script 可以寫 echo "ok ok ok". 這樣可以確認什麼時候script被 run 到。

沒有留言:

標籤

網誌存檔