Commit Graph

50 Commits

Author SHA1 Message Date
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
ntfreak
6d49edef7d - add new cortex_m3 maskisr cmd
git-svn-id: svn://svn.berlios.de/openocd/trunk@1181 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-21 14:27:47 +00:00
ntfreak
e507bfddb0 - preserve cortex_m3 C_MASKINTS during resume/step
git-svn-id: svn://svn.berlios.de/openocd/trunk@1179 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-20 11:17:47 +00:00
ntfreak
76b3c6ece6 - stops multiple calls to examine from allocating the breakpoint arrays
git-svn-id: svn://svn.berlios.de/openocd/trunk@1171 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-14 10:48:17 +00:00
oharboe
95c3a1758f Rick Altherr <kc8apf@kc8apf.net> - In cortex_m3_resume if debug_execution is non-zero, the PRIMASK and xSPR are modified. The problem is that while the register value is changed, it isn't marked valid or dirty.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1119 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-02 18:50:26 +00:00
oharboe
ccc2e3fe76 Laurentiu Cocanu - memory read/write and exit() error path fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1064 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-15 11:44:36 +00:00
ntfreak
279affdb98 - convert spaces to tabs in at91sam7.[ch]
- add missing svn props

git-svn-id: svn://svn.berlios.de/openocd/trunk@1009 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-27 13:00:01 +00:00
oharboe
c90c48b00b I do not know why this is necessary, but it fixes strange effects
(step/resume cause a NMI after reset) on LM3S6918 -- Michael Schwingen 

git-svn-id: svn://svn.berlios.de/openocd/trunk@1008 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-26 18:00:10 +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
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
d8057f6db1 switch to alive_sleep() to avoid gdb timeouts
git-svn-id: svn://svn.berlios.de/openocd/trunk@945 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-19 16:43:30 +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
dfbb9f3e89 - jtag_khz/speed are now single parameter only. These are used
from pre/post_reset event scripts. Adding the second parameter was
a mistake seen in retrospect. this gives precise control in post_reset
for *when* the post reset speed is set. The pre_reset event was
added *after* the second parameter to jtag_khz/speed
- the target implementations no longer gets involved in the reset mode
scheme. Either they reset a target into a halted mode or not.
target_process_reset()
detects if the reset halt failed or not.
- tcl target event names are now target_N_name.  Mainly internal
at this early stage, but best to get the naming right now.
- added hardcoded reset modes from gdb_server.c. I don't know precisely what
these defaults should be or if it should be made configurable. Perhaps some
hardcoded defaults will do for now and it can be made configurable later.
- bugfix in cortex_m3.c for reset_run_and_xxx?
- issue syntax error upon obsolete argument in target command instead of
printing message that will surely drown in the log

git-svn-id: svn://svn.berlios.de/openocd/trunk@849 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 15:59:41 +00:00
ntfreak
85fc1e06fa - removed duplicate cortex_m3_register_commands
git-svn-id: svn://svn.berlios.de/openocd/trunk@709 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-06-16 15:02:02 +00:00
ntfreak
938e01d0c3 - moved flash erase_check target code to target.c
git-svn-id: svn://svn.berlios.de/openocd/trunk@694 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-27 21:23:47 +00:00
oharboe
6f944037d8 now compiles again.
git-svn-id: svn://svn.berlios.de/openocd/trunk@632 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-30 19:26:05 +00:00
ntfreak
f8a117258a - added new device to luminary flash driver
- only use SYSRESETREQ on affected luminary parts

git-svn-id: svn://svn.berlios.de/openocd/trunk@630 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-30 18:33:21 +00:00
ntfreak
8acafd1710 - updated cortex_m3 docs regarding luminary reset behaviour
git-svn-id: svn://svn.berlios.de/openocd/trunk@625 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-29 06:56:03 +00:00
ntfreak
f2e10a6050 - add cortex_m3 variant luminary to fix reset issue with asserting SRST
- https://lists.berlios.de/pipermail/openocd-development/2008-April/002022.html for details

git-svn-id: svn://svn.berlios.de/openocd/trunk@624 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-28 20:05:17 +00:00
ntfreak
cab29a63de - added ARMV7_GDB_HACKS define to armv7m.h, enabling all gdb hacks to be enabled/disabled for testing
- added armv7m dummy cpsr register to stop gdb setting thumb bit

