- explicitly disable monitor mode on ARM7/9 targets
[fw/openocd] / src / target / target.h
index 6d3b6d172e06ba8096416386173c8959c686ca0e..9ab3d19adb82da28da4b31cedafbd752213bf920 100644 (file)
@@ -50,6 +50,8 @@ enum daemon_startup_mode
        DAEMON_RESET,           /* reset target (behaviour defined by reset_mode */
 };
 
+extern enum daemon_startup_mode startup_mode;
+
 enum target_reset_mode
 {
        RESET_RUN = 0,          /* reset and let target run */
@@ -108,6 +110,7 @@ typedef struct target_type_s
        int (*assert_reset)(struct target_s *target);
        int (*deassert_reset)(struct target_s *target);
        int (*soft_reset_halt)(struct target_s *target);
+       int (*prepare_reset_halt)(struct target_s *target);
        
        /* target register access for gdb */
        int (*get_gdb_reg_list)(struct target_s *target, struct reg_s **reg_list[], int *reg_list_size);
@@ -125,9 +128,9 @@ typedef struct target_type_s
        /* target break-/watchpoint control 
        * rw: 0 = write, 1 = read, 2 = access
        */
-       int (*add_breakpoint)(struct target_s *target, u32 address, u32 length, enum breakpoint_type type);
+       int (*add_breakpoint)(struct target_s *target, breakpoint_t *breakpoint);
        int (*remove_breakpoint)(struct target_s *target, breakpoint_t *breakpoint);
-       int (*add_watchpoint)(struct target_s *target, u32 address, u32 length, enum watchpoint_rw rw);
+       int (*add_watchpoint)(struct target_s *target, watchpoint_t *watchpoint);
        int (*remove_watchpoint)(struct target_s *target, watchpoint_t *watchpoint);
 
        /* target algorithm support */
@@ -217,6 +220,18 @@ extern target_t *targets;
 extern target_event_callback_t *target_event_callbacks;
 extern target_timer_callback_t *target_timer_callbacks;
 
+extern u32 target_buffer_get_u32(target_t *target, u8 *buffer);
+extern u16 target_buffer_get_u16(target_t *target, u8 *buffer);
+extern void target_buffer_set_u32(target_t *target, u8 *buffer, u32 value);
+extern void target_buffer_set_u16(target_t *target, u8 *buffer, u16 value);
+
+int target_read_u32(struct target_s *target, u32 address, u32 *value);
+int target_read_u16(struct target_s *target, u32 address, u16 *value);
+int target_read_u8(struct target_s *target, u32 address, u8 *value);
+int target_write_u32(struct target_s *target, u32 address, u32 value);
+int target_write_u16(struct target_s *target, u32 address, u16 value);
+int target_write_u8(struct target_s *target, u32 address, u8 value);
+
 #define ERROR_TARGET_INVALID   (-300)
 #define ERROR_TARGET_INIT_FAILED (-301)
 #define ERROR_TARGET_TIMEOUT   (-302)