#include "breakpoints.h"
-char *breakpoint_type_strings[] =
+static char *breakpoint_type_strings[] =
{
"hardware",
"software"
};
-char *watchpoint_rw_strings[] =
+static char *watchpoint_rw_strings[] =
{
"read",
"write",
BKPT_SOFT,
};
-extern char *breakpoint_type_strings[];
-
enum watchpoint_rw
{
WPT_READ = 0, WPT_WRITE = 1, WPT_ACCESS = 2
};
-extern char *watchpoint_rw_strings[];
-
typedef struct breakpoint_s
{
u32 address;
#include <stdlib.h>
-bitfield_desc_t embeddedice_comms_ctrl_bitfield_desc[] =
+#if 0
+static bitfield_desc_t embeddedice_comms_ctrl_bitfield_desc[] =
{
{"R", 1},
{"W", 1},
{"reserved", 26},
{"version", 4}
};
+#endif
-int embeddedice_reg_arch_info[] =
+static int embeddedice_reg_arch_info[] =
{
0x0, 0x1, 0x4, 0x5,
0x8, 0x9, 0xa, 0xb, 0xc, 0xd,
0x2
};
-char* embeddedice_reg_list[] =
+static char* embeddedice_reg_list[] =
{
"debug_ctrl",
"debug_status",
"vector catch"
};
-int embeddedice_reg_arch_type = -1;
+static int embeddedice_reg_arch_type = -1;
-int embeddedice_get_reg(reg_t *reg);
+static int embeddedice_get_reg(reg_t *reg);
reg_cache_t* embeddedice_build_reg_cache(target_t *target, arm7_9_common_t *arm7_9)
{
return jtag_execute_queue();
}
-int embeddedice_get_reg(reg_t *reg)
+static int embeddedice_get_reg(reg_t *reg)
{
int retval;
if ((retval = embeddedice_read_reg(reg)) != ERROR_OK)
/* If many embeddedice_write_reg() follow eachother, then the >1 invocations can be this faster version of
* embeddedice_write_reg
*/
-static const int embeddedice_num_bits[]={32,5,1};
static __inline__ void embeddedice_write_reg_inner( jtag_tap_t *tap, int reg_addr, u32 value)
{
+ static const int embeddedice_num_bits[]={32,5,1};
u32 values[3];
values[0]=value;
#include <stdlib.h>
-char* etb_reg_list[] =
+static char* etb_reg_list[] =
{
"ETB_identification",
"ETB_ram_depth",
"ETB_control",
};
-int etb_reg_arch_type = -1;
+static int etb_reg_arch_type = -1;
-int etb_get_reg(reg_t *reg);
+static int etb_get_reg(reg_t *reg);
-int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int etb_set_instr(etb_t *etb, u32 new_instr)
+static int etb_set_instr(etb_t *etb, u32 new_instr)
{
jtag_tap_t *tap;
tap = etb->tap;
return ERROR_OK;
}
-int etb_scann(etb_t *etb, u32 new_scan_chain)
+static int etb_scann(etb_t *etb, u32 new_scan_chain)
{
if(etb->cur_scan_chain != new_scan_chain)
{
return reg_cache;
}
-int etb_get_reg(reg_t *reg)
+static int etb_get_reg(reg_t *reg)
{
int retval;
if ((retval = etb_read_reg(reg)) != ERROR_OK)
return ERROR_OK;
}
-int etb_read_ram(etb_t *etb, u32 *data, int num_frames)
+static int etb_read_ram(etb_t *etb, u32 *data, int num_frames)
{
scan_field_t fields[3];
int i;
return etb_write_reg(reg, buf_get_u32(reg->value, 0, reg->size));
}
-int etb_register_commands(struct command_context_s *cmd_ctx)
+static int etb_register_commands(struct command_context_s *cmd_ctx)
{
command_t *etb_cmd;
return ERROR_OK;
}
-int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
jtag_tap_t *tap;
return ERROR_OK;
}
-int etb_init(etm_context_t *etm_ctx)
+static int etb_init(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
return ERROR_OK;
}
-trace_status_t etb_status(etm_context_t *etm_ctx)
+static trace_status_t etb_status(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
return etm_ctx->capture_status;
}
-int etb_read_trace(etm_context_t *etm_ctx)
+static int etb_read_trace(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
int first_frame = 0;
return ERROR_OK;
}
-int etb_start_capture(etm_context_t *etm_ctx)
+static int etb_start_capture(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
u32 etb_ctrl_value = 0x1;
return ERROR_OK;
}
-int etb_stop_capture(etm_context_t *etm_ctx)
+static int etb_stop_capture(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
reg_t *etb_ctrl_reg = &etb->reg_cache->reg_list[ETB_CTRL];
extern int etb_set_reg(reg_t *reg, u32 value);
extern int etb_set_reg_w_exec(reg_t *reg, u8 *buf);
-extern int etb_register_commands(struct command_context_s *cmd_ctx);
-
#endif /* ETB_H */
*
*/
-bitfield_desc_t etm_comms_ctrl_bitfield_desc[] =
+#if 0
+static bitfield_desc_t etm_comms_ctrl_bitfield_desc[] =
{
{"R", 1},
{"W", 1},
{"reserved", 26},
{"version", 4}
};
+#endif
-int etm_reg_arch_info[] =
+static int etm_reg_arch_info[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
};
-int etm_reg_arch_size_info[] =
+static int etm_reg_arch_size_info[] =
{
32, 32, 17, 8, 3, 9, 32, 16,
17, 26, 25, 8, 17, 32, 32, 17,
17, 17, 17, 17, 32, 32, 32, 32
};
-char* etm_reg_list[] =
+static char* etm_reg_list[] =
{
"ETM_CTRL",
"ETM_CONFIG",
"ETM_CONTEXTID_COMPARATOR_MASK"
};
-int etm_reg_arch_type = -1;
+static int etm_reg_arch_type = -1;
-int etm_get_reg(reg_t *reg);
+static int etm_get_reg(reg_t *reg);
-command_t *etm_cmd = NULL;
+static command_t *etm_cmd = NULL;
reg_cache_t* etm_build_reg_cache(target_t *target, arm_jtag_t *jtag_info, etm_context_t *etm_ctx)
{
extern etm_capture_driver_t oocd_trace_capture_driver;
#endif
-etm_capture_driver_t *etm_capture_drivers[] =
+static etm_capture_driver_t *etm_capture_drivers[] =
{
&etb_capture_driver,
&etm_dummy_capture_driver,
"reserved",
};
-int etm_read_instruction(etm_context_t *ctx, arm_instruction_t *instruction)
+static int etm_read_instruction(etm_context_t *ctx, arm_instruction_t *instruction)
{
int i;
int section = -1;
return ERROR_OK;
}
-int etmv1_next_packet(etm_context_t *ctx, u8 *packet, int apo)
+static int etmv1_next_packet(etm_context_t *ctx, u8 *packet, int apo)
{
while (ctx->data_index < ctx->trace_depth)
{
return -1;
}
-int etmv1_branch_address(etm_context_t *ctx)
+static int etmv1_branch_address(etm_context_t *ctx)
{
int retval;
u8 packet;
return 0;
}
-int etmv1_data(etm_context_t *ctx, int size, u32 *data)
+static int etmv1_data(etm_context_t *ctx, int size, u32 *data)
{
int j;
u8 buf[4];
return 0;
}
-int etmv1_analyze_trace(etm_context_t *ctx, struct command_context_s *cmd_ctx)
+static int etmv1_analyze_trace(etm_context_t *ctx, struct command_context_s *cmd_ctx)
{
int retval;
arm_instruction_t instruction;
return ERROR_OK;
}
-int handle_etm_tracemode_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_tracemode_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_etm_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_etm_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_etm_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_etm_dump_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_dump_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
fileio_t file;
target_t *target;
return ERROR_OK;
}
-int handle_etm_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
fileio_t file;
target_t *target;
return ERROR_OK;
}
-int handle_etm_trigger_percent_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_trigger_percent_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_etm_start_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_start_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_etm_stop_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_stop_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_etm_analyze_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_analyze_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
#include <stdlib.h>
-int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int etm_dummy_register_commands(struct command_context_s *cmd_ctx)
+static int etm_dummy_register_commands(struct command_context_s *cmd_ctx)
{
command_t *etm_dummy_cmd;
return ERROR_OK;
}
-int etm_dummy_init(etm_context_t *etm_ctx)
+static int etm_dummy_init(etm_context_t *etm_ctx)
{
return ERROR_OK;
}
-trace_status_t etm_dummy_status(etm_context_t *etm_ctx)
+static trace_status_t etm_dummy_status(etm_context_t *etm_ctx)
{
return TRACE_IDLE;
}
-int etm_dummy_read_trace(etm_context_t *etm_ctx)
+static int etm_dummy_read_trace(etm_context_t *etm_ctx)
{
return ERROR_OK;
}
-int etm_dummy_start_capture(etm_context_t *etm_ctx)
+static int etm_dummy_start_capture(etm_context_t *etm_ctx)
{
return ERROR_ETM_PORTMODE_NOT_SUPPORTED;
}
-int etm_dummy_stop_capture(etm_context_t *etm_ctx)
+static int etm_dummy_stop_capture(etm_context_t *etm_ctx)
{
return ERROR_OK;
}
#include "etm.h"
extern etm_capture_driver_t etm_dummy_capture_driver;
-extern int etm_dummy_register_commands(struct command_context_s *cmd_ctx);
#endif /* ETB_H */
return ERROR_OK;
}
-int identify_image_type(image_t *image, char *type_string, char *url)
+static int identify_image_type(image_t *image, char *type_string, char *url)
{
if (type_string)
{
return ERROR_OK;
}
-int image_ihex_buffer_complete(image_t *image)
+static int image_ihex_buffer_complete(image_t *image)
{
image_ihex_t *ihex = image->type_private;
fileio_t *fileio = &ihex->fileio;
return ERROR_IMAGE_FORMAT_ERROR;
}
-int image_elf_read_headers(image_t *image)
+static int image_elf_read_headers(image_t *image)
{
image_elf_t *elf = image->type_private;
u32 read_bytes;
return ERROR_OK;
}
-int image_elf_read_section(image_t *image, int section, u32 offset, u32 size, u8 *buffer, u32 *size_read)
+static int image_elf_read_section(image_t *image, int section, u32 offset, u32 size, u8 *buffer, u32 *size_read)
{
image_elf_t *elf = image->type_private;
Elf32_Phdr *segment = (Elf32_Phdr *)image->sections[section].private;
return ERROR_OK;
}
-int image_mot_buffer_complete(image_t *image)
+static int image_mot_buffer_complete(image_t *image)
{
image_mot_t *mot = image->type_private;
fileio_t *fileio = &mot->fileio;
#include <stdlib.h>
-int oocd_trace_read_reg(oocd_trace_t *oocd_trace, int reg, u32 *value)
+static int oocd_trace_register_commands(struct command_context_s *cmd_ctx);
+
+static int oocd_trace_read_reg(oocd_trace_t *oocd_trace, int reg, u32 *value)
{
size_t bytes_written, bytes_read, bytes_to_read;
u8 cmd;
return ERROR_OK;
}
-int oocd_trace_write_reg(oocd_trace_t *oocd_trace, int reg, u32 value)
+static int oocd_trace_write_reg(oocd_trace_t *oocd_trace, int reg, u32 value)
{
size_t bytes_written;
u8 data[5];
return ERROR_OK;
}
-int oocd_trace_read_memory(oocd_trace_t *oocd_trace, u8 *data, u32 address, u32 size)
+static int oocd_trace_read_memory(oocd_trace_t *oocd_trace, u8 *data, u32 address, u32 size)
{
size_t bytes_written, bytes_to_read;
ssize_t bytes_read;
return ERROR_OK;
}
-int oocd_trace_init(etm_context_t *etm_ctx)
+static int oocd_trace_init(etm_context_t *etm_ctx)
{
u8 trash[256];
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
return ERROR_OK;
}
-trace_status_t oocd_trace_status(etm_context_t *etm_ctx)
+static trace_status_t oocd_trace_status(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
u32 status;
return etm_ctx->capture_status;
}
-int oocd_trace_read_trace(etm_context_t *etm_ctx)
+static int oocd_trace_read_trace(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
u32 status, address;
return ERROR_OK;
}
-int oocd_trace_start_capture(etm_context_t *etm_ctx)
+static int oocd_trace_start_capture(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
u32 control = 0x1; /* 0x1: enabled */
return ERROR_OK;
}
-int oocd_trace_stop_capture(etm_context_t *etm_ctx)
+static int oocd_trace_stop_capture(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
.read_trace = oocd_trace_read_trace,
};
-int handle_oocd_trace_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_oocd_trace_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_oocd_trace_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_oocd_trace_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
return ERROR_OK;
}
-int handle_oocd_trace_resync_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_oocd_trace_resync_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
extern etm_capture_driver_t oocd_trace_capture_driver;
-extern int oocd_trace_register_commands(struct command_context_s *cmd_ctx);
-
#endif /* OOCD_TRACE_TRACE_H */
#include <fileio.h>
#include <image.h>
-int cli_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv);
-
-int handle_targets_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-
-int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_poll_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_wait_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_reset_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_soft_reset_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_step_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_md_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_mw_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_dump_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_verify_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_test_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_bp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_rbp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_wp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_rwp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc);
-int handle_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_fast_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_targets_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+
+static int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_poll_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_wait_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_reset_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_soft_reset_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_step_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_md_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_mw_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_dump_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_verify_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_test_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_bp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_rbp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_wp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_rwp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int jim_array2mem(Jim_Interp *interp, int argc, Jim_Obj *const *argv);
static int jim_mem2array(Jim_Interp *interp, int argc, Jim_Obj *const *argv);
return retval;
}
-int handle_targets_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_targets_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
char *cp;
target_t *target = all_targets;
return retval;
}
-int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
reg_t *reg = NULL;
return ERROR_OK;
}
-int handle_poll_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_poll_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int retval = ERROR_OK;
target_t *target = get_current_target(cmd_ctx);
return retval;
}
-int handle_wait_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_wait_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int ms = 5000;
return ERROR_OK;
}
-int handle_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int retval;
target_t *target = get_current_target(cmd_ctx);
return handle_wait_halt_command(cmd_ctx, cmd, args, argc);
}
-int handle_soft_reset_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_soft_reset_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
return ERROR_OK;
}
-int handle_reset_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_reset_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
const Jim_Nvp *n;
enum target_reset_mode reset_mode = RESET_RUN;
}
-int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int retval;
target_t *target = get_current_target(cmd_ctx);
return retval;
}
-int handle_step_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_step_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
return ERROR_OK;
}
-int handle_md_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_md_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
const int line_bytecnt = 32;
int count = 1;
return retval;
}
-int handle_mw_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_mw_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
u32 address = 0;
u32 value = 0;
}
-int handle_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
u8 *buffer;
u32 buf_cnt;
}
-int handle_dump_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_dump_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
fileio_t fileio;
return ERROR_OK;
}
-int handle_verify_image_command_internal(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, int verify)
+static int handle_verify_image_command_internal(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, int verify)
{
u8 *buffer;
u32 buf_cnt;
return retval;
}
-int handle_verify_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_verify_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
return handle_verify_image_command_internal(cmd_ctx, cmd, args, argc, 1);
}
-int handle_test_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_test_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
return handle_verify_image_command_internal(cmd_ctx, cmd, args, argc, 0);
}
-int handle_bp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_bp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int retval;
target_t *target = get_current_target(cmd_ctx);
return ERROR_OK;
}
-int handle_rbp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_rbp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
return ERROR_OK;
}
-int handle_wp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_wp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
int retval;
return ERROR_OK;
}
-int handle_rwp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_rwp_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
return ERROR_OK;
}
-int handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc)
{
int retval;
target_t *target = get_current_target(cmd_ctx);
}
/* profiling samples the CPU PC as quickly as OpenOCD is able, which will be used as a random sampling of PC */
-int handle_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
struct timeval timeout, now;
-int handle_fast_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
u8 *buffer;
u32 buf_cnt;
return retval;
}
-int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
if (argc>0)
return ERROR_COMMAND_SYNTAX_ERROR;
#include <stdlib.h>
#include <string.h>
-command_t *target_request_cmd = NULL;
+static command_t *target_request_cmd = NULL;
static int charmsg_mode = 0;
-int target_asciimsg(target_t *target, u32 length)
+static int target_asciimsg(target_t *target, u32 length)
{
char *msg = malloc(CEIL(length + 1, 4) * 4);
debug_msg_receiver_t *c = target->dbgmsg;
return ERROR_OK;
}
-int target_charmsg(target_t *target, u8 msg)
+static int target_charmsg(target_t *target, u8 msg)
{
LOG_USER_N("%c", msg);
return ERROR_OK;
}
-int target_hexmsg(target_t *target, int size, u32 length)
+static int target_hexmsg(target_t *target, int size, u32 length)
{
u8 *data = malloc(CEIL(length * size, 4) * 4);
char line[128];
return ERROR_OK;
}
-int add_debug_msg_receiver(struct command_context_s *cmd_ctx, target_t *target)
+static int add_debug_msg_receiver(struct command_context_s *cmd_ctx, target_t *target)
{
debug_msg_receiver_t **p = &target->dbgmsg;
return ERROR_OK;
}
-debug_msg_receiver_t* find_debug_msg_receiver(struct command_context_s *cmd_ctx, target_t *target)
+static debug_msg_receiver_t* find_debug_msg_receiver(struct command_context_s *cmd_ctx, target_t *target)
{
int do_all_targets = 0;
debug_msg_receiver_t **p = &target->dbgmsg;
return ERROR_OK;
}
-int handle_target_request_debugmsgs_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_target_request_debugmsgs_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
return ERROR_OK;
}
-int handle_trace_point_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_trace_point_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
trace_t *trace = target->trace_info;
return ERROR_OK;
}
-int handle_trace_history_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_trace_history_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
trace_t *trace = target->trace_info;