Commit Graph

236 Commits

Author SHA1 Message Date
oharboe
35b3c95299 - 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

git-svn-id: svn://svn.berlios.de/openocd/trunk@539 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-04 13:47:38 +00:00
oharboe
d3f0549f08 - 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 


git-svn-id: svn://svn.berlios.de/openocd/trunk@536 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-03 14:00:17 +00:00
ntfreak
d47e1b8f36 - rename log functions to stop conflicts under win32 (wingdi)
git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-25 15:45:17 +00:00
oharboe
b8dab6d056 XScale excessive waiting fix.
git-svn-id: svn://svn.berlios.de/openocd/trunk@509 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-13 08:16:34 +00:00
oharboe
10c3b1c936 fixed regression in XScale introduce in 297
git-svn-id: svn://svn.berlios.de/openocd/trunk@503 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-12 14:38:43 +00:00
oharboe
b9162dcc8e With the recent changes the TRST needs to happen for every reset.
git-svn-id: svn://svn.berlios.de/openocd/trunk@498 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11 21:18:44 +00:00
oharboe
09e303bb8e retire unused code.
git-svn-id: svn://svn.berlios.de/openocd/trunk@494 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11 11:19:15 +00:00
oharboe
c78b4fe426 - 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.

git-svn-id: svn://svn.berlios.de/openocd/trunk@475 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-07 21:49:16 +00:00
oharboe
8bc200e1fe Added some timeout handling to XScale so OpenOCD doesn't get
completely stuck when the target needs a reset.

git-svn-id: svn://svn.berlios.de/openocd/trunk@469 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-07 11:44:46 +00:00
oharboe
087ccf3b6e warnings & comments fixes.
git-svn-id: svn://svn.berlios.de/openocd/trunk@449 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-05 19:33:53 +00:00
oharboe
bc67c6720b I fixed all the targets even though
I could only prove that XScale was busted.


git-svn-id: svn://svn.berlios.de/openocd/trunk@437 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-03 15:58:17 +00:00
oharboe
53883c2784 fix memory corruption regression introduced in 335
git-svn-id: svn://svn.berlios.de/openocd/trunk@424 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-01 20:10:25 +00:00
oharboe
4cb9b17905 fixed stack corruption. Introduced when _check_value was phased out.
git-svn-id: svn://svn.berlios.de/openocd/trunk@403 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 21:43:19 +00:00
oharboe
219b7f30b9 - image.c and fileio.c now uses logging to propagate error strings.
More precise, less code.
- removed unused code in fileio.c
- Windows should now find debug_handler.bin

git-svn-id: svn://svn.berlios.de/openocd/trunk@390 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 11:42:37 +00:00
drath
3d6bcf0792 - convert all files to unix line-ending
git-svn-id: svn://svn.berlios.de/openocd/trunk@347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 17:48:04 +00:00
oharboe
687a9553c9 From Michael Bruck
- bugfix in server.c
- removed unused parameter from jtag_add_ir_scan et al. This
wasn't necessary in hindsight but anyway.
- arm11 source committed but not not in Makefile.am/target.c for now.

git-svn-id: svn://svn.berlios.de/openocd/trunk@341 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 08:22:18 +00:00
oharboe
8529e7c21e - added "xscale fast_memory_access" which speeds up memory
access by disabling "unecessary" checks.
- arm926ejs. Added missing type->mmu and type->virt2phys fn's.
 for now these are used by working_area when specifying
 mmu enabled and mmu not enabled address

git-svn-id: svn://svn.berlios.de/openocd/trunk@335 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-24 21:54:09 +00:00
oharboe
1aa854684d - fixed target->type->poll() return value
- added arch_state to show status of currently selected target
- simplified target->type->arch_state() api.
- clean up telnet output a bit
- fixed GDB output for arch_state
- removed a couple of unecessary exit()'s
- cleaned up error propagation a bit in a few places

git-svn-id: svn://svn.berlios.de/openocd/trunk@332 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-24 18:52:45 +00:00
ntfreak
5c0e8efa05 - Fixed bug in pathmove for XScale
- added virtual address to working_area.
- Improved error messages in a number of places
- Added ERROR_COMMAND_SYNTAX_ERROR that commands can return to have syntax printed
- Added help for some config commands
- Added verification of sw breakpoints with ERROR() message
- Removed a couple of exit()'s and replaced with error message
- cosmetic fix to armv4_5.c, easier to read
- added polymorphic(with default) virt2phys and mmu enable query function to target.h
- added virt2phys command that uses target->type->virt2phys() fn
Thanks to Øyvind Harboe

git-svn-id: svn://svn.berlios.de/openocd/trunk@310 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-19 19:26:17 +00:00
ntfreak
d36abc1cd6 - removed a raft of unecessary exit() calls. Issuing a reset will solve these ails.
- now uses jtag_state_pathmove() instead of making assumptions about implementation of jtag_statemove().
- fixed a couple of bugs in timeout handling
- removed megabytes of log output when communication is failing.
- sleep is now 300ms as documented instead of 3000ms
- fixed error path of bulk write
- debug_handler can now be issued during normal operation + has help text.
Thanks Øyvind Harboe

