Skip to content

Commit 44e782d

Browse files
danieldegrasseborneoa
authored andcommitted
target/arc: allow reading memory while target runs
There is no reason that ARC can't support reading from memory over JTAG while the target is executing, and this is in fact required for RTT support. Remove this check from arc_mem_read and arc_mem_write Change-Id: I2accfb4b99bf77c5473d133623e0eb0632cb45f6 Signed-off-by: Daniel DeGrasse <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8721 Tested-by: jenkins Reviewed-by: Evgeniy Didin <[email protected]> Reviewed-by: Antonio Borneo <[email protected]>
1 parent 9bb0a45 commit 44e782d

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/target/arc_mem.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,6 @@ int arc_mem_write(struct target *target, target_addr_t address, uint32_t size,
161161
LOG_TARGET_DEBUG(target, "address: 0x%08" TARGET_PRIxADDR ", size: %" PRIu32 ", count: %" PRIu32,
162162
address, size, count);
163163

164-
if (target->state != TARGET_HALTED) {
165-
LOG_TARGET_ERROR(target, "not halted");
166-
return ERROR_TARGET_NOT_HALTED;
167-
}
168-
169164
/* sanitize arguments */
170165
if (((size != 4) && (size != 2) && (size != 1)) || !(count) || !(buffer))
171166
return ERROR_COMMAND_SYNTAX_ERROR;
@@ -246,11 +241,6 @@ int arc_mem_read(struct target *target, target_addr_t address, uint32_t size,
246241
LOG_TARGET_DEBUG(target, "Read memory: addr=0x%08" TARGET_PRIxADDR ", size=%" PRIu32
247242
", count=%" PRIu32, address, size, count);
248243

249-
if (target->state != TARGET_HALTED) {
250-
LOG_TARGET_WARNING(target, "target not halted");
251-
return ERROR_TARGET_NOT_HALTED;
252-
}
253-
254244
/* Sanitize arguments */
255245
if (((size != 4) && (size != 2) && (size != 1)) || !(count) || !(buffer))
256246
return ERROR_COMMAND_SYNTAX_ERROR;

0 commit comments

Comments
 (0)