Commit Graph

33 Commits

Author SHA1 Message Date
oharboe 815c3b3533 - "flash write_binary" is now "flash write_bank" to clarify the focus of the
command and reduce confusion with "flash write_image".
- retired deprecated "flash erase" & "flash write".
- added flash_driver_protect/write/erase() that are wafer thin frontend
 functions to low level driver functions. They implement checks
 that were inconsistently handled by the drivers, e.g. check for
 target halted was done in a spotty fashion.
- use return ERROR_COMMAND_SYNTAX_ERROR to print out
 syntax of command instead of having lots of inlined replicas of
 the command line syntax(some of which were wrong).
- use logging instead of dubious translation of error values to
 human understandable explanations of why things failed.
 The lower levels log the precise reason and the higher
 levels can ammend context as the error propagates up
 the call stack.
- simplified flash API slightly with logging instead of
 allocating and returning information that the caller then
 has to translate into print statements.



git-svn-id: svn://svn.berlios.de/openocd/trunk@337 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 07:32:52 +00:00
drath 885ae471ad - fixes possible crash when GDB connection is closed while target is running due to log callback sending messages to connection which does not
exist anymore (thanks to Pavel Chromy for this patch)


git-svn-id: svn://svn.berlios.de/openocd/trunk@325 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-24 12:30:45 +00:00
ntfreak 95df797b2e - add search paths via new arg -s (-search). Thanks Ted Roth
- updated docs for new command

git-svn-id: svn://svn.berlios.de/openocd/trunk@312 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-19 20:04:57 +00:00
drath 48709fba0b - ignore data aborts during gdb memory read packets by default, and return 0x0 instead
- add configuration option "gdb_report_data_abort <enable|disable> to enable reporting of data aborts during gdb memory read packets
- thanks to Øyvind Harboe for identifying the problem with GDB and data aborts
- fix some warnings in gdb_server.c



git-svn-id: svn://svn.berlios.de/openocd/trunk@307 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18 17:59:06 +00:00
ntfreak a92d27afb0 - Added a "User:" debug level. These are messages that are intended for the user and are part of normal operation.
- Faster DEBUG/INFO() when they are disabled
- target_read/write_buffer() now uses 16 and 32 bit access for single word aligned requests. Other requests are serviced as quickly as possible.
- *much* faster read/write GDB packets, removing timeout problems.
- GDB read/write packets w/single word aligned 32/16 bit access now use 32/16 bit word access.
- working area can now be changed on the fly. Provides a way to move working area about as MMU is enabled/disabled.
- cleaned up error messages for verify_image.
Thanks Øyvind Harboe

git-svn-id: svn://svn.berlios.de/openocd/trunk@302 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18 14:32:43 +00:00
ntfreak e859281eb3 - solve lots of problems with stuck GDB connections, making it impossible to connect to GDB, handle timeout of acknowledgement, etc.
- "monitor halt/resume" now works correctly
- "monitor sleep 10000" no longer makes the GDB protocol lock up. There is an error message and the protocol recovers nicely afterwards.
- it's now possible to connect to a target which needs a reset before halt works.
- handle failed memory access more gracefully. Connection is now closed instead of OpenOCD quitting.
- *much* improved handling of 2 second timeout on memory read packets. Especially important w/mouseover evaluation of  variables in Eclipse.
- fixed memory leak upon failed memory packet reply.
- 'O' packets w/progress info is no longer sent out randomly.
- faster packet reply code.
- Thanks to Øyvind Harboe for this patch

