target_write_memory() is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

target_write_memory() function

Write @a count items of @a size bytes to the memory of @a target at the @a address given. @a address must be aligned to @a size in target memory. The endianness is the same in the host and target memory for this function. \todo TODO: Really @a buffer should have been defined as "const void *" and @a buffer should have been aligned to @a size in the host memory. This is not enforced via e.g. assert's today and e.g. the target_write_buffer fn breaks this assumption. This routine is wrapper for target->type->write_memory.

Syntax

int target_write_memory(struct target *target,     target_addr_t address,     uint32_t size,     uint32_t count,     const uint8_t *buffer);
Implemented in target.c:1272

Arguments

target

address

size

count

buffer

References

LocationReferrerText
target.c:1272
int target_write_memory(struct target *target,
target.h:630
int target_write_memory(struct target *target,
FLASHPlugin.c:191loaded_plugin_load()
retval = target_write_memory(target, plugin->regions[i].base_address, 4, (plugin->regions[i].size + 3) / 4, (uint8_t *)pBuf);
FLASHPlugin.c:245loaded_plugin_unload()
int r = target_write_memory(plugin->target, plugin->regions[i].base_address, 4, (plugin->regions[i].size + 3) / 4, (uint8_t *)plugin->regions[i].original_contents);
FLASHPlugin.c:255loaded_plugin_unload()
FLASHPlugin.c:386plugin_write_sync()
retval = target_write_memory(target, plugin_info->WorkArea.Address, 4, todo / 4, buffer);
FLASHPlugin.c:391plugin_write_sync()
retval = target_write_memory(target, plugin_info->WorkArea.Address + (todo & ~3), 1, todo & 3, buffer + (todo & ~3));
FLASHPlugin.c:550call_plugin_func()
target_write_memory(target, sp, 4, 1, (uint8_t *)&argVal);
aarch64.c:1337aarch64_set_breakpoint()
retval = target_write_memory(target,
aarch64.c:1608aarch64_unset_breakpoint()
retval = target_write_memory(target,
aarch64.c:1614aarch64_unset_breakpoint()
retval = target_write_memory(target,
arm7_9_common.c:328arm7_9_unset_breakpoint()
retval = target_write_memory(target,
arm7_9_common.c:343arm7_9_unset_breakpoint()
retval = target_write_memory(target,
arm_io.c:59arm_code_to_working_area()
retval = target_write_memory(target, (*area)->address,
at91sam3.c:3313sam3_page_write()
r = target_write_memory(private->chip->target,
at91sam4.c:2857sam4_page_write()
r = target_write_memory(private->chip->target,
at91sam4l.c:496sam4l_write_page()
res = target_write_memory(target, address, 4, chip->page_size / 4, buf);
at91sam7.c:949at91sam7_write()
retval = target_write_memory(target, bank->base + pagen*dst_min_alignment, 4,
at91samd.c:707samd_modify_user_row_masked()
res = target_write_memory(target, SAMD_USER_ROW, 4, page_size / 4, buf);
at91samd.c:899samd_write()
res = target_write_memory(bank->target, address, 4, nw, pb + pg_offset);
at91samd.c:906samd_write()
res = target_write_memory(bank->target, address, 4, nw, buffer);
atsame5.c:532same5_modify_user_row_masked()
res = target_write_memory(target, SAMD_USER_ROW + i, 4, 4, buf + i);
atsame5.c:702same5_write()
res = target_write_memory(bank->target, address, 4, nw, pb + pg_offset);
atsame5.c:709same5_write()
res = target_write_memory(bank->target, address, 4, nw, buffer);
atsamv.c:440samv_page_write()
r = target_write_memory(target, addr, 4, SAMV_PAGE_SIZE / 4, buf);
cfi.c:126cfi_target_write_memory()
return target_write_memory(bank->target, addr, bank->bus_width,
cortex_a.c:1354cortex_a_set_breakpoint()
retval = target_write_memory(target,
cortex_a.c:1592cortex_a_unset_breakpoint()
retval = target_write_memory(target,
cortex_a.c:1598cortex_a_unset_breakpoint()
retval = target_write_memory(target,
cortex_a.c:2825cortex_a_write_buffer()
int retval = target_write_memory(target, address, size, 1, buffer);
cortex_a.c:2838cortex_a_write_buffer()
int retval = target_write_memory(target, address, size, aligned / size, buffer);
cortex_m.c:2089cortex_m_set_breakpoint()
retval = target_write_memory(target,
cortex_m.c:2138cortex_m_unset_breakpoint()
retval = target_write_memory(target, breakpoint->address & 0xFFFFFFFE,
kinetis.c:1532kinetis_ftfx_command()
result = target_write_memory(target, FTFX_FCCOB3, 4, 3, command);
kinetis.c:1824kinetis_write_sections()
result = target_write_memory(bank->target, k_chip->progr_accel_ram,
kinetis.c:1831kinetis_write_sections()
result = target_write_memory(bank->target, k_chip->progr_accel_ram,
lpc2000.c:709lpc2000_iap_working_area_init()
int retval = target_write_memory(target, (*iap_working_area)->address, 4, 2, jump_gate);
lpc2900.c:405lpc2900_write_index_page()
if (target_write_memory(target,
lpc2900.c:1308lpc2900_write()
if (target_write_memory(target,
lpc3180.c:505lpc3180_write_page()
target_write_memory(target, 0x200a8000,
lpc3180.c:507lpc3180_write_page()
target_write_memory(target, 0x200a8000,
lpc3180.c:736lpc3180_write_page()
target_write_memory(target,
lpc3180.c:745lpc3180_write_page()
target_write_memory(target,
lpc32xx.c:682lpc32xx_write_page_mlc()
retval = target_write_memory(target, 0x200a8000,
lpc32xx.c:688lpc32xx_write_page_mlc()
retval = target_write_memory(target, 0x200a8000,
lpc32xx.c:1052lpc32xx_write_page_slc()
retval = target_write_memory(target, target_mem_base, 4,
lpc32xx.c:1084lpc32xx_write_page_slc()
retval = target_write_memory(target,
lpc32xx.c:1093lpc32xx_write_page_slc()
retval = target_write_memory(target, 0x31000100, 4,
lpc32xx.c:1142lpc32xx_write_page_slc()
retval = target_write_memory(target, target_mem_base + SPARE_OFFS, 4,
lpc32xx.c:1150lpc32xx_write_page_slc()
retval = target_write_memory(target, 0x31000100, 4,
lpc32xx.c:1449lpc32xx_read_page_slc()
retval = target_write_memory(target, target_mem_base, 4,
lpc32xx.c:1478lpc32xx_read_page_slc()
retval = target_write_memory(target, 0x31000100, 4,
mips_m4k.c:680mips_m4k_set_breakpoint()
retval = target_write_memory(target, bpaddr, 2, 2, sdbbp_buf);
mips_m4k.c:777mips_m4k_unset_breakpoint()
retval = target_write_memory(target, breakpoint->address, 4, 1,
mips_m4k.c:788mips_m4k_unset_breakpoint()
retval = target_write_memory(target, breakpoint->address, 2, 2,
mips_m4k.c:801mips_m4k_unset_breakpoint()
retval = target_write_memory(target, breakpoint->address & ~1, 2, 1,
mips_mips64.c:535mips_mips64_unset_sdbbp()
return target_write_memory(target, bp->address, MIPS64_SDBBP_SIZE, 1,
mips_mips64.c:554mips_mips16_unset_sdbbp()
return target_write_memory(target, bp->address, MIPS16_SDBBP_SIZE, 1,
nrf5.c:1152nrf5_ll_flash_write()
retval = target_write_memory(target, address, 4, 1, buffer);
numicro.c:974numicro_write()
retval = target_write_memory(target,
renesas_rpchf.c:286rpc_hf_xfer()
ret = target_write_memory(target, rpc_base | RPC_WBUF, 4,
riscv.c:759write_by_given_size()
return target_write_memory(target, address, access_size, size / access_size, buffer);
riscv.c:771write_by_given_size()
return target_write_memory(target, address - offset_head, access_size, n_blocks, helper_buf);
semihosting_common.c:784semihosting_common()
retval = target_write_memory(target, addr, 4,
semihosting_common.c:1737semihosting_write_fields()
return target_write_memory(target, semihosting->param, 4,
stm32f1x.c:676stm32x_write_block()
retval = target_write_memory(target, address, 2, 1, buffer);
stm32f2x.c:865stm32x_write()
retval = target_write_memory(target, address, 2, 1, buffer + bytes_written);
stm32l4x.c:1584stm32l4_write_block_without_loader()
retval = target_write_memory(target, address, 4, data_width_in_words, src);
stm8.c:1501stm8_unset_breakpoint()
retval = target_write_memory(target, breakpoint->address, 1, 1,
str7x.c:615str7x_write()
target_write_memory(target, str7x_get_flash_adr(bank, FLASH_DR0),
str7x.c:620str7x_write()
target_write_memory(target, str7x_get_flash_adr(bank, FLASH_DR1),
str7x.c:655str7x_write()
target_write_memory(target, str7x_get_flash_adr(bank, FLASH_DR0),
str7x.c:659str7x_write()
target_write_memory(target, str7x_get_flash_adr(bank, FLASH_DR1),
str9x.c:508str9x_write()
target_write_memory(target, address, 2, 1, buffer + bytes_written);
str9x.c:549str9x_write()
target_write_memory(target, address, 2, 1, last_halfword);
swm050.c:79swm050_write()
retval = target_write_memory(target, bank->base + offset, 4, count/4, buffer);
target.c:2086target_restore_working_area()
retval = target_write_memory(target, area->address, 4, area->size / 4, area->backup);
target.c:2388target_write_buffer_default()
int retval = target_write_memory(target, address, size, 1, buffer);
target.c:2401target_write_buffer_default()
int retval = target_write_memory(target, address, size, aligned / size, buffer);
target.c:2644target_write_u64()
retval = target_write_memory(target, address, 8, 1, value_buf);
target.c:2665target_write_u32()
retval = target_write_memory(target, address, 4, 1, value_buf);
target.c:2686target_write_u16()
retval = target_write_memory(target, address, 2, 1, value_buf);
target.c:2704target_write_u8()
retval = target_write_memory(target, address, 1, 1, &value);
target.c:3557handle_mw_command()
fn = target_write_memory;
target.c:3657handle_mbatch_command()
status = target_write_memory(target, args[0], args[1], args[2], data);
target.c:4753target_jim_write_memory()
retval = target_write_memory(target, addr, width, chunk_len, buffer);
target.c:6533handle_test_mem_access_command()
retval = target_write_memory(target, wa->address, 1, num_bytes, test_pattern);
target.c:6626handle_test_mem_access_command()
retval = target_write_memory(target, wa->address, 1, num_bytes, test_pattern);
target.c:6639handle_test_mem_access_command()
retval = target_write_memory(target, wa->address + size + offset, size, count,
xmc1xxx.c:319xmc1xxx_write()
retval = target_write_memory(target,
xscale.c:2187xscale_unset_breakpoint()
retval = target_write_memory(target, breakpoint->address, 4, 1,
xscale.c:2192xscale_unset_breakpoint()
retval = target_write_memory(target, breakpoint->address, 2, 1,

Call Tree

Functions calling target_write_memory()
Functions called by target_write_memory()
target_write_memory()