- the reset mode parameter is now DEPRECATED. It is implemented
as an optional parameter with default reset_init. This is to streamline
things w.r.t. the target library.
- reverted some of the changes that possibly broke arm926ejs. Waiting
for a bit more info before I can tell with confidence whether or not
this would have any effect.
- worked on error propagation and output for flash
- Work on fixing erase check. Many implementations are plain broken.
Wrote a default flash erase check fn which uses CFI's target algorithm
w/fallback to memory reads.
- "flash info" no longer prints erase status as it is stale.
- "flash erase_check" now prints erase status. erase check can take a
*long* time. Work in progress
- arm7/9 with seperate srst & trst now supports reset init/halt
after a power outage. arm7/9 no longer makes any assumptions
about state of target when reset is asserted.
- fixes for srst & trst capable arm7/9 with reset init/halt
- prepare_reset_halt retired. This code needs to be inside
assert_reset anyway
- haven't been able to get stm32 write algorithm to work. Fallback
flash write does work. Haven't found a version of openocd trunk
where this works.
- added target_free_all_working_areas_restore() which can
let be of restoring backups. This is needed when asserting
reset as the target must be assumed to be an unknown state.
Added some comments to working areas API
- str9 reset script fixes
- some guidelines
- fixed dangling callbacks upon reset timeout
ntfreak [Fri, 21 Mar 2008 12:53:29 +0000 (12:53 +0000)]
- armv7m control register now set as dirty when switching context
- armv7m added core_mode to cortex_m3_debug_entry DEBUG msg
- cortex_m3 changed WARNINGS to DEBUG msg in cortex_m3_resume
drath [Mon, 17 Mar 2008 21:39:18 +0000 (21:39 +0000)]
- fix warnings during configure cause by ecosboard. default to no, if host cpu isn't arm.
- fix generic bitbang code to allow scans to end in Shift-[ID]R
- several CFI fixes (thanks to Michael Schwingen):
- buffer overflow when converting target code in cfi_intel_write_block -
cfi_fix_code_endian needs the number of words, not bytes, as size
argument.
- Spansion flash write was completely broken on big-endian targets - I
borrowed mechanisms from the intel driver, and moved some common code
into the cfi_command_val helper function. There is still more common code
that might be cleaned up.
- the buffer size check in cfi_write was broken for spansion flashes, where
cfi_write_words is not implemented. cfi_write_words is no only called if
the flash does have a buffer size >1.
- "flash info" printed CFI status information for non-CFI flashes, which is
confusing. It now only prints those when a real CFI flash is detected.
oharboe [Thu, 13 Mar 2008 10:14:41 +0000 (10:14 +0000)]
- adds two speeds to jtag_speed. reset and post reset speed. Default
is post reset = reset speed.
- removed infinite loop's and exit()'s upon poor arm7/9 communication
- cleaned up error messages a bit. Push ERROR() up into fn's that
fail and can say something meaningful about what failed.
oharboe [Tue, 11 Mar 2008 21:32:03 +0000 (21:32 +0000)]
reduce compare noise. If someone should be crazy enough to try to run OpenOCD under eCos, then they'v got some hooks to point them in the general direction.
oharboe [Tue, 11 Mar 2008 21:16:57 +0000 (21:16 +0000)]
- retired unused jtag events. The code was incorrect
- hopefully clarified the difference between TRST and TMS reset.
- added DEBUG() statements w.r.t. state changes
- TRST released and moving out of TAP_TLR are completely
different events. Only TRST released has a DEBUG() statement
ntfreak [Tue, 11 Mar 2008 18:39:43 +0000 (18:39 +0000)]
- 16 and 32 bit unaligned accesses supported
- uses packed transfers for 8/16bit read/writes greater than 4bytes
- 8/16bit transfers now use address auto increment
oharboe [Tue, 11 Mar 2008 09:06:00 +0000 (09:06 +0000)]
- fixed jtag_add_reset(). It no longer causes jtag_execute_queue() to
fail for two of it's return codes. A little bit weird, but compatible with
existing codebase.
- tightend up error handling. Since the jtag_xxx() is a queue that is either
executed as things are added(hw queue) or a software queue, then
errors can only be caught during jtag_execute_queue(). No error
code is therefore returned from the queuing fn's.
oharboe [Mon, 10 Mar 2008 14:14:15 +0000 (14:14 +0000)]
- fixed a problem with big endian XScale and GDB register packets.
- hmm..... did I screw up? Was XScale and not gdb_server busted here?
My thinking was that OpenOCD has a canonical internal representation
of registers that match GDB's expectations
oharboe [Mon, 10 Mar 2008 14:07:28 +0000 (14:07 +0000)]
- the jtag chain is examined and validated after GDB & telnet servers
are up and running. The examination and validation is actually
"optional" from the point of view of GDB + telnet servers.
Multiple targets should work fine with this.
- jtag_speed is dropped(divisor is increased), if jtag examination and
validation fails.
- the chain is validated 10x to catch the worst jtag_speed offences
- added LOG_SILENT that can be used to shut up log. Feeble
ersatz for try+catch.
- GDB register packets are now always replied in order to make sure
that GDB connect works. If the target is not halted, then these
packets contain dummy values.
oharboe [Mon, 10 Mar 2008 12:11:07 +0000 (12:11 +0000)]
- Fixed various error handling when looking for memory leaks
- Fixed memory leak in gdb_server.c
- pushed "Error:" statements up into fn's that know something about what went wrong
- load_image now fails if target_write_memory() fails
- only issue an asynchronous halt() upon connect of GDB. Synchronous halt/reset
doesn't really work as what's required to initialize the target might involve a
special monitor sequence for the target in question
- syntax error handling improved(fewer exit()'s)
oharboe [Mon, 10 Mar 2008 12:04:30 +0000 (12:04 +0000)]
- LOG_SILENT can be used to silence the log(needed in upcoming patches)
- ERROR_FAIL - added to emphasize that information about what went wrong is
contained in Error: log statements and not in a 32 bit return value.
ntfreak [Sat, 8 Mar 2008 17:28:28 +0000 (17:28 +0000)]
- added more TARGET_HALTED checks for the read/write_memory handlers
- added new commands arm11 mrc and arm11 mcr to generate these instructions during debug
Thanks Michael Bruck
oharboe [Fri, 7 Mar 2008 21:49:16 +0000 (21:49 +0000)]
- Improves error handling upon GDB connect
- switch to synchronous halt during connect. This fixes the bug
where poll() was not invoked between halt() and servicing the
'g' register packet
- halt() no longer returns error code when target is already halted, just
logs a warning. Only the halt() implementation can say anything
meaningful about why a halt() failed, so error messages are pushed
up to halt()
- fixed soft_reset_halt infinite loop bug in arm7_9_common.c. The rest
of the implementations are still busted.
- by using USER() instead of command_print() the log gets the
source + line #. Nice.
- no longer invoke exit() if soft_reset_halt fails. A reset can often
fix the problem.
oharboe [Fri, 7 Mar 2008 08:07:07 +0000 (08:07 +0000)]
removed excessive debug output. Perhaps a debug_level 4 should be introduced? Hopefully it can be avoided as this was the only case where debug output was going through the roof.
oharboe [Thu, 6 Mar 2008 12:01:52 +0000 (12:01 +0000)]
Michael Bruck:
- force simulate_reset_on_next_halt when target state is initially detected
- print out method of debug entry
- fix VCR activation (didn't work before)
oharboe [Wed, 5 Mar 2008 19:29:41 +0000 (19:29 +0000)]
- This speeds up dcc arm7_9 bulk write a little bit and exercises the jtag_add_dr_out() codepath
- added a check to jtag_add_pathmove() for legal path transitions
- tweaked jtag.h docs a little bit
- made some jtag bypass tests _DEBUG_JTAG_IO_
oharboe [Wed, 5 Mar 2008 13:27:50 +0000 (13:27 +0000)]
Pavel Chromy: memory leak in at91sam7 flash driver, possible incorrect pointer conversion in gpnvm command handling,
uninitialized buffer issue in handle_flash_info_command in flash.c, some formatting.
oharboe [Wed, 5 Mar 2008 10:28:32 +0000 (10:28 +0000)]
* fixed malloc corruption in target->debug_reason
* GDB remote server will now remain online even if the target
is in a funny state, e.g. if it requires a reset, it is
running while GDB is not in the continue or step packet,
e.g. via monitor resume/halt commands in GDB script.
* Added some _DEBUG_GDB_IO_ debug tools
* Fixed a couple of GDB server lockups, e.g. when O packets
detect a severed connection
* added ACK upon connection (send +).
* added keep-alive messages to reset so GDB protocol remains happy.
* fixed crash when timing out connection to GDB