summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
13288a4)
Remove dummy implementations from all targets except arm7_9 and mips, which
are the only ones with real implementations. Replace with a single default
implementation simply calling target_write_memory().
Change-Id: I9228104240bc0b50661be20bc7909713ccda2164
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1213
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
count, buffer, count == 1);
}
count, buffer, count == 1);
}
-/* write target memory in multiples of 4 byte, optimized for writing large quantities of data */
-static int arm11_bulk_write_memory(struct target *target,
- uint32_t address, uint32_t count, const uint8_t *buffer)
-{
- if (target->state != TARGET_HALTED) {
- LOG_WARNING("target was not halted");
- return ERROR_TARGET_NOT_HALTED;
- }
-
- return arm11_write_memory(target, address, 4, count, buffer);
-}
-
/* target break-/watchpoint control
* rw: 0 = write, 1 = read, 2 = access
*/
/* target break-/watchpoint control
* rw: 0 = write, 1 = read, 2 = access
*/
.read_memory = arm11_read_memory,
.write_memory = arm11_write_memory,
.read_memory = arm11_read_memory,
.write_memory = arm11_write_memory,
- .bulk_write_memory = arm11_bulk_write_memory,
-
.checksum_memory = arm_checksum_memory,
.blank_check_memory = arm_blank_check_memory,
.checksum_memory = arm_checksum_memory,
.blank_check_memory = arm_blank_check_memory,
-static int avr32_ap7k_bulk_write_memory(struct target *target, uint32_t address,
- uint32_t count, const uint8_t *buffer)
-{
- LOG_ERROR("%s: implement me", __func__);
-
- return ERROR_OK;
-}
-
-
int avr32_ap7k_arch_state(struct target *target)
{
struct avr32_ap7k_common *ap7k = target_to_ap7k(target);
int avr32_ap7k_arch_state(struct target *target)
{
struct avr32_ap7k_common *ap7k = target_to_ap7k(target);
.read_memory = avr32_ap7k_read_memory,
.write_memory = avr32_ap7k_write_memory,
.read_memory = avr32_ap7k_read_memory,
.write_memory = avr32_ap7k_write_memory,
- .bulk_write_memory = avr32_ap7k_bulk_write_memory,
/* .checksum_memory = avr32_ap7k_checksum_memory, */
/* .blank_check_memory = avr32_ap7k_blank_check_memory, */
/* .checksum_memory = avr32_ap7k_checksum_memory, */
/* .blank_check_memory = avr32_ap7k_blank_check_memory, */
-static int cortex_a8_bulk_write_memory(struct target *target, uint32_t address,
- uint32_t count, const uint8_t *buffer)
-{
- return cortex_a8_write_memory(target, address, 4, count, buffer);
-}
-
static int cortex_a8_handle_target_request(void *priv)
{
struct target *target = priv;
static int cortex_a8_handle_target_request(void *priv)
{
struct target *target = priv;
.read_memory = cortex_a8_read_memory,
.write_memory = cortex_a8_write_memory,
.read_memory = cortex_a8_read_memory,
.write_memory = cortex_a8_write_memory,
- .bulk_write_memory = cortex_a8_bulk_write_memory,
.checksum_memory = arm_checksum_memory,
.blank_check_memory = arm_blank_check_memory,
.checksum_memory = arm_checksum_memory,
.blank_check_memory = arm_blank_check_memory,
-static int cortex_m3_bulk_write_memory(struct target *target, uint32_t address,
- uint32_t count, const uint8_t *buffer)
-{
- return cortex_m3_write_memory(target, address, 4, count, buffer);
-}
-
static int cortex_m3_init_target(struct command_context *cmd_ctx,
struct target *target)
{
static int cortex_m3_init_target(struct command_context *cmd_ctx,
struct target *target)
{
.read_memory = cortex_m3_read_memory,
.write_memory = cortex_m3_write_memory,
.read_memory = cortex_m3_read_memory,
.write_memory = cortex_m3_write_memory,
- .bulk_write_memory = cortex_m3_bulk_write_memory,
.checksum_memory = armv7m_checksum_memory,
.blank_check_memory = armv7m_blank_check_memory,
.checksum_memory = armv7m_checksum_memory,
.blank_check_memory = armv7m_blank_check_memory,
-static int dsp563xx_bulk_write_memory_default(struct target *target,
- uint32_t address,
- uint32_t count,
- const uint8_t *buffer)
-{
- return dsp563xx_write_memory(target,
- dsp563xx_get_default_memory(), address, 4, count, buffer);
-}
-
static int dsp563xx_add_breakpoint(struct target *target, struct breakpoint *breakpoint)
{
return ERROR_OK;
static int dsp563xx_add_breakpoint(struct target *target, struct breakpoint *breakpoint)
{
return ERROR_OK;
.read_memory = dsp563xx_read_memory_default,
.write_memory = dsp563xx_write_memory_default,
.read_memory = dsp563xx_read_memory_default,
.write_memory = dsp563xx_write_memory_default,
- .bulk_write_memory = dsp563xx_bulk_write_memory_default,
.read_buffer = dsp563xx_read_buffer_default,
.write_buffer = dsp563xx_write_buffer_default,
.read_buffer = dsp563xx_read_buffer_default,
.write_buffer = dsp563xx_write_buffer_default,
-static int dsp5680xx_bulk_write_memory(struct target *t, uint32_t a,
- uint32_t al, const uint8_t *b)
-{
- LOG_ERROR("Not implemented yet.");
- return ERROR_FAIL;
-}
-
static int dsp5680xx_write_buffer(struct target *t, uint32_t a, uint32_t size,
const uint8_t *b)
{
static int dsp5680xx_write_buffer(struct target *t, uint32_t a, uint32_t size,
const uint8_t *b)
{
.read_memory = dsp5680xx_read,
.write_memory = dsp5680xx_write,
.read_memory = dsp5680xx_read,
.write_memory = dsp5680xx_write,
- .bulk_write_memory = dsp5680xx_bulk_write_memory,
.checksum_memory = dsp5680xx_checksum_memory,
.checksum_memory = dsp5680xx_checksum_memory,
-static int adapter_bulk_write_memory(struct target *target,
- uint32_t address, uint32_t count,
- const uint8_t *buffer)
-{
- return adapter_write_memory(target, address, 4, count, buffer);
-}
-
static const struct command_registration adapter_command_handlers[] = {
{
.chain = arm_command_handlers,
static const struct command_registration adapter_command_handlers[] = {
{
.chain = arm_command_handlers,
.read_memory = adapter_read_memory,
.write_memory = adapter_write_memory,
.read_memory = adapter_read_memory,
.write_memory = adapter_write_memory,
- .bulk_write_memory = adapter_bulk_write_memory,
.checksum_memory = armv7m_checksum_memory,
.blank_check_memory = armv7m_blank_check_memory,
.checksum_memory = armv7m_checksum_memory,
.blank_check_memory = armv7m_blank_check_memory,
return target->type->bulk_write_memory(target, address, count, buffer);
}
return target->type->bulk_write_memory(target, address, count, buffer);
}
+static int target_bulk_write_memory_default(struct target *target,
+ uint32_t address, uint32_t count, const uint8_t *buffer)
+{
+ return target_write_memory(target, address, 4, count, buffer);
+}
+
int target_add_breakpoint(struct target *target,
struct breakpoint *breakpoint)
{
int target_add_breakpoint(struct target *target,
struct breakpoint *breakpoint)
{
if (target->type->write_buffer == NULL)
target->type->write_buffer = target_write_buffer_default;
if (target->type->write_buffer == NULL)
target->type->write_buffer = target_write_buffer_default;
+ if (target->type->bulk_write_memory == NULL)
+ target->type->bulk_write_memory = target_bulk_write_memory_default;
+
-static int xscale_bulk_write_memory(struct target *target, uint32_t address,
- uint32_t count, const uint8_t *buffer)
-{
- return xscale_write_memory(target, address, 4, count, buffer);
-}
-
static int xscale_get_ttb(struct target *target, uint32_t *result)
{
struct xscale_common *xscale = target_to_xscale(target);
static int xscale_get_ttb(struct target *target, uint32_t *result)
{
struct xscale_common *xscale = target_to_xscale(target);
.read_phys_memory = xscale_read_phys_memory,
.write_memory = xscale_write_memory,
.write_phys_memory = xscale_write_phys_memory,
.read_phys_memory = xscale_read_phys_memory,
.write_memory = xscale_write_memory,
.write_phys_memory = xscale_write_phys_memory,
- .bulk_write_memory = xscale_bulk_write_memory,
.checksum_memory = arm_checksum_memory,
.blank_check_memory = arm_blank_check_memory,
.checksum_memory = arm_checksum_memory,
.blank_check_memory = arm_blank_check_memory,
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)