interface ft2232
ft2232_device_desc "Signalyzer A"
ft2232_layout signalyzer
ft2232_vid_pid 0x0403 0xbca0
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
#jtag_device 4 0x1 0xf 0xe
set _CHIPNAME lpc2468
set _ENDIAN little
set _CPUTAPID 0x401f002b
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x3 -expected-id $_CPUTAPID
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
flash bank lpc2000 0x0 0x7ffff 0 0 $_TARGETNAME \
lpc2000_v2 25000
and i get this result:
$ openocd
Open On-Chip Debugger 0.4.0-dev-00925-g75c706c (2009-12-15-08:27)
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
Error: Invalid command argument
Error: target 'lpc2000_v2' not defined
Command handler execution failed
Also, jtag_device 4 0x1 0xf 0xe, give an error about how jtag_device is an unknown command. Searching the documentation it seems that this is a correct fact but all example .cfg files use this command…
Anyone know anything about how to fix this? Could it be something simple like i need another configure flag? Thanks for helping.
for other searchers information, I seem to be a bit further on this issue. It turns out that the document writers and the code writers are out of sync, the real line is as follows:
#flash bank <name> <driver> <base> <size> <chip_width> <bus_width>
flash bank lpc2000 lpc2000 0 524288 32 32 $_TARGETNAME lpc2000_v2 25000
I would not go as far as to say this is working for me, but it is not bombing on me anymore.
— Config Command: flash bank name driver base size chip_width bus_width target [driver_options]
Configures a flash bank which provides persistent storage for addresses from base to base + size - 1. These banks will often be visible to GDB through the target’s memory map. In some cases, configuring a flash bank will activate extra commands; see the driver-specific documentation.
name … may be used to reference the flash bank in other flash commands. A number is also available.
driver … identifies the controller driver associated with the flash bank being declared. This is usually cfi for external flash, or else the name of a microcontroller with embedded flash memory. See Flash Driver List.
base … Base address of the flash chip.
size … Size of the chip, in bytes. For some drivers, this value is detected from the hardware.
chip_width … Width of the flash chip, in bytes; ignored for most microcontroller drivers.
bus_width … Width of the data bus used to access the chip, in bytes; ignored for most microcontroller drivers.
target … Names the target used to issue commands to the flash controller.
driver_options … drivers may support, or require, additional parameters. See the driver-specific documentation for more information.
Note: This command is not available after OpenOCD initialization has completed. Use it in board specific configuration files, not interactively.
Note the options after target_name - use 0 to give a default value. The Clk freq has to be about right or you will have unreliable write to flash