git-svn-id: svn://svn.berlios.de/openocd/trunk@300 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-16 15:21:13 +00:00
mifi 2a0317e6f4 - added patch to Improving progress/error output for telnet & GDB monitor
(thanks to Øyvind for the patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-13 19:02:17 +00:00
mifi c882cb0894 - added autoprobe functionality
- corrected blocksize handling from GDB "info mem" command
(thanks to Øyvind and Spen for these patches)

git-svn-id: svn://svn.berlios.de/openocd/trunk@278 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-27 14:05:59 +00:00
ntfreak 5e9a5c0f28 - fix gdb packet retransmission omission
git-svn-id: svn://svn.berlios.de/openocd/trunk@253 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-10 20:10:53 +00:00
ntfreak 2511b52159 - _DEBUG_GDB_IO_ was left on by mistake
git-svn-id: svn://svn.berlios.de/openocd/trunk@252 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-10 19:34:33 +00:00
ntfreak 5eedf3e1ce - added faster gdb packet handling (thanks to oyvind harboe for the patch)
- code reformat

git-svn-id: svn://svn.berlios.de/openocd/trunk@251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-10 19:29:52 +00:00
ntfreak 0160320060 - rename flash_init and flash_erase to flash_init_drivers and flash_erase_address_range - stops conflicts with redboot. Thanks Øyvind Harboe
- gdb connection not dropped if we fail to allocate memory in query packets



git-svn-id: svn://svn.berlios.de/openocd/trunk@249 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-09 15:58:01 +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
ntfreak dfe1b3f314 - add support for extended gdb packet R (restart), requires gdb to be started with target extended-remote
git-svn-id: svn://svn.berlios.de/openocd/trunk@247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-29 17:41:43 +00:00
ntfreak 6c9b804d61 - minimum autoconf 2.59 is now required and verified - due to issues with AS_HELP_STRING
- native win32 now handles WSAECONNRESET - no longer exits openocd
- qCRC packet now works correctly under cygwin (gdb compare-sections command)
- removed __USE_GNU define from gdbserver.c
- gdb qSupported packet is now handled, with this we are able to tell gdb packet size, memory map of target
- added new target script gdb_program_config - called before gdb flash programming
- new gdb server command gdb_memory_map (enable|disable> - default is disable
- new gdb server command gdb_flash_program (enable|disable> - default is disable
- gdb flash programming supported - vFlash packets
- image_elf_read_section now does not clear any remaining data, this was causing the gdb checksum to fail with certain files
- reformat of usbprog.c
- memory leak in command_print fixed
- updated texi doc to include new commands
- added gdb programming section to docs

git-svn-id: svn://svn.berlios.de/openocd/trunk@246 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-29 13:51:48 +00:00
ntfreak 55f2fe830a - removed flash write_image - binary compare function has been moved to verify_image command
- minor code reformat and cleanup
- updated docs to include new commands

git-svn-id: svn://svn.berlios.de/openocd/trunk@243 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-20 16:19:10 +00:00
mifi 02f3765351 - added patch for new flash functionality like:
flash verify_image and flash erase_address.
- added patch for new parport_write_on_exit command.
Even this patch will fix some memory leaks.

(thanks too oyvind and Spen for these patches)

git-svn-id: svn://svn.berlios.de/openocd/trunk@240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-18 21:20:28 +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
ntfreak ce8768f463 - cleaned up str7, str9 and stm32 flash drivers
- str7 flash driver now checks correct busy bits depending on device
- str9 flash driver now disables ITCM order as per st programming manual
- added str7 disable_jtag command
- added gdb_detach command
- updated arm966e cp15 support
- fix crash on mingw build when enabling target_request debugmsgs

git-svn-id: svn://svn.berlios.de/openocd/trunk@209 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-10-08 13:12:39 +00:00
ntfreak 995326b600 - flash autoerase <on|off> cmd added, default is off - flash banks are calculated and erased prior to write (flash write_image only)
- corrected array overrun in armv7m.c
- corrected breakpoint memory allocation bug
- image read now uses fgets, vastly improves reading of large files
- improved hex file reading, support for Linear Address Record added

git-svn-id: svn://svn.berlios.de/openocd/trunk@208 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-10-01 08:31:30 +00:00
drath c35cc0b8b7 - fixed several bugs in flash writing code (thanks to Pavel Chromy)
git-svn-id: svn://svn.berlios.de/openocd/trunk@196 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-16 09:09:44 +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 290e01c62a - reformat src/jtag/bitq.c (thanks to Pavel Chromy)
- fix multiple reads from FT2232 into same buffer location (thanks to Magnus Lundin)
- retry JTAG chain validation (thanks to Magnus Lundin)
- reworked GDB packet input handling (thanks to Pavel Chromy)
- output error message when setting a watchpoint failed
- removed duplicate out-of-bounds check in at91sam7.c (thanks to Pavel Chromy)


git-svn-id: svn://svn.berlios.de/openocd/trunk@181 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-07-25 10:06:57 +00:00
drath 5ed126c4f9 - fixed arm926 cp15 command bug (thanks to Vincent Palatin for this patch)
- fixed compiler warnings throughout the code (thanks to Vincent Palatin for this patch)
- added support for accessing ETB (embedded trace buffer) registers


git-svn-id: svn://svn.berlios.de/openocd/trunk@134 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-03-26 21:47:26 +00:00
drath a4f2e1eaac - disabled FT2232 debug output (that code should be fairly stable)
- fixed bug in jtag.c where JTAG command type was wrong for PATHMOVE commands
- added lattice ISP cable (experimental)
- properly initialize parallel port (clear tristate bit)
- fixed jtag/Makefile.am that failed with some versions of autotools
- print error number if read() in gdbserver.c failed on Windows
- fixed handling of opcodes with bits 27-25 b011 (comment was correct, code had a bug)
- added support for AT91SAM7SE internal flash


git-svn-id: svn://svn.berlios.de/openocd/trunk@122 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-01-09 17:19:41 +00:00
drath 5b747eeb4a - fixed regression in gdb_server.c (Thanks to Michael Fischer for finding these bugs)
git-svn-id: svn://svn.berlios.de/openocd/trunk@101 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-10-03 09:56:41 +00:00
drath a582e9a8d1 - str9x flash support (Thanks to Spencer Oliver)
- str75x flash support (Thanks to Spencer Oliver)
- correct reporting of T-Bit in CPSR (Thanks to John Hartman for reporting this)
- core-state (ARM/Thumb) can be switched by modifying CPSR
- fixed bug in gdb_server register handling
- register values > 32-bit should now be supported
- several minor fixes and enhancements



git-svn-id: svn://svn.berlios.de/openocd/trunk@100 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-09-28 10:41:43 +00:00
drath fbf5bec7f3 - fixed a minor problem with the GDB server that could drop the first packet (non-fatal)
- fixed some small memory leaks (thanks to Spencer Oliver)
- verify chip- and buswidth of cfi flash configurations
- added support for ARM966E based systems (tested only with ST micro STR9, thanks to Spencer Oliver)


git-svn-id: svn://svn.berlios.de/openocd/trunk@81 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-08-06 11:20:42 +00:00
drath 82d2633b5f - Added support for native MinGW builds (thanks to Spencer Oliver and Michael Fischer) - you still need to install GiveIO (not part of OpenOCD)
- Added state-move support to ftd2xx and bitbang JTAG drivers (required for XScale, possibly useful for other targets, too)
- various fixes


git-svn-id: svn://svn.berlios.de/openocd/trunk@78 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-07-17 14:13:27 +00:00
drath d4d36b0a9a - changed use of bzero (deprecated) to memset (thanks to Spen for pointing this out)
- changed fallback implementation of strndup to something that works on all systems (thanks to Spen for this patch)


git-svn-id: svn://svn.berlios.de/openocd/trunk@75 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-06-25 20:44:25 +00:00
drath ef139a3a5e - added support for AT91SAM7A3 flash (patch from andre renaud, thanks)
- fix trunk build for mac os x (patch from Lauri Leukkunen, thanks)
- added check for host endianness, defines WORDS_BIGENDIAN on a big-endian host (e.g. mac os-x)
- fixed bug where endianness of memory accesses could be swapped on BE hosts
- added space for zero termination of ftd2xx_layout string (from Magnus Ludin, tahnks)


git-svn-id: svn://svn.berlios.de/openocd/trunk@73 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-06-23 07:54:01 +00:00
drath 8b4e882a16 - prepare OpenOCD for branching, created ./trunk/
git-svn-id: svn://svn.berlios.de/openocd/trunk@64 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-06-02 10:36:31 +00:00