Commit Graph

37 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
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 edc0db163a - add autoprobe support to flash info command
- auto_erase can now be called from script/config file

git-svn-id: svn://svn.berlios.de/openocd/trunk@292 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-12 18:57:37 +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 1796e1602e - add missing files from previous commit (tms470 flash driver)
git-svn-id: svn://svn.berlios.de/openocd/trunk@258 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-17 08:02:02 +00:00
drath f53b986559 - added tms470 flash support (thanks to Chris Kilgour for this patch)
git-svn-id: svn://svn.berlios.de/openocd/trunk@256 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-17 07:21:09 +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
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 fe02401252 - fixed problem when write_image is called multiple times
git-svn-id: svn://svn.berlios.de/openocd/trunk@244 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-20 22:20:45 +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
mifi ed1e9d6abd - only some cosmetic changes, convert \r\n to unix
git-svn-id: svn://svn.berlios.de/openocd/trunk@239 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-17 22:12:57 +00:00
mifi 835e0436e8 - added patch to corrected argument of image_open in handle_flash_write_image_command
(thanks to oyvind Harboe for the patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@237 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-17 20:14:12 +00:00
mifi f328fb8a6c - change error message for image_open error
- changed run_size to size_read in argument of image_read_section
(thanks to oyvind Harboe for this patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@234 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-16 18:19:43 +00:00
mifi b642f42199 - initialize num_sectors and sectors in handle_flash_bank_command.
(thanks to oyvind Harboe for this hint)

git-svn-id: svn://svn.berlios.de/openocd/trunk@233 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-16 15:55:48 +00:00
mifi 9e6cec0dd3 - added patch to display device information as INFO too
- added patch which fixes a crash upon flash write error
- added patch which will improve the reset handling when 
  SRST is tied to TRST

(thanks to Oyvind Harboe for these patches)

git-svn-id: svn://svn.berlios.de/openocd/trunk@218 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-09 15:36:21 +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 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
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 cb6ebced3d - update jtag_speed setting when changing it during runtime with a FT2232 based interface
- use 'etm trigger_percent' setting when programming ETB trigger count
- fixed some small bugs in ETM trace analysis
- fixed minor bug in flash writing (thanks to Pavel Chromy)


git-svn-id: svn://svn.berlios.de/openocd/trunk@197 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-16 13:12:48 +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 29000b204d - reworked presto.c to allow use of either FTD2XX or libftdi (libftdi not functional yet). Configure option changed from --enable-presto to
--enable-presto_ftd2xx and --enable-presto_libftdi
- completed trace point support for use with ARM7/9 DCC
- completed debug message output with support for HEX dumps (1, 2 or 4 byte quantities)
- fixed bug in delete_debug_msg_receiver (thanks to Pavel Chromy)
- fixed bug in image_add_section (thanks to Pavel Chromy)
- at91sam7 sector erase reworked (thanks to Pavel Chromy)
- merge consecutive sections during flash image write to work around possible section alignment issues with LPC2000 targets



git-svn-id: svn://svn.berlios.de/openocd/trunk@194 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-14 09:48:54 +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 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
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 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
drath 53d1f9b2ca - added manpage for OpenOCD (thanks to Uwe Hermann)
- fixed bug in ARM926EJ-S cache handling that caused cache linefills to be disabled after first debug entry
- added support for auto image type detection (thanks to Vincent Palatin)
- further work on ETM trace decoding (tested with a ETB interface using an ETM in normal 16-bit port mode, still experimental)



git-svn-id: svn://svn.berlios.de/openocd/trunk@169 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-06-14 09:47:00 +00:00
drath f94d66d7c5 - reworked image handling to support multiple sections (tested with ihex file containing gaps)
This checkin is still experimental, not recommended for general use



git-svn-id: svn://svn.berlios.de/openocd/trunk@159 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-05-30 15:47:18 +00:00
drath 237e894805 - split fileio handling into fileio part and image handling
- reworked etm/etb into a generic etm part with trace capture drivers (currently only etb supported)
- added XScale debug handler binary to repository
- added Thumb disassembling (thanks to Vincent Palatin for this patch)
- added support for non-CFI compatible flashes to cfi driver (currently only SST39VFxxx devices supported)
This checkin is experimental, not suitable for general use


git-svn-id: svn://svn.berlios.de/openocd/trunk@155 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-05-29 11:23:42 +00:00
drath cb58279653 - reworked file i/o. every fileaccess (target, flash, nand, in future configuration, too) should now go through the fileio subsystem
- added support for reading IHEX files (through fileio)
- load/dump_binary renamed to the more generic load/dump_image <file> <address> ['bin'|'ihex']
- added NAND framework (preliminary)
- added support for the LPC3180 SLC and MLC NAND controllers (preliminary)
- fix initialization for parport
- gw16012 fixes/cleanups
- added EmbeddedICE version 7 (preliminary, reported on two LPC23xx devices so far)
- added 'arm7_9 etm <target#>' configuration command to enable access to the ETM registers


git-svn-id: svn://svn.berlios.de/openocd/trunk@132 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-03-15 13:36:44 +00:00
drath 4fc97d3f27 - fix incorrect parsing of whitespace in command.c (thanks to Magnus Lundin)
- fix infinite recursion in target_init_handler (thanks to jw and Magnus Lundin)
- fix CFI flash handlign with buswidth < 32bit (thanks to Daniele Orio for reporting this)
- add support for reading JTAG device id (currently only as debug output on startup)
- cleaned up handling of EmbeddedICE registers. Supported functionality and register size now determined by EmbeddedICE version number.
- small cleanups/fixes


git-svn-id: svn://svn.berlios.de/openocd/trunk@124 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-01-22 14:47:00 +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 3f74f764c7 - integrated patch from Magnus Lundin that fixes at91sam7 flash timing bugs and possible endianness problems (big endian hosts)
- correctly write trailing bytes on str7x flashes
- speed up str7x flash writing by offloading the algorithm to the target


git-svn-id: svn://svn.berlios.de/openocd/trunk@95 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-09-07 17:36:34 +00:00
drath 1341eb3b0a - added configurable delays after reset lines get deasserted. useful if reset circuitry keeps lines asserted for too long.
- additional debug output when opening the parallel port
- fixed counting of available arm7/9 watchpoint units
- 'flash write' now displays elapsed time


git-svn-id: svn://svn.berlios.de/openocd/trunk@79 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-07-30 11:25:43 +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 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