git-svn-id: svn://svn.berlios.de/openocd/trunk@623 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-26 16:40:54 +00:00
oharboe
dd5bc1f893 Edwin Olsen: improves breakpoint handling on cortex-m3 parts. Specifically, this patch allows expressions to be evaluated in GDB that contain function calls.
git-svn-id: svn://svn.berlios.de/openocd/trunk@589 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-17 21:03:19 +00:00
oharboe
3aa95240ec fix SEGFAULT regression in cortex after TRST fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@583 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-16 07:34:22 +00:00
oharboe
61ab13f895 TRST is asserted *before* target->type->assert_reset() is invoked. Removed old code.
git-svn-id: svn://svn.berlios.de/openocd/trunk@574 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-14 01:34:45 +00:00
oharboe
23837f5a3a allows launching OpenOCD w/telnet+gdb server w/the
target powered down.

git-svn-id: svn://svn.berlios.de/openocd/trunk@571 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-13 12:08:06 +00:00
ntfreak
9c3dec377e - single core context used, removed debug context as thought unnecessary.
- DCRDR now used to access special core registers - info is currently omitted from the cortex_m3 TRM ARM have told me this is the preferred access method and the docs will be updated soon.
- now checks for User Thread Mode and Thread mode when halted.
- removed repeated function declarations from command.c
- cortex_m3_prepare_reset_halt removed, updated cortex_m3_assert_reset to suit

git-svn-id: svn://svn.berlios.de/openocd/trunk@558 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-10 11:43:48 +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
oharboe
4411c2643e TAP_SD/SI are now forbidden end states.
jtag_add_reset() now returns void streamlining the API

git-svn-id: svn://svn.berlios.de/openocd/trunk@525 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-26 13:29:48 +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
ntfreak
f669c50fc9 - changed jtag_add_reset errors to warnings
- removed extra jtag reset warnings from arm7_9 and cortex_m3

git-svn-id: svn://svn.berlios.de/openocd/trunk@520 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-22 10:30:00 +00:00
ntfreak
4622cb15a9 - 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

git-svn-id: svn://svn.berlios.de/openocd/trunk@519 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-21 12:53:29 +00:00
ntfreak
0fe2a5435a - 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


git-svn-id: svn://svn.berlios.de/openocd/trunk@495 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11 18:39:43 +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
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
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
ntfreak
269aa8e99a - fix bug with emulated cortex_m3 dcc channel
git-svn-id: svn://svn.berlios.de/openocd/trunk@402 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 18:52:05 +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
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
mifi
a34e4b39c4 - added patch to solve problem with AT91SAM9260 (dirty register)
(thanks to Øyvind Harboe for the patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@282 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-06 19:25:42 +00:00
ntfreak
68b97e4b5c - add support for cortex_m3 target_request debugmsgs
- target request handler disabled by default until a target has been registered

git-svn-id: svn://svn.berlios.de/openocd/trunk@259 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-17 12:45:06 +00:00
ntfreak
8c634335b4 - reset_run now works as expected on cortex-m3
- str9xpec erase status checked on option byte programming
- stm32x flash driver now supports sector protection
- surplus exit removed from flash.c
- openocd.texi documentation added

git-svn-id: svn://svn.berlios.de/openocd/trunk@212 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-11-21 16:37:17 +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
mlu
ed36a8d15d - Fixed display of sector sizes in flash.c
- Clean up, remove unused variables and code in armv7, cortex_m3 and stellaris code 
- Move restore_context from cortex_m3 to armv7m
- Updated halt handling for cortex_m3


git-svn-id: svn://svn.berlios.de/openocd/trunk@206 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-09-10 17:43:08 +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
ntfreak
eba4e394d8 - corrected stm32x_handle_options_write_command, incorrect options printed
- added prepare_reset_halt handler for cortex_m3

git-svn-id: svn://svn.berlios.de/openocd/trunk@184 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-07-26 12:28:22 +00:00
ntfreak
8c290412d2 - ST STM32x cortex support added
- ST STM32x flash support added
- cleaned up armv7m and cortex-m3 support, removed luminary specific code
- cortex-m3 16bit read/write added (required for STM32x flash programming)

git-svn-id: svn://svn.berlios.de/openocd/trunk@177 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-06-24 15:04:07 +00:00
drath
09883194f8 - merged support for Cortex-M3 from cortex-m3 branch (thanks to Magnus Lundin)
git-svn-id: svn://svn.berlios.de/openocd/trunk@170 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-06-14 14:48:22 +00:00