]> git.sur5r.net Git - openocd/blobdiff - src/target/target_type.h
server, target, cortex_m: add deinit_target to the API to free resources
[openocd] / src / target / target_type.h
index 0b8d5daa1b59e122008b881391e43fb5c6eb2624..234cdfb0071fce12e8885cd2eff2467a4a83997b 100644 (file)
@@ -130,14 +130,6 @@ struct target_type {
        int (*write_buffer)(struct target *target, uint32_t address,
                        uint32_t size, const uint8_t *buffer);
 
-       /**
-        * Write target memory in multiples of 4 bytes, optimized for
-        * writing large quantities of data.  Do @b not call this
-        * function directly, use target_bulk_write_memory() instead.
-        */
-       int (*bulk_write_memory)(struct target *target, uint32_t address,
-                       uint32_t count, const uint8_t *buffer);
-
        int (*checksum_memory)(struct target *target, uint32_t address,
                        uint32_t count, uint32_t *checksum);
        int (*blank_check_memory)(struct target *target, uint32_t address,
@@ -233,6 +225,13 @@ struct target_type {
         * */
        int (*init_target)(struct command_context *cmd_ctx, struct target *target);
 
+       /**
+        * Free all the resources allocated by the target.
+        *
+        * @param target The target to deinit
+        */
+       void (*deinit_target)(struct target *target);
+
        /* translate from virtual to physical address. Default implementation is successful
         * no-op(i.e. virtual==physical).
         */
@@ -264,6 +263,19 @@ struct target_type {
         * circumstances.
         */
        int (*check_reset)(struct target *target);
+
+       /* get GDB file-I/O parameters from target
+        */
+       int (*get_gdb_fileio_info)(struct target *target, struct gdb_fileio_info *fileio_info);
+
+       /* pass GDB file-I/O response to target
+        */
+       int (*gdb_fileio_end)(struct target *target, int retcode, int fileio_errno, bool ctrl_c);
+
+       /* do target profiling
+        */
+       int (*profiling)(struct target *target, uint32_t *samples,
+                       uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds);
 };
 
 #endif /* TARGET_TYPE_H */