Commit Graph

4478 Commits

Author SHA1 Message Date
Øyvind Harboe
4333840ee3 arm: error propagation of arm_jtag_set_instr
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
5164fe5563 arm_adi_v5: dap_run() error propagation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
b62c8d6009 arm_adi_v5: mem_ap_write error propagation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
a7315891ef arm_adi_v5: error propagation of mem_ap_read_atomic_u32 failure
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
7dcde11b45 mem_ap_read_u32 error propagation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
e7a1ec64bf arm_adi_v5: add error propagation for dap_setup_accessport
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
44ef0327dd debug: debug entry error propagation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
6c573df11d cortex a8: added timeout handling
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:49 +02:00
Øyvind Harboe
6a237c23c1 arm: add error propagation for enable/disable mmu caches
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:48 +02:00
Øyvind Harboe
70fee9207b arm: add error propagation to generic get_ttb fn
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 22:13:48 +02:00
David Brownell
612184176f more careful luminary init
Set up more of the Luminary-specific signals, and stop cloning
a few of the JTAG defaults.  More comments too.

Still leaves the "dap info 0" bugs unresolved (presumably coupled
to this particular adapter family) where TPIU, ITM, DWT, and other
debug modules wrongly display as extra NVICs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-19 16:08:09 -04:00
Spencer Oliver
8dbe367c53 cfg: add Amontec JTAGkey2p interface config (Issue #26)
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-19 17:31:38 +01:00
Spencer Oliver
4611f87f0a flash: add nuc910 nand driver
This adds a nand driver support for the nuc910 target.
Note that ECC is not currently supported by this driver, although
it is supported by the peripheral.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-19 12:22:18 +01:00
Spencer Oliver
0345667642 nand: nand probe also outputs manufacturer
The nand probe now outputs the manufacturer if found.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-19 09:10:55 +01:00
Spencer Oliver
8f5e84bf8d cfg: update rsc-w910 script
- Only enable the FMI (NAND) and DMA clocks.
 - Select NAND interface on the MFSEL.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-19 09:10:54 +01:00
Spencer Oliver
d249057adf docs: missing parameter from nand check_bad_blocks
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-19 09:10:52 +01:00
Øyvind Harboe
20c1d4cc9a cortex a8: lots of error propagation fixes
found by code inspection

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 08:36:15 +02:00
Øyvind Harboe
221ce7c89b cortex a8: mem_ap_read_buf_u32() error handling
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 08:36:15 +02:00
Øyvind Harboe
8249261b88 cortex a8: add missing error handling for cortex_a8_dap_write/read_coreregister_u32()
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 08:36:15 +02:00
Øyvind Harboe
a2d5b0ef77 cortex a8: add missing error handling from cortex_a8_exec_opcode()
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 08:36:15 +02:00
Øyvind Harboe
ad02493cf2 cortex a8: add missing error handling for mem_ap_atomic_write_u32()
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 08:36:14 +02:00
Øyvind Harboe
19fc52f008 cortex a8: add missing error handling for mem_ap_read_atomic_u32()
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19 08:36:14 +02:00
David Brownell
d10f0def80 comments for Luminary ICDI layout
Provide $defines for more of the signals involved in the
Luminary ICDI hardware, and comment some of what's going on.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-18 17:29:25 -04:00
Øyvind Harboe
b85dcae447 spelling fixes in comments
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-18 22:56:01 +02:00
Øyvind Harboe
495ef923ef debug-feature: jtagtcpip, improve jtag performance
postpone callbacks until jtag execute queue time.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-18 16:33:02 +02:00
David Brownell
2fdc1db304 lm3s811-ek uses generic stellaris target config
There's no point in an lm3s811-specific target file,
so remove it in favor of the generic "stellaris.cfg".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-17 02:59:23 -04:00
David Brownell
a4dace3122 ARM ADI-V5: cleanup CID/PID addressing
Use addition for offsetting, not masking.  Shorten some lines.
Make "component_start" print-only (unused otherwise; don't save).

Still doesn't resolve the issue where multiple components
are wrongly displaying as NVICs on some Cortex-M3 parts because
many PIDs appear to be zeroes ... maybe adapter related??

Signed-off-by: David Brownell <db@helium.(none)>
2010-07-16 19:22:15 -04:00
Spencer Oliver
b05ae41331 flash: use bkpt for str9 flash algo algorithm
STR9 is ARMv5 arch so use bkpt instruction rather than
waste a breakpoint.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-16 22:52:49 +01:00
Øyvind Harboe
d16f9259c2 fix warnings
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 16:03:32 +02:00
Øyvind Harboe
9cbf0723d5 debug-feature: jtagtcpip, reduce performance impact of ping times
queue read back of data

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 16:03:25 +02:00
Øyvind Harboe
01b2a3091a debug feature: jtagtcpip, improve performance
waiting for ZY1000 fifo to idle is now queued as
an asynchronous command. This radically improves
performance when waitIdle() is interspersed with
writes as no readback is required over TCP/IP.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 12:18:59 +02:00
Øyvind Harboe
bb588bdaec debug feature: jtagtcpip, improved performance
only check error flag when rclk is actually enabled.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 12:18:35 +02:00
David Brownell
0672a6497e ARM ADI-V5: PIDs and CIDs are 8 bits
Mask the upper bits after 32-bit reads.

Alsoo revert the ugly changes to use PRIx32; just cast to unsized
integers when printing (two chars not eight).

Signed-off-by: David Brownell <db@helium.(none)>
2010-07-13 19:34:04 -04:00
Spencer Oliver
1619facb5e cfg: add Avalue RSC-W910 config
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-13 14:17:00 +01:00
Spencer Oliver
f129ef67dc jtag: fix shadow issues in adapter_init
Use global jtag_only rather than local static.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12 20:04:57 +01:00
Spencer Oliver
e521f6415b arm9: revert change arm9tdmi cmd group name to arm9
This reverts the incorrect change made to the arm9 cmd group in commit
d1eca9a74c.

The code now matches the docs and the release notes.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12 19:48:45 +01:00
Spencer Oliver
dc4df8bb97 docs: fix transport typo
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12 19:36:19 +01:00
Spencer Oliver
1c79432061 adapter.c: missing space in handle_interface_command
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12 09:34:03 +01:00
David Brownell
e8445c9c9f transport selection tweaks
* Bugfix and simplify legacy jtag-only defaulting
* Make "dummy" declare its jtag-only nature
* likewise update ft2232
* warn if selection is _required_ (multi-transport adapters),

fixes the "only ft2232 works" bug for at least dummy, with
other drivers going the "legacy" path (submit patches).

Signed-off-by: David Brownell <db@helium.(none)>
2010-07-09 18:34:31 -04:00
Spencer Oliver
ac5ad4ad8d transport: fix bug/typo in transport_register cmd
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-09 22:02:52 +01:00
Øyvind Harboe
daa02f7d84 transport: fix segfault in transport select
String compare against addresses in range 0 or so due
to not checking if there was an active session first.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-07 17:33:04 +02:00
Øyvind Harboe
ccaa9edf29 transport: fix bug/typo in interface_transports command
Classic manifestation of weakness of dangling {
formatting :-) Hard to spot these sort of mistakes visually.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-07 15:09:13 +02:00
sb-sf
3099858c68 gdbserver: incorrect memory map for multiple targets (bug #24)
The gdb server incorrectly reports the memory map if we have
multiple targets with multiple flash banks.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-05 14:16:15 +01:00
Stacey Sheldon
1e0f898415 transport: fix segfault in setup_command_handler()
Commit 93f2afa45f dropped the sentinel off the end
of the command_registrants[] array.  The loop immediately
following the initialization will walk right off the end.

Signed-off-by: Stacey Sheldon <stac@solidgoldbomb.org>
2010-07-05 09:15:52 +02:00
David Brownell
db8b99aed6 Fix minor openocd.texi bug
::X
Signed-off-by: David Brownell <db@helium.(none)>
2010-07-02 17:14:52 -04:00
David Brownell
93f2afa45f initial "transport" framework
This adds the guts of a transport framework with initialization,
which should work with current JTAG-only configurations (tested
with FT2232).

Each debug adapter can declare the transports it supports, and
exactly one transport is initialized.  (with its commands) in
any given OpenOCD session.

  * Define a new "struct transport with init hooks and a few
 "transport"  subcommands to support it:

     "list" ... list the transports configured (just "jtag" for now)
     "select" ... makes the debug session use that transport
     "init" ... initializes the selected transport (internal)

  * "interface_transports" ... declares transports the current interface
    can support.  (Some will do this from C code instead, when there are
    no hardware versioning (or other) issues to prevent it.

Plus some FT2232 tweaks, including a few to streamline upcoming
support for an SWD transport (initially for Luminary adapters).

Eventually src/jtag should probably become src/transport, moving
jtag-specific stuff  to transport/jtag.

Signed-off-by: David Brownell <db@helium.(none)>
2010-07-02 16:45:28 -04:00
Spencer Oliver
deb176d335 ft2232: revert ft2232_read_scan changes
Revert change made in commit dd88b461da.
Caused segfaults when using ftdi driver under win32.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-02 17:00:57 +01:00
Spencer Oliver
f97b6b59ab ft2232: bugfix from previous commit
fix build error with commit dd88b461da

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-01 19:43:58 +01:00
Marc Pignat
dd88b461da ft2232: simplify ft2232_read_scan 2010-07-01 09:32:56 +02:00
Marc Pignat
cd7f443103 ft2232: cleanup ft2232_write
* Include the size check into ft2232_write, so calling it is simpler.
* Use sizeof(buffer) when possible
2010-07-01 09:32:48 +02:00