git-svn-id: svn://svn.berlios.de/openocd/trunk@304 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18 15:11:01 +00:00
ntfreak
8f77362432 - fix xscale memory leak and warnings. Thanks Øyvind Harboe
git-svn-id: svn://svn.berlios.de/openocd/trunk@297 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-15 19:07:43 +00:00
mifi
dafa5aacbe - added patch to access cp15 register (XScale)
(thanks to Edgar Grimberg for the patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@283 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-06 19:59:55 +00:00
bodylove
1b7b811d5d - Eleminated leading tabs/white space
git-svn-id: svn://svn.berlios.de/openocd/trunk@267 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-21 17:29:17 +00:00
ntfreak
13eac429e1 - debug handler file not closed - (thanks to oyvind harboe for the patch)
- arm_simulate_step called incorrect arm_evaluate_opcode when in thumb mode

git-svn-id: svn://svn.berlios.de/openocd/trunk@254 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-11 20:38:43 +00:00
mifi
2e01a1ad19 - added gdb flash fixes patch
https://lists.berlios.de/pipermail/openocd-development/2007-December/000548.html
- added synthesize in_check_mask/value and error handler patch
https://lists.berlios.de/pipermail/openocd-development/2008-January/000554.html

(thanks to oyvind harboe for these patches)

git-svn-id: svn://svn.berlios.de/openocd/trunk@248 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-07 17:11:11 +00:00
bodylove
142a4a4b86 - XScale DebugHandler code is now installed into
pkglibdir and loaded from there

git-svn-id: svn://svn.berlios.de/openocd/trunk@222 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-10 17:49:28 +00:00
ntfreak
e27696f6b0 - add verify_image command
- add support for gdb qCRC packet (compare-sections command)

git-svn-id: svn://svn.berlios.de/openocd/trunk@210 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-10-22 08:44:34 +00:00
drath
ecfc1e39a2 - correctly initialize start address for XScale trace buffer decodes in fill-once mode
git-svn-id: svn://svn.berlios.de/openocd/trunk@202 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-21 16:21:05 +00:00
drath
0eb8621bf2 - renamed "xscale dump_trace_buffer" to "xscale dump_trace" and added code for it
git-svn-id: svn://svn.berlios.de/openocd/trunk@198 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-17 08:58:40 +00:00
drath
20e4e77cdf - renamed M5960 USB JTAG to "flyswatter"
- make ep93xx and at91rm9200 bitbang JTAG interfaces dependant on ARM host (thanks to Vincent Palatin)
- various whitespace fixes
- removed various warnings
- add support for Debian GNU/kFreeBSD (thanks to Uwe Hermann)
- fix OpenOCD compilation for various platforms (thanks to Uwe Hermann and Vincent Palatin)
- switched order of JTAG chain examination and validation (examine first, then multiple validation tries even if examination failed)
- added target_request subsystem to handle requests from the target (debug messages and tracepoints implemented, future enhancements might include
semihosting, all ARM7/9 only for now)
- added support for GDB vFlashXXX packets (thanks to Pavel Chromy)
- added support for receiving data via ARM7/9 DCC
- reworked flash writing. the 'flash write' command is now deprecated and replaced by 'flash write_binary' (old syntax and behaviour) and 'flash
write_image' (write image files (bin, hex, elf, s19) to a target).
- added support for AMD/ST/SST 29F400B non-cfi flashes



git-svn-id: svn://svn.berlios.de/openocd/trunk@190 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-10 19:44:06 +00:00
drath
32c6d70f6a - fixed endianness helper macros (thanks to obilix and wiml for finding and fixing this bug)
- added declarations for 32bit fileio access functions (network byte order)
- fixed bug in etm trace dump file handling
- added XScale trace buffer decoding
- fixed arm_simulator ERROR numbers (-7xx used twice)
- fixed minor bug in debug output in stellaris.c


git-svn-id: svn://svn.berlios.de/openocd/trunk@178 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-06-28 10:32:58 +00:00
drath
ffb51c23fd - added support for Intel/Marvel PXA27x (XScale) targets
- added support for scans coming from or ending in Shift-DR or Shift-IR to bitbang code (required for XScale debugging)
- cleaned up errror handlers. only use when there's a catchable error
- fix segfault when etm was configured without a valid driver



git-svn-id: svn://svn.berlios.de/openocd/trunk@176 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-06-21 13:15:22 +00:00
ntfreak
4b97f3cbb9 - added mingw elf patches from Vincent Palatin
- added str9x programming using flash controller tap (str9xpec), including option bytes and device lock/unlock
- inttypes.h now used for long long printf style declarations

git-svn-id: svn://svn.berlios.de/openocd/trunk@174 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-06-16 14:45:55 +00:00
drath
22bc5194ae - added support for error handlers to JTAG scan commands (jtag_[plain_][ir|dr]_scan)
- catch apparently broken JTAG IR scan after ARM926EJ-S CP15 operations
- added "arm7_9 dump_etb" command


git-svn-id: svn://svn.berlios.de/openocd/trunk@142 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-04-25 20:15:59 +00:00
drath
04dc98916d - explicitly disable monitor mode on ARM7/9 targets
- added "prepare_reset_halt()" to target_type_t, which allows reset_halt to be prepared before a reset is asserted, possibly preventing communication with the target
- arm7/9 devices now use a breakpoint at 0x0 or reset vector catching for debug out of reset


git-svn-id: svn://svn.berlios.de/openocd/trunk@141 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-04-16 14:58:16 +00:00
drath
4a5f45e87d - merged XScale branch back into trunk
- fixed some compiler warnigns in amt_jtagaccel.c, bitbang.c, parport.c
- free working area and register stuff if str7x block write algorithm failed
- check PC after exiting a target algorithm in armv4_5.c


git-svn-id: svn://svn.berlios.de/openocd/trunk@135 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-03-28 16:31:55 +00:00