moved out stuff that wasn't already moved from openocd.pdf to the target library.
git-svn-id: svn://svn.berlios.de/openocd/trunk@576 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
f2047d4775
commit
53c41935cd
665
doc/openocd.texi
665
doc/openocd.texi
|
@ -47,6 +47,7 @@ This manual documents edition @value{EDITION} of the Open On-Chip Debugger
|
||||||
* Building:: Building Openocd
|
* Building:: Building Openocd
|
||||||
* Running:: Running Openocd
|
* Running:: Running Openocd
|
||||||
* Configuration:: Openocd Configuration.
|
* Configuration:: Openocd Configuration.
|
||||||
|
* Target library:: Target library
|
||||||
* Commands:: Openocd Commands
|
* Commands:: Openocd Commands
|
||||||
* Sample Scripts:: Sample Target Scripts
|
* Sample Scripts:: Sample Target Scripts
|
||||||
* GDB and Openocd:: Using GDB and Openocd
|
* GDB and Openocd:: Using GDB and Openocd
|
||||||
|
@ -235,7 +236,9 @@ chain, the targets that should be debugged, and connected flashes.
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item @b{init} This command terminates the configuration stage and enters the normal
|
@item @b{init} This command terminates the configuration stage and enters the normal
|
||||||
command mode. This can be useful to add commands to the startup scripts and commands
|
command mode. This can be useful to add commands to the startup scripts and commands
|
||||||
such as resetting the target, programming flash, etc.
|
such as resetting the target, programming flash, etc. To reset the CPU upon startup,
|
||||||
|
add "init" and "reset" at the end of the config script or at the end of the
|
||||||
|
openocd command line using the -c option.
|
||||||
@cindex init
|
@cindex init
|
||||||
@item @b{telnet_port} <@var{number}>
|
@item @b{telnet_port} <@var{number}>
|
||||||
@cindex telnet_port
|
@cindex telnet_port
|
||||||
|
@ -263,8 +266,9 @@ Default behaviour is <@var{disable}>
|
||||||
@item @b{daemon_startup} <@var{mode}>
|
@item @b{daemon_startup} <@var{mode}>
|
||||||
@cindex daemon_startup
|
@cindex daemon_startup
|
||||||
@option{mode} can either @option{attach} or @option{reset}
|
@option{mode} can either @option{attach} or @option{reset}
|
||||||
Tells the OpenOCD whether it should reset the target when the daemon is launched, or
|
This is equivalent to adding "init" and "reset" to the end of the config script.
|
||||||
if it should just attach to the target.
|
|
||||||
|
It is availble as a command mainly for backwards compatibility.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@section JTAG interface configuration
|
@section JTAG interface configuration
|
||||||
|
@ -1219,7 +1223,7 @@ Enable/disable target debugmsgs requests. debugmsgs enable messages to be sent t
|
||||||
@chapter Sample Scripts
|
@chapter Sample Scripts
|
||||||
@cindex scripts
|
@cindex scripts
|
||||||
|
|
||||||
This page will collect some script examples for different CPUs.
|
This page shows how to use the target library.
|
||||||
|
|
||||||
The configuration script can be divided in the following section:
|
The configuration script can be divided in the following section:
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1230,657 +1234,16 @@ The configuration script can be divided in the following section:
|
||||||
@item flash configuration
|
@item flash configuration
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
Detailed information about each section can be found at OpenOCD configuration
|
Detailed information about each section can be found at OpenOCD configuration.
|
||||||
|
|
||||||
@section OMAP5912 Flash Debug
|
@section AT91R40008 example
|
||||||
@cindex OMAP5912 Flash Debug
|
@cindex AT91R40008 example
|
||||||
The following two scripts were used with a wiggler PP and and a TI OMAP5912
|
To start OpenOCD with a target script for the AT91R40008 CPU and reset
|
||||||
dual core processor - (@uref{http://www.ti.com}), on a OMAP5912 OSK board
|
the CPU upon startup of the OpenOCD daemon.
|
||||||
- (@uref{http://www.spectrumdigital.com}).
|
|
||||||
@subsection Openocd config
|
|
||||||
@smallexample
|
@smallexample
|
||||||
#daemon configuration
|
openocd -f interface/parport.cfg -f target/at91r40008.cfg -c init -c reset
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface parport
|
|
||||||
parport_port 0x378
|
|
||||||
parport_cable wiggler
|
|
||||||
jtag_speed 0
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 38 0x0 0x0 0x0
|
|
||||||
jtag_device 4 0x1 0x0 0xe
|
|
||||||
jtag_device 8 0x0 0x0 0x0
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm926ejs little run_and_init 1 arm926ejs
|
|
||||||
target_script 0 reset omap5912_osk.init
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
# omap5912 lcd frame buffer as working area
|
|
||||||
working_area 0 0x20000000 0x3e800 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank cfi 0x00000000 0x1000000 2 2 0
|
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@subsection Openocd init
|
|
||||||
@smallexample
|
|
||||||
#
|
|
||||||
# halt target
|
|
||||||
#
|
|
||||||
poll
|
|
||||||
sleep 1
|
|
||||||
halt
|
|
||||||
wait_halt
|
|
||||||
#
|
|
||||||
# disable wdt
|
|
||||||
#
|
|
||||||
mww 0xfffec808 0x000000f5
|
|
||||||
mww 0xfffec808 0x000000a0
|
|
||||||
|
|
||||||
mww 0xfffeb048 0x0000aaaa
|
|
||||||
sleep 500
|
|
||||||
mww 0xfffeb048 0x00005555
|
|
||||||
sleep 500
|
|
||||||
#
|
|
||||||
# detect flash
|
|
||||||
#
|
|
||||||
flash probe 0
|
|
||||||
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section STR71x Script
|
|
||||||
@cindex STR71x Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a STR710 / STR711 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
jtag_speed 0
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm7tdmi little run_and_halt 0 arm7tdmi
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x2000C000 0x4000 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section STR750 Script
|
|
||||||
@cindex STR750 Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a STR750 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
jtag_speed 19
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
#reset_config trst_and_srst srst_pulls_trst
|
|
||||||
reset_config trst_and_srst srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#jtag nTRST and nSRST delay
|
|
||||||
jtag_nsrst_delay 500
|
|
||||||
jtag_ntrst_delay 500
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
|
|
||||||
target arm7tdmi little run_and_halt 0 arm7tdmi
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x40000000 0x4000 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank str7x 0x20000000 0x000040000 0 0 0 STR75x
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section STR912 Script
|
|
||||||
@cindex STR912 Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a STR912 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
jtag_speed 1
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 8 0x1 0x1 0xfe
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
jtag_device 5 0x1 0x1 0x1e
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm966e <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm966e little reset_halt 1 arm966e
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x50000000 16384 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank str9x 0x00000000 0x00080000 0 0 0
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section STR912 comstick
|
|
||||||
@cindex STR912 comstick Script
|
|
||||||
The following script was used with a Hitex STR9 Comstick:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "STR9-comStick A"
|
|
||||||
ft2232_layout comstick
|
|
||||||
jtag_speed 1
|
|
||||||
|
|
||||||
jtag_nsrst_delay 100
|
|
||||||
jtag_ntrst_delay 100
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 8 0x1 0x1 0xfe
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
jtag_device 5 0x1 0x1 0x1e
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm966e <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm966e little reset_halt 1 arm966e
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x50000000 16384 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank str9x 0x00000000 0x00080000 0 0 0
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section STM32x Script
|
|
||||||
@cindex STM32x Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a STM32x CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
jtag_speed 10
|
|
||||||
|
|
||||||
jtag_nsrst_delay 100
|
|
||||||
jtag_ntrst_delay 100
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
jtag_device 5 0x1 0x1 0x1e
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target cortex_m3 <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target cortex_m3 little run_and_halt 0
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x20000000 16384 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank stm32x 0x08000000 0x00020000 0 0 0
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section STM32x Performance Stick
|
|
||||||
@cindex STM32x Performance Stick Script
|
|
||||||
The following script was used with the Hitex STM32 Performance Stick
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "STM32-PerformanceStick A"
|
|
||||||
ft2232_layout stm32stick
|
|
||||||
jtag_speed 10
|
|
||||||
|
|
||||||
jtag_nsrst_delay 100
|
|
||||||
jtag_ntrst_delay 100
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
jtag_device 5 0x1 0x1 0x1e
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target cortex_m3 <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target cortex_m3 little run_and_halt 0
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x20000000 16384 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank stm32x 0x08000000 0x00020000 0 0 0
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section LPC2129 Script
|
|
||||||
@cindex LPC2129 Script
|
|
||||||
The following script was used with an wiggler PP and a LPC-2129 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface parport
|
|
||||||
parport_port 0x378
|
|
||||||
parport_cable wiggler
|
|
||||||
jtag_speed 0
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x40000000 0x4000 nobackup
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14765 calc_checksum
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section LPC2148 Script
|
|
||||||
@cindex LPC2148 Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a LPC2148 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
jtag_speed 3
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x40000000 0x8000 nobackup
|
|
||||||
|
|
||||||
#flash configuration
|
|
||||||
flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v1 14765 calc_checksum
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section LPC2294 Script
|
|
||||||
@cindex LPC2294 Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a LPC2294 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
jtag_speed 3
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
working_area 0 0x40000000 0x4000 nobackup
|
|
||||||
|
|
||||||
#flash configuration
|
|
||||||
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14765 calc_checksum
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section AT91R40008 Script
|
|
||||||
@cindex AT91R40008 Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a AT91R40008 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
jtag_speed 0
|
|
||||||
jtag_nsrst_delay 200
|
|
||||||
jtag_ntrst_delay 200
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config srst_only srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm7tdmi little run_and_halt 0 arm7tdmi
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section AT91SAM7s Script
|
|
||||||
@cindex AT91SAM7s Script
|
|
||||||
The following script was used with an Olimex ARM-JTAG-OCD and a AT91SAM7S64 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Olimex OpenOCD JTAG A"
|
|
||||||
ft2232_layout olimex-jtag
|
|
||||||
ft2232_vid_pid 0x15BA 0x0003
|
|
||||||
jtag_speed 0
|
|
||||||
jtag_nsrst_delay 200
|
|
||||||
jtag_ntrst_delay 200
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config srst_only srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
|
|
||||||
target arm7tdmi little run_and_halt 0 arm7tdmi
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
# flash-options AT91
|
|
||||||
working_area 0 0x00200000 0x4000 nobackup
|
|
||||||
flash bank at91sam7 0 0 0 0 0
|
|
||||||
|
|
||||||
# Information:
|
|
||||||
# erase command (telnet-interface) for complete flash:
|
|
||||||
# flash erase <num> 0 numlockbits-1 (can be seen from output of flash info 0)
|
|
||||||
# SAM7S64 with 16 lockbits and bank 0: flash erase 0 0 15
|
|
||||||
# set/clear NVM-Bits:
|
|
||||||
# at91sam7 gpnvm <num> <bit> <set|clear>
|
|
||||||
# disable locking from SAM-BA:
|
|
||||||
# flash protect 0 0 1 off
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section XSCALE IXP42x Script
|
|
||||||
@cindex XSCALE IXP42x Script
|
|
||||||
The following script was used with an Amontec JTAGkey-Tiny and a xscale ixp42x CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
jtag_speed 0
|
|
||||||
jtag_nsrst_delay 200
|
|
||||||
jtag_ntrst_delay 200
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config srst_only srst_pulls_trst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 7 0x1 0x7f 0x7e
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <startup mode>
|
|
||||||
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
|
|
||||||
target xscale big run_and_halt 0 IXP42x
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section Cirrus Logic EP9301 Script
|
|
||||||
@cindex Cirrus Logic EP9301 Script
|
|
||||||
The following script was used with FT2232 based JTAG interfaces and a
|
|
||||||
Cirrus Logic EP9301 processor on an Olimex CS-E9301 board.
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
|
|
||||||
#Olimex ARM-USB-OCD
|
|
||||||
#ft2232_device_desc "Olimex OpenOCD JTAG"
|
|
||||||
#ft2232_layout olimex-jtag
|
|
||||||
#ft2232_vid_pid 0x15ba 0x0003
|
|
||||||
|
|
||||||
#Amontec JTAGkey (and JTAGkey-Tiny)
|
|
||||||
#Serial is only necessary if more than one JTAGkey is connected
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
#ft2232_serial AMTJKV31
|
|
||||||
#ft2232_serial T1P3S2W8
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
|
|
||||||
#wiggler/parallel port interface
|
|
||||||
#interface parport
|
|
||||||
#parport_port 0x378
|
|
||||||
#parport_cable wiggler
|
|
||||||
#jtag_speed 0
|
|
||||||
jtag_speed 1
|
|
||||||
reset_config trst_and_srst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
jtag_nsrst_delay 100
|
|
||||||
jtag_ntrst_delay 100
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup attach
|
|
||||||
|
|
||||||
#target <type> <endianess> <reset mode>
|
|
||||||
target arm920t little reset_halt 0
|
|
||||||
working_area 0 0x80014000 0x1000 backup
|
|
||||||
|
|
||||||
#flash configuration
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]
|
|
||||||
flash bank cfi 0x60000000 0x1000000 2 2 0
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section Hilscher netX 100 / 500 Script
|
|
||||||
@cindex Hilscher netX 100 / 500 Script
|
|
||||||
The following script was used with an Amontec JTAGkey and a Hilscher
|
|
||||||
netX 500 CPU:
|
|
||||||
@smallexample
|
|
||||||
#daemon configuration
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
#interface
|
|
||||||
interface ft2232
|
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
|
||||||
ft2232_layout jtagkey
|
|
||||||
ft2232_vid_pid 0x0403 0xcff8
|
|
||||||
jtag_speed 5
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 4 0x1 0xf 0xe
|
|
||||||
|
|
||||||
jtag_nsrst_delay 100
|
|
||||||
jtag_ntrst_delay 100
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
#target <type> <endianness> <startup mode> <chainpos> <variant>
|
|
||||||
target arm926ejs little run_and_halt 0 arm926ejs
|
|
||||||
run_and_halt_time 0 500
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@section Marvell/Intel PXA270 Script
|
|
||||||
@cindex Marvell/Intel PXA270 Script
|
|
||||||
@smallexample
|
|
||||||
# config for Intel PXA270
|
|
||||||
# not, as of 2007-06-22, openocd only works with the
|
|
||||||
# libftd2xx library from ftdi. libftdi does not work.
|
|
||||||
|
|
||||||
telnet_port 3333
|
|
||||||
gdb_port 4444
|
|
||||||
|
|
||||||
interface ft2232
|
|
||||||
ft2232_layout olimex-jtag
|
|
||||||
ft2232_vid_pid 0x15BA 0x0003
|
|
||||||
ft2232_device_desc "Olimex OpenOCD JTAG"
|
|
||||||
jtag_speed 0
|
|
||||||
# set jtag_nsrst_delay to the delay introduced by your reset circuit
|
|
||||||
# the rest of the needed delays are built into the openocd program
|
|
||||||
jtag_nsrst_delay 260
|
|
||||||
# set the jtag_ntrst_delay to the delay introduced by a reset circuit
|
|
||||||
# the rest of the needed delays are built into the openocd program
|
|
||||||
jtag_ntrst_delay 0
|
|
||||||
|
|
||||||
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
||||||
reset_config trst_and_srst separate
|
|
||||||
|
|
||||||
#jtag scan chain
|
|
||||||
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
|
||||||
jtag_device 7 0x1 0x7f 0x7e
|
|
||||||
|
|
||||||
#target configuration
|
|
||||||
daemon_startup reset
|
|
||||||
|
|
||||||
target xscale little reset_halt 0 pxa27x
|
|
||||||
|
|
||||||
# maps to PXA internal RAM. If you are using a PXA255
|
|
||||||
# you must initialize SDRAM or leave this option off
|
|
||||||
working_area 0 0x5c000000 0x10000 nobackup
|
|
||||||
|
|
||||||
run_and_halt_time 0 30
|
|
||||||
|
|
||||||
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
|
||||||
# works for P30 flash
|
|
||||||
flash bank cfi 0x00000000 0x1000000 2 4 0
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@node GDB and Openocd
|
@node GDB and Openocd
|
||||||
@chapter GDB and Openocd
|
@chapter GDB and Openocd
|
||||||
|
|
|
@ -24,4 +24,8 @@ nobase_dist_pkglib_DATA = xscale/debug_handler.bin event/at91eb40a_reset.script
|
||||||
target/sam7x256.cfg target/str710.cfg target/str912.cfg target/nslu2.cfg target/pxa255_sst.cfg \
|
target/sam7x256.cfg target/str710.cfg target/str912.cfg target/nslu2.cfg target/pxa255_sst.cfg \
|
||||||
target/pxa255.cfg target/zy1000.cfg event/zy1000_reset.script event/at91sam9260_reset.script target/at91sam9260.cfg \
|
target/pxa255.cfg target/zy1000.cfg event/zy1000_reset.script event/at91sam9260_reset.script target/at91sam9260.cfg \
|
||||||
target/wi-9c.cfg event/wi-9c_reset.script event/pxa255_reset.script target/stm32.cfg target/xba_revA3.cfg event/xba_revA3.script \
|
target/wi-9c.cfg event/wi-9c_reset.script event/pxa255_reset.script target/stm32.cfg target/xba_revA3.cfg event/xba_revA3.script \
|
||||||
ecos/at91eb40a.elf target/lm3s6965.cfg interface/parport.cfg
|
ecos/at91eb40a.elf target/lm3s6965.cfg interface/parport.cfg \
|
||||||
|
event/omap5912_reset.script interface/amontec-tiny.cfg interface/str9-comstick.cfg \
|
||||||
|
target/epc9301.cfg target/ipx42x.cfg target/lpc2129.cfg target/netx500.cfg \
|
||||||
|
target/omap5912.cfg target/pxa270.cfg target/str750.cfg target/str9comstick.cfg
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#
|
||||||
|
# halt target
|
||||||
|
#
|
||||||
|
poll
|
||||||
|
sleep 1
|
||||||
|
halt
|
||||||
|
wait_halt
|
||||||
|
#
|
||||||
|
# disable wdt
|
||||||
|
#
|
||||||
|
mww 0xfffec808 0x000000f5
|
||||||
|
mww 0xfffec808 0x000000a0
|
||||||
|
|
||||||
|
mww 0xfffeb048 0x0000aaaa
|
||||||
|
sleep 500
|
||||||
|
mww 0xfffeb048 0x00005555
|
||||||
|
sleep 500
|
||||||
|
#
|
||||||
|
# detect flash
|
||||||
|
#
|
||||||
|
flash probe 0
|
|
@ -0,0 +1,8 @@
|
||||||
|
#interface
|
||||||
|
interface ft2232
|
||||||
|
ft2232_device_desc "Amontec JTAGkey A"
|
||||||
|
ft2232_layout jtagkey
|
||||||
|
ft2232_vid_pid 0x0403 0xcff8
|
||||||
|
jtag_speed 0
|
||||||
|
jtag_nsrst_delay 200
|
||||||
|
jtag_ntrst_delay 200
|
|
@ -0,0 +1,3 @@
|
||||||
|
interface ft2232
|
||||||
|
ft2232_device_desc "STR9-comStick A"
|
||||||
|
ft2232_layout comstick
|
|
@ -0,0 +1,12 @@
|
||||||
|
# Cirrus Logic EP9301 processor on an Olimex CS-E9301 board.
|
||||||
|
jtag_device 4 0x1 0xf 0xe
|
||||||
|
jtag_nsrst_delay 100
|
||||||
|
jtag_ntrst_delay 100
|
||||||
|
#target configuration
|
||||||
|
daemon_startup attach
|
||||||
|
#target <type> <endianess> <reset mode>
|
||||||
|
target arm920t little reset_halt 0
|
||||||
|
working_area 0 0x80014000 0x1000 backup
|
||||||
|
#flash configuration
|
||||||
|
#flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]
|
||||||
|
flash bank cfi 0x60000000 0x1000000 2 2 0
|
|
@ -0,0 +1,13 @@
|
||||||
|
#xscale ixp42x CPU
|
||||||
|
|
||||||
|
#use combined on interfaces or targets that can’t set TRST/SRST separately
|
||||||
|
reset_config srst_only srst_pulls_trst
|
||||||
|
#jtag scan chain
|
||||||
|
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||||
|
jtag_device 7 0x1 0x7f 0x7e
|
||||||
|
#target configuration
|
||||||
|
daemon_startup reset
|
||||||
|
#target <type> <startup mode>
|
||||||
|
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
|
||||||
|
target xscale big run_and_halt 0 IXP42x
|
||||||
|
run_and_halt_time 0 30
|
|
@ -0,0 +1,15 @@
|
||||||
|
#LPC-2129 CPU
|
||||||
|
#use combined on interfaces or targets that can’t set TRST/SRST separately
|
||||||
|
reset_config trst_and_srst srst_pulls_trst
|
||||||
|
#jtag scan chain
|
||||||
|
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||||
|
jtag_device 4 0x1 0xf 0xe
|
||||||
|
#target configuration
|
||||||
|
daemon_startup reset
|
||||||
|
#target <type> <startup mode>
|
||||||
|
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
|
||||||
|
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
|
||||||
|
run_and_halt_time 0 30
|
||||||
|
working_area 0 0x40000000 0x4000 nobackup
|
||||||
|
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
||||||
|
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14765 calc_checksum
|
|
@ -0,0 +1,13 @@
|
||||||
|
#Hilscher netX 500 CPU
|
||||||
|
#use combined on interfaces or targets that can’t set TRST/SRST separately
|
||||||
|
reset_config trst_and_srst
|
||||||
|
#jtag scan chain
|
||||||
|
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||||
|
jtag_device 4 0x1 0xf 0xe
|
||||||
|
jtag_nsrst_delay 100
|
||||||
|
jtag_ntrst_delay 100
|
||||||
|
#target configuration
|
||||||
|
daemon_startup reset
|
||||||
|
#target <type> <endianness> <startup mode> <chainpos> <variant>
|
||||||
|
target arm926ejs little run_and_halt 0 arm926ejs
|
||||||
|
run_and_halt_time 0 500
|
|
@ -0,0 +1,25 @@
|
||||||
|
#TI OMAP5912 dual core processor - http://www.ti.com
|
||||||
|
#on a OMAP5912 OSK board http://www.spectrumdigital.com.
|
||||||
|
|
||||||
|
#use combined on interfaces or targets that can't set TRST/SRST separately
|
||||||
|
reset_config trst_and_srst
|
||||||
|
|
||||||
|
#jtag scan chain
|
||||||
|
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||||
|
jtag_device 38 0x0 0x0 0x0
|
||||||
|
jtag_device 4 0x1 0x0 0xe
|
||||||
|
jtag_device 8 0x0 0x0 0x0
|
||||||
|
|
||||||
|
#target configuration
|
||||||
|
daemon_startup reset
|
||||||
|
|
||||||
|
#target <type> <endianness> <reset mode> <chainpos> <variant>
|
||||||
|
target arm926ejs little run_and_init 1 arm926ejs
|
||||||
|
target_script 0 reset event/omap5912_reset.script
|
||||||
|
run_and_halt_time 0 30
|
||||||
|
|
||||||
|
# omap5912 lcd frame buffer as working area
|
||||||
|
working_area 0 0x20000000 0x3e800 nobackup
|
||||||
|
|
||||||
|
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
||||||
|
flash bank cfi 0x00000000 0x1000000 2 2 0
|
|
@ -0,0 +1,22 @@
|
||||||
|
#Marvell/Intel PXA270 Script
|
||||||
|
# set jtag_nsrst_delay to the delay introduced by your reset circuit
|
||||||
|
# the rest of the needed delays are built into the openocd program
|
||||||
|
jtag_nsrst_delay 260
|
||||||
|
# set the jtag_ntrst_delay to the delay introduced by a reset circuit
|
||||||
|
# the rest of the needed delays are built into the openocd program
|
||||||
|
jtag_ntrst_delay 0
|
||||||
|
#use combined on interfaces or targets that can’t set TRST/SRST separately
|
||||||
|
reset_config trst_and_srst separate
|
||||||
|
#jtag scan chain
|
||||||
|
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||||
|
jtag_device 7 0x1 0x7f 0x7e
|
||||||
|
#target configuration
|
||||||
|
daemon_startup reset
|
||||||
|
target xscale little reset_halt 0 pxa27x
|
||||||
|
# maps to PXA internal RAM. If you are using a PXA255
|
||||||
|
# you must initialize SDRAM or leave this option off
|
||||||
|
working_area 0 0x5c000000 0x10000 nobackup
|
||||||
|
run_and_halt_time 0 30
|
||||||
|
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
||||||
|
# works for P30 flash
|
||||||
|
flash bank cfi 0x00000000 0x1000000 2 4 0
|
|
@ -0,0 +1,19 @@
|
||||||
|
#STR750 CPU
|
||||||
|
#use combined on interfaces or targets that can’t set TRST/SRST separately
|
||||||
|
#reset_config trst_and_srst srst_pulls_trst
|
||||||
|
reset_config trst_and_srst srst_pulls_trst
|
||||||
|
#jtag scan chain
|
||||||
|
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||||
|
jtag_device 4 0x1 0xf 0xe
|
||||||
|
#jtag nTRST and nSRST delay
|
||||||
|
jtag_nsrst_delay 500
|
||||||
|
jtag_ntrst_delay 500
|
||||||
|
#target configuration
|
||||||
|
daemon_startup reset
|
||||||
|
#target <type> <startup mode>
|
||||||
|
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
|
||||||
|
target arm7tdmi little run_and_halt 0 arm7tdmi
|
||||||
|
run_and_halt_time 0 30
|
||||||
|
working_area 0 0x40000000 0x4000 nobackup
|
||||||
|
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
||||||
|
flash bank str7x 0x20000000 0x000040000 0 0 0 STR75x
|
|
@ -0,0 +1,19 @@
|
||||||
|
#Hitex STR9 Comstick
|
||||||
|
jtag_nsrst_delay 100
|
||||||
|
jtag_ntrst_delay 100
|
||||||
|
#use combined on interfaces or targets that can’t set TRST/SRST separately
|
||||||
|
reset_config trst_and_srst
|
||||||
|
#jtag scan chain
|
||||||
|
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
||||||
|
jtag_device 8 0x1 0x1 0xfe
|
||||||
|
jtag_device 4 0x1 0xf 0xe
|
||||||
|
jtag_device 5 0x1 0x1 0x1e
|
||||||
|
#target configuration
|
||||||
|
daemon_startup reset
|
||||||
|
#target <type> <startup mode>
|
||||||
|
#target arm966e <endianness> <reset mode> <chainpos> <variant>
|
||||||
|
target arm966e little reset_halt 1 arm966e
|
||||||
|
run_and_halt_time 0 30
|
||||||
|
working_area 0 0x50000000 16384 nobackup
|
||||||
|
#flash bank <driver> <base> <size> <chip_width> <bus_width>
|
||||||
|
flash bank str9x 0x00000000 0x00080000 0 0 0
|
Loading…
Reference in New Issue