diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-03-10 14:07:28 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-03-10 14:07:28 +0000 |
commit | e6dac739cffdecc0c65254eb7b3f2942cfff0f68 (patch) | |
tree | 1f991f0dea21966de4845a93843ce196197022e2 /src/target | |
parent | 0424155dfc29ab8e3b5e4b7f36f9164df7b5b740 (diff) | |
download | openocd+libswd-e6dac739cffdecc0c65254eb7b3f2942cfff0f68.tar.gz openocd+libswd-e6dac739cffdecc0c65254eb7b3f2942cfff0f68.tar.bz2 openocd+libswd-e6dac739cffdecc0c65254eb7b3f2942cfff0f68.tar.xz openocd+libswd-e6dac739cffdecc0c65254eb7b3f2942cfff0f68.zip |
- 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
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/arm11.c | 6 | ||||
-rw-r--r-- | src/target/armv4_5.c | 6 | ||||
-rw-r--r-- | src/target/armv7m.c | 6 | ||||
-rw-r--r-- | src/target/target.h | 10 |
4 files changed, 9 insertions, 19 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c index a197945f..890b836b 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -1040,12 +1040,6 @@ int arm11_get_gdb_reg_list(struct target_s *target, struct reg_s **reg_list[], i arm11_common_t * arm11 = target->arch_info; - if (target->state != TARGET_HALTED) - { - WARNING("target was not halted"); - return ERROR_TARGET_NOT_HALTED; - } - *reg_list_size = ARM11_GDB_REGISTER_COUNT; *reg_list = malloc(sizeof(reg_t*) * ARM11_GDB_REGISTER_COUNT); diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 82e65c78..ff5f4735 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -474,12 +474,6 @@ int armv4_5_get_gdb_reg_list(target_t *target, reg_t **reg_list[], int *reg_list armv4_5_common_t *armv4_5 = target->arch_info; int i; - if (target->state != TARGET_HALTED) - { - ERROR("Target not halted"); - return ERROR_TARGET_NOT_HALTED; - } - *reg_list_size = 26; *reg_list = malloc(sizeof(reg_t*) * (*reg_list_size)); diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 6ee5903a..f1f0ac96 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -321,12 +321,6 @@ int armv7m_get_gdb_reg_list(target_t *target, reg_t **reg_list[], int *reg_list_ armv7m_common_t *armv7m = target->arch_info; int i; - if (target->state != TARGET_HALTED) - { - ERROR("Target not halted"); - return ERROR_TARGET_NOT_HALTED; - } - *reg_list_size = 26; *reg_list = malloc(sizeof(reg_t*) * (*reg_list_size)); diff --git a/src/target/target.h b/src/target/target.h index 8d70e77e..e0286650 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -127,7 +127,15 @@ typedef struct target_type_s int (*soft_reset_halt)(struct target_s *target); int (*prepare_reset_halt)(struct target_s *target); - /* target register access for gdb */ + /* target register access for gdb. + * + * Danger! this function will succeed even if the target is running + * and return a register list with dummy values. + * + * The reason is that GDB connection will fail without a valid register + * list, however it is after GDB is connected that monitor commands can + * be run to properly initialize the target + */ int (*get_gdb_reg_list)(struct target_s *target, struct reg_s **reg_list[], int *reg_list_size); /* target memory access |