diff options
author | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2007-08-10 19:44:06 +0000 |
---|---|---|
committer | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2007-08-10 19:44:06 +0000 |
commit | 20e4e77cdf366dedac21ff5670c54291feadfc05 (patch) | |
tree | 95363c4dc5940d7e0e94be81ba76b73e92ff1cf3 /src/jtag/jtag.c | |
parent | 835e6440b8d1d26b4e041be7edab200ab2c572ee (diff) |
- 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
Diffstat (limited to 'src/jtag/jtag.c')
-rw-r--r-- | src/jtag/jtag.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index c1c52fe4..bac1b39e 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -1251,7 +1251,7 @@ int jtag_examine_chain() if ((zero_check == 0x00) || (one_check == 0xff)) { ERROR("JTAG communication failure, check connection, JTAG interface, target power etc."); - exit(-1); + return ERROR_JTAG_INIT_FAILED; } for (bit_count = 0; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;) @@ -1300,7 +1300,7 @@ int jtag_examine_chain() ERROR("number of discovered devices in JTAG chain (%i) doesn't match configuration (%i)", device_count, jtag_num_devices); ERROR("check the config file and ensure proper JTAG communication (connections, speed, ...)"); - exit(-1); + return ERROR_JTAG_INIT_FAILED; } return ERROR_OK; @@ -1434,6 +1434,12 @@ int jtag_init(struct command_context_s *cmd_ctx) jtag_add_statemove(TAP_TLR); jtag_execute_queue(); + /* examine chain first, as this could discover the real chain layout */ + if (jtag_examine_chain() != ERROR_OK) + { + ERROR("trying to validate configured JTAG chain anyway..."); + } + while (jtag_validate_chain() != ERROR_OK) { validate_tries++; @@ -1445,8 +1451,6 @@ int jtag_init(struct command_context_s *cmd_ctx) usleep(10000); } - jtag_examine_chain(); - return ERROR_OK; } } |