static int target_continuous_poll = 1;
/* read a u32 from a buffer in target memory endianness */
-u32 target_buffer_get_u32(target_t *target, const u8 *buffer)
+u32 target_buffer_get_u32(target_t *target, const uint8_t *buffer)
{
if (target->endianness == TARGET_LITTLE_ENDIAN)
return le_to_h_u32(buffer);
}
/* read a u16 from a buffer in target memory endianness */
-u16 target_buffer_get_u16(target_t *target, const u8 *buffer)
+u16 target_buffer_get_u16(target_t *target, const uint8_t *buffer)
{
if (target->endianness == TARGET_LITTLE_ENDIAN)
return le_to_h_u16(buffer);
return be_to_h_u16(buffer);
}
-/* read a u8 from a buffer in target memory endianness */
-u8 target_buffer_get_u8(target_t *target, const u8 *buffer)
+/* read a uint8_t from a buffer in target memory endianness */
+uint8_t target_buffer_get_u8(target_t *target, const uint8_t *buffer)
{
return *buffer & 0x0ff;
}
/* write a u32 to a buffer in target memory endianness */
-void target_buffer_set_u32(target_t *target, u8 *buffer, u32 value)
+void target_buffer_set_u32(target_t *target, uint8_t *buffer, u32 value)
{
if (target->endianness == TARGET_LITTLE_ENDIAN)
h_u32_to_le(buffer, value);
}
/* write a u16 to a buffer in target memory endianness */
-void target_buffer_set_u16(target_t *target, u8 *buffer, u16 value)
+void target_buffer_set_u16(target_t *target, uint8_t *buffer, u16 value)
{
if (target->endianness == TARGET_LITTLE_ENDIAN)
h_u16_to_le(buffer, value);
h_u16_to_be(buffer, value);
}
-/* write a u8 to a buffer in target memory endianness */
-void target_buffer_set_u8(target_t *target, u8 *buffer, u8 value)
+/* write a uint8_t to a buffer in target memory endianness */
+void target_buffer_set_u8(target_t *target, uint8_t *buffer, uint8_t value)
{
*buffer = value;
}
return target->type->name;
}
-static int target_write_memory_imp(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer)
+static int target_write_memory_imp(struct target_s *target, u32 address, u32 size, u32 count, uint8_t *buffer)
{
if (!target_was_examined(target))
{
return target->type->write_memory_imp(target, address, size, count, buffer);
}
-static int target_read_memory_imp(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer)
+static int target_read_memory_imp(struct target_s *target, u32 address, u32 size, u32 count, uint8_t *buffer)
{
if (!target_was_examined(target))
{
}
int target_read_memory(struct target_s *target,
- u32 address, u32 size, u32 count, u8 *buffer)
+ u32 address, u32 size, u32 count, uint8_t *buffer)
{
return target->type->read_memory(target, address, size, count, buffer);
}
int target_write_memory(struct target_s *target,
- u32 address, u32 size, u32 count, u8 *buffer)
+ u32 address, u32 size, u32 count, uint8_t *buffer)
{
return target->type->write_memory(target, address, size, count, buffer);
}
int target_bulk_write_memory(struct target_s *target,
- u32 address, u32 count, u8 *buffer)
+ u32 address, u32 count, uint8_t *buffer)
{
return target->type->bulk_write_memory(target, address, count, buffer);
}
* mode respectively, otherwise data is handled as quickly as
* possible
*/
-int target_write_buffer(struct target_s *target, u32 address, u32 size, u8 *buffer)
+int target_write_buffer(struct target_s *target, u32 address, u32 size, uint8_t *buffer)
{
int retval;
LOG_DEBUG("writing buffer of %i byte at 0x%8.8x", size, address);
* mode respectively, otherwise data is handled as quickly as
* possible
*/
-int target_read_buffer(struct target_s *target, u32 address, u32 size, u8 *buffer)
+int target_read_buffer(struct target_s *target, u32 address, u32 size, uint8_t *buffer)
{
int retval;
LOG_DEBUG("reading buffer of %i byte at 0x%8.8x", size, address);
int target_checksum_memory(struct target_s *target, u32 address, u32 size, u32* crc)
{
- u8 *buffer;
+ uint8_t *buffer;
int retval;
u32 i;
u32 checksum = 0;
int target_read_u32(struct target_s *target, u32 address, u32 *value)
{
- u8 value_buf[4];
+ uint8_t value_buf[4];
if (!target_was_examined(target))
{
LOG_ERROR("Target not examined yet");
int target_read_u16(struct target_s *target, u32 address, u16 *value)
{
- u8 value_buf[2];
+ uint8_t value_buf[2];
if (!target_was_examined(target))
{
LOG_ERROR("Target not examined yet");
return retval;
}
-int target_read_u8(struct target_s *target, u32 address, u8 *value)
+int target_read_u8(struct target_s *target, u32 address, uint8_t *value)
{
int retval = target_read_memory(target, address, 1, 1, value);
if (!target_was_examined(target))
int target_write_u32(struct target_s *target, u32 address, u32 value)
{
int retval;
- u8 value_buf[4];
+ uint8_t value_buf[4];
if (!target_was_examined(target))
{
LOG_ERROR("Target not examined yet");
int target_write_u16(struct target_s *target, u32 address, u16 value)
{
int retval;
- u8 value_buf[2];
+ uint8_t value_buf[2];
if (!target_was_examined(target))
{
LOG_ERROR("Target not examined yet");
return retval;
}
-int target_write_u8(struct target_s *target, u32 address, u8 value)
+int target_write_u8(struct target_s *target, u32 address, uint8_t value)
{
int retval;
if (!target_was_examined(target))
/* set register value */
if (argc == 2)
{
- u8 *buf = malloc(CEIL(reg->size, 8));
+ uint8_t *buf = malloc(CEIL(reg->size, 8));
str_to_buf(args[1], strlen(args[1]), buf, reg->size, 0);
reg_arch_type_t *arch_type = register_get_arch_type(reg->arch_type);
static void handle_md_output(struct command_context_s *cmd_ctx,
struct target_s *target, u32 address, unsigned size,
- unsigned count, const u8 *buffer)
+ unsigned count, const uint8_t *buffer)
{
const unsigned line_bytecnt = 32;
unsigned line_modulo = line_bytecnt / size;
}
u32 value=0;
- const u8 *value_ptr = buffer + i * size;
+ const uint8_t *value_ptr = buffer + i * size;
switch (size) {
case 4: value = target_buffer_get_u32(target, value_ptr); break;
case 2: value = target_buffer_get_u16(target, value_ptr); break;
return retval;
}
- u8 *buffer = calloc(count, size);
+ uint8_t *buffer = calloc(count, size);
target_t *target = get_current_target(cmd_ctx);
retval = target_read_memory(target,
target_t *target = get_current_target(cmd_ctx);
unsigned wordsize;
- u8 value_buf[4];
+ uint8_t value_buf[4];
switch (cmd[2])
{
case 'w':
static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
- u8 *buffer;
+ uint8_t *buffer;
u32 buf_cnt;
u32 image_size;
u32 min_address = 0;
{
fileio_t fileio;
- u8 buffer[560];
+ uint8_t buffer[560];
int retvaltemp;
duration_t duration;
static int handle_verify_image_command_internal(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, int verify)
{
- u8 *buffer;
+ uint8_t *buffer;
u32 buf_cnt;
u32 image_size;
int i;
if( checksum != mem_checksum )
{
/* failed crc checksum, fall back to a binary compare */
- u8 *data;
+ uint8_t *data;
command_print(cmd_ctx, "checksum mismatch - attempting binary compare");
- data = (u8*)malloc(buf_cnt);
+ data = (uint8_t*)malloc(buf_cnt);
/* Can we use 32bit word accesses? */
int size = 1;
writeLong(f, 0); /* padding */
writeLong(f, 0); /* padding */
- u8 zero = 0; /* GMON_TAG_TIME_HIST */
+ uint8_t zero = 0; /* GMON_TAG_TIME_HIST */
writeData(f, &zero, 1);
/* figure out bucket size */
u32 count;
u32 v;
const char *varname;
- u8 buffer[4096];
+ uint8_t buffer[4096];
int n, e, retval;
u32 i;
u32 count;
u32 v;
const char *varname;
- u8 buffer[4096];
+ uint8_t buffer[4096];
int n, e, retval;
u32 i;
Jim_GetOptInfo goi;
jim_wide a,b,c;
int x,y,z;
- u8 target_buf[32];
+ uint8_t target_buf[32];
Jim_Nvp *n;
target_t *target;
struct command_context_s *cmd_ctx;
struct FastLoad
{
u32 address;
- u8 *data;
+ uint8_t *data;
int length;
};
static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
- u8 *buffer;
+ uint8_t *buffer;
u32 buf_cnt;
u32 image_size;
u32 min_address=0;