Commit Graph

162 Commits

Author SHA1 Message Date
zwelch
dc575dc5bf Remove whitespace that occurs before ')'.
- Replace '[ \t]*[)]' with ')'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:47:42 +00:00
zwelch
f90d8fa45f Remove whitespace that occurs after '('.
- Replace '([ \t]*' with '('.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:46:23 +00:00
zwelch
8959de9f67 - Fixes '+' whitespace
- Replace ')\(+\)(' with ') \1 ('.
- Replace ')\(+\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(+\)(' with '\1 \2 ('.
- Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:44:17 +00:00
zwelch
3813fda44a - Fixes '==' whitespace
- Replace ')\(==\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:42:03 +00:00
duane
d84bba66ae C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2299 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:14:58 +00:00
zwelch
db7e77237c Transform 'u32' to 'uint32_t' in src/target/arm*
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2278 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:08:52 +00:00
zwelch
f876d5e9c7 Transform 'u16' to 'uint16_t'
- Replace '\([^_]\)u16' with '\1uint16_t'.
- Replace '^u16' with 'uint16_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:07:59 +00:00
zwelch
86173cdbdd Transform 'u8' to 'uint8_t' in src/target
- Replace '\([^_]\)u8' with '\1uint8_t'.
- Replace '^u8' with 'uint8_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2274 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:04:08 +00:00
zwelch
689e9664b0 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByString' as 'jtag_tap_by_string.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2065 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:42:52 +00:00
zwelch
74df79d4d8 Final step in isolating target_type_s structure:
- Move definition of 'struct target_type_s' into new 'target_type.h' file.
- Forward delclaration remains in target.h, with comment pointing to new file.
- Replaces #define with #include in source files.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1971 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 12:38:28 +00:00
zwelch
818aa27a9d First step in hiding target_type_s from public interface:
- Add DEFINE_TARGET_TYPE_S symbol in files that need it defined.
- Forward declare 'struct target_type_s' only, unless that symbol is defined.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:32:28 +00:00
zwelch
0de78ed02c Add target_get_name wrapper:
- replaces all accesses to target->type->name.
- add documentation in target_s to warn not to access field directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1966 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:27 +00:00
zwelch
9cb3af610a Add wrappers for target->type->examined:
- replace all checks of target->type->examined with target_was_examined().
- replace all setting of target->type->examined with target_set_examined().
- replace clearing of target->type->examined with target_reset_examined().
- add documentation in target_s to warn not to access field directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 09:38:43 +00:00
oharboe
350f608256 Michael Bruck <mbruck@digenius.de> ARM11 cleanup stale dependencies with generic arm code; added comments and whitespace fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1807 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 07:02:12 +00:00
zwelch
68b05c5575 Audit and eliminate redundant #include directives in arm target files.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1714 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 04:46:21 +00:00
oharboe
62d610f2b7 David Brownell <david-b@pacbell.net> fix warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@1688 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 18:01:50 +00:00
oharboe
0c9a2e99ca Michael Bruck <mbruck@digenius.de> ARM11 C99 updates
git-svn-id: svn://svn.berlios.de/openocd/trunk@1685 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-09 07:36:19 +00:00
oharboe
47c5230c4a fix c99 compile errors
git-svn-id: svn://svn.berlios.de/openocd/trunk@1650 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-07 20:19:04 +00:00
zwelch
0cc7e5b0b7 Fix most pointer cast alignment warnings in arm11.c; fix u16 memory reads..
git-svn-id: svn://svn.berlios.de/openocd/trunk@1628 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-07 01:26:56 +00:00
oharboe
c5ad875a79 fix checksum memory. By failing the fallback code will handle checksum calculation
git-svn-id: svn://svn.berlios.de/openocd/trunk@1554 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-28 08:42:09 +00:00
oharboe
e8240209fe convert some LOG_INFO()'s during stepping into LOG_DEBUG()
git-svn-id: svn://svn.berlios.de/openocd/trunk@1552 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-28 07:33:50 +00:00
oharboe
9ba80f08f4 Michael Bruck <mbruck@digenius.de> macros for error handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1551 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-28 07:29:18 +00:00
oharboe
88c91b4663 clean up debug/info output to be in line with other targets
git-svn-id: svn://svn.berlios.de/openocd/trunk@1544 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-27 12:12:44 +00:00
oharboe
bd7d019b56 more error handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1543 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-27 12:02:07 +00:00
oharboe
4866c8ed25 a little bit more error handling in ARM11
git-svn-id: svn://svn.berlios.de/openocd/trunk@1542 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-27 11:24:01 +00:00
oharboe
23de60e6bd Michael Bruck <mbruck@digenius.de> ARM11 various updates + fix formatting.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1512 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 18:39:59 +00:00
mifi
0bba832713 The following patches was applied:
- openocd-flash-static-keyword-v3.patch
- openocd-lpc2000-fix-erase-obo.patch
- openocd-jlink-fix-sign-ptr-warn.patch
- openocd-wextra-etm.patch
- openocd-wextra-jtag.patch
- openocd-add-new-tap-symbols-v6.patch

Many thanks to  Zach Welch <zw(at)superlucidity.net>

git-svn-id: svn://svn.berlios.de/openocd/trunk@1462 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-18 10:08:13 +00:00
kc8apf
c45de8073d Change tap_state naming to be consistent with SVF documentation.
Courtesy of Dick Hollenbeck <dick@softplc.com>


git-svn-id: svn://svn.berlios.de/openocd/trunk@1232 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-13 06:25:50 +00:00
duane
a28eaa85f7 jtag newtap change & huge manual update
git-svn-id: svn://svn.berlios.de/openocd/trunk@1194 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-30 22:25:43 +00:00
oharboe
e3462b228c jtag_get_device() now returns NULL and reports error instead of invoking exit()
git-svn-id: svn://svn.berlios.de/openocd/trunk@1176 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-19 08:22:47 +00:00
oharboe
257d238e61 Laurentiu Cocanu - add error handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1057 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14 11:06:30 +00:00
oharboe
b6caf057eb fix crash when connecting GDB to powered down target
git-svn-id: svn://svn.berlios.de/openocd/trunk@1044 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-13 12:16:44 +00:00
oharboe
f7458c6b19 fix crash when connecting GDB to powered down target
git-svn-id: svn://svn.berlios.de/openocd/trunk@1043 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-13 12:04:05 +00:00
ntfreak
a5806d21d2 - remove build warnings from mips_m4k.c and arm11.c
- reformat whitespace arm11.c[ch]
- add missing svn props from mips32_dmaacc.[ch]

git-svn-id: svn://svn.berlios.de/openocd/trunk@1032 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-08 20:16:51 +00:00
oharboe
3aef2f0858 Fixes SEGFAULT when setting registers from GDB.
set $cpsr=1234 

git-svn-id: svn://svn.berlios.de/openocd/trunk@1026 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-07 18:04:14 +00:00
oharboe
3b2518bd73 Georg Acher <acher@in.tum.de> - arm11 wip. run algorithm + small init bugfix.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1023 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-07 11:08:57 +00:00
ntfreak
68c598e88d - added myself to copyright on files i remember adding large contributions for over the years
- cleaned up headers to match rest of code
- added missing svn props for previously added files

git-svn-id: svn://svn.berlios.de/openocd/trunk@987 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-20 10:50:53 +00:00
oharboe
ef1cfb2394 Duane Ellis: "target as an [tcl] object" feature.
git-svn-id: svn://svn.berlios.de/openocd/trunk@975 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-01 07:20:21 +00:00
oharboe
8044656bf8 fixed bug in arm11 examine code.
git-svn-id: svn://svn.berlios.de/openocd/trunk@966 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-25 12:20:50 +00:00
oharboe
8d73c2a9b0 duan ellis target tcl work in progress
converts a number of 'simple string lookup tables' into NVP tables.
  These NVP tables will be used by various commands coming in the next patch.


git-svn-id: svn://svn.berlios.de/openocd/trunk@962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-24 18:20:49 +00:00
oharboe
ae86e921eb sharpen error propagation a wee bit.
git-svn-id: svn://svn.berlios.de/openocd/trunk@952 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-20 11:23:49 +00:00
oharboe
6e4680fc26 removed a couple of exit()'s from error handling.
git-svn-id: svn://svn.berlios.de/openocd/trunk@932 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-19 09:31:51 +00:00
oharboe
330cf5a6bb fixed not halted error messages
git-svn-id: svn://svn.berlios.de/openocd/trunk@925 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-17 19:40:17 +00:00
oharboe
f370d70670 Duane Ellis: fix warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@890 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-05 12:27:18 +00:00
oharboe
1829361253 define resetting the target into the halted or running
state as an atomic operation.

git-svn-id: svn://svn.berlios.de/openocd/trunk@888 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-05 07:11:12 +00:00
oharboe
3a48961820 moves handling of problems with resetting into the halted state
into the target implementation.

Also target_process_reset() is now simpler and has error handling,
e.g. if assert reset fails, then target_process_reset() will propagate
that error.

cmd_ctx was passed in to examine(), which is wrong - removed that.

git-svn-id: svn://svn.berlios.de/openocd/trunk@887 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-05 06:18:26 +00:00
oharboe
e8b16d40f1 ARM11 update. OpenOCD supports starting without being able to talk to the hardware.
git-svn-id: svn://svn.berlios.de/openocd/trunk@741 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-04 07:20:43 +00:00
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
e6dac739cf - 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.



git-svn-id: svn://svn.berlios.de/openocd/trunk@483 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-10 14:07:28 +00:00
ntfreak
ddd987502a - 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

git-svn-id: svn://svn.berlios.de/openocd/trunk@477 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-08 17:28:28 +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
209d7c0edc 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)

git-svn-id: svn://svn.berlios.de/openocd/trunk@452 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-06 12:01:52 +00:00
oharboe
ea306d3e59 Michael Bruck: fix warnings.
git-svn-id: svn://svn.berlios.de/openocd/trunk@440 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-04 07:13:08 +00:00
oharboe
58cccae639 Michael Bruck:
- Added simulate_reset_on_next_halt that can be extended to do all sorts
of cleanups for systems without proper reset. Right now it just writes 0
to the control register to disable caches.
- Step skips over Wait for Interrupt instruction
- fix for count
- fix for printf format errors


git-svn-id: svn://svn.berlios.de/openocd/trunk@439 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-04 06:46:44 +00:00
oharboe
2c5fc392f0 Uwe Hermann tightned up comments, etc. to follow OpenOCD policy
git-svn-id: svn://svn.berlios.de/openocd/trunk@431 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-02 08:39:02 +00:00
oharboe
6d3bed69dc Uwe Hermann:
Small cosmetic fixes in the license header to make them all look the
same, fix some typos, update README.

git-svn-id: svn://svn.berlios.de/openocd/trunk@396 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 12:37:45 +00:00
oharboe
da767f48da remove warnings.
git-svn-id: svn://svn.berlios.de/openocd/trunk@391 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 11:55:09 +00:00
oharboe
4febcd8313 Michael Bruck:
arm11

--- Added burst memory transfer mode

This does not explicitly query command execution but rather uses a small
delay produced by the FT2232 on certain TAP commands.

A potential failure of this process is detected afterwards and the
program terminates with an error.

'arm11 memwrite burst disable'
  can be used to switch this feature off.

'arm11 memwrite error_fatal disable'
  can be used to prevent the program to exit on an memory write error


--- Added support for interrupt breaking via VCR register

Use 'arm11 vcr' command to set.


--- Cleaned up the handling of

halt/resume/step/poll, target->state, target->debug_reason,
target_call_event_callbacks() at least as far as I could guess the
intended behaviour from other targets.

Did some overall positive tests with GDB.


--- Added support for breakpoints

Hardware breakpoints only. All breakpoints will be treated as hardware
breakpoints.

All ARM11's seem to have at least 6 hardware breakpoints.

--- Stepping over BKPT added

Modification to PC without touching the target.

--- Stepping over a B or BL to self will do nothing


git-svn-id: svn://svn.berlios.de/openocd/trunk@385 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 07:03:28 +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