- change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use swjdp_common_...
[openocd.git] / src / target / avrt.c
index 95f818eb784a824339a909b9ca17875303c04baf..a0b271139db988fa276d88106592b1de8e6c2e99 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "avrt.h"
-
-#include "register.h"
 #include "target.h"
-#include "log.h"
-#include "jtag.h"
-#include "binarybuffer.h"
-#include "time_support.h"
-#include "breakpoints.h"
-#include "fileio.h"
+#include "target_type.h"
 
-#include <stdlib.h>
-#include <string.h>
 
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-
-#define AVR_JTAG_INS_LEN                                                       4
+#define AVR_JTAG_INS_LEN       4
 
 /* cli handling */
 int avr_register_commands(struct command_context_s *cmd_ctx);
@@ -119,35 +104,35 @@ target_type_t avr_target =
 
 int avr_register_commands(struct command_context_s *cmd_ctx)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_target_create(struct target_s *target, Jim_Interp *interp)
 {
        avr_common_t *avr = calloc(1, sizeof(avr_common_t));
-       
+
        avr->jtag_info.tap = target->tap;
        target->arch_info = avr;
-       
+
        return ERROR_OK;
 }
 
 int avr_init_target(struct command_context_s *cmd_ctx, struct target_s *target)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_quit(void)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_arch_state(struct target_s *target)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
@@ -157,48 +142,48 @@ int avr_poll(target_t *target)
        {
                target->state = TARGET_HALTED;
        }
-       
-       LOG_DEBUG(__FUNCTION__);
+
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_halt(target_t *target)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_resume(struct target_s *target, int current, u32 address, int handle_breakpoints, int debug_execution)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_step(struct target_s *target, int current, u32 address, int handle_breakpoints)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_assert_reset(target_t *target)
 {
        target->state = TARGET_RESET;
-       
-       LOG_DEBUG(__FUNCTION__);
+
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_deassert_reset(target_t *target)
 {
        target->state = TARGET_RUNNING;
-       
-       LOG_DEBUG(__FUNCTION__);
+
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
 int avr_soft_reset_halt(struct target_s *target)
 {
-       LOG_DEBUG(__FUNCTION__);
+       LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
 }
 
@@ -225,22 +210,17 @@ int mcu_write_ir(jtag_tap_t *tap, u8 *ir_in, u8 *ir_out, int ir_len, int rti)
                LOG_ERROR("invalid ir_len");
                return ERROR_FAIL;
        }
-       
+
        {
                scan_field_t field[1];
-               
+
                field[0].tap = tap;
                field[0].num_bits = tap->ir_length;
                field[0].out_value = ir_out;
-               field[0].out_mask = NULL;
                field[0].in_value = ir_in;
-               field[0].in_check_value = NULL;
-               field[0].in_check_mask = NULL;
-               field[0].in_handler = NULL;
-               field[0].in_handler_priv = NULL;
                jtag_add_plain_ir_scan(sizeof(field) / sizeof(field[0]), field, TAP_IDLE);
        }
-       
+
        return ERROR_OK;
 }
 
@@ -251,22 +231,17 @@ int mcu_write_dr(jtag_tap_t *tap, u8 *dr_in, u8 *dr_out, int dr_len, int rti)
                LOG_ERROR("invalid tap");
                return ERROR_FAIL;
        }
-       
+
        {
                scan_field_t field[1];
-               
+
                field[0].tap = tap;
                field[0].num_bits = dr_len;
                field[0].out_value = dr_out;
-               field[0].out_mask = NULL;
                field[0].in_value = dr_in;
-               field[0].in_check_value = NULL;
-               field[0].in_check_mask = NULL;
-               field[0].in_handler = NULL;
-               field[0].in_handler_priv = NULL;
                jtag_add_plain_dr_scan(sizeof(field) / sizeof(field[0]), field, TAP_IDLE);
        }
-       
+
        return ERROR_OK;
 }
 
@@ -277,9 +252,9 @@ int mcu_write_ir_u8(jtag_tap_t *tap, u8 *ir_in, u8 ir_out, int ir_len, int rti)
                LOG_ERROR("ir_len overflow, maxium is 8");
                return ERROR_FAIL;
        }
-       
+
        mcu_write_ir(tap, ir_in, &ir_out, ir_len, rti);
-       
+
        return ERROR_OK;
 }
 
@@ -290,9 +265,9 @@ int mcu_write_dr_u8(jtag_tap_t *tap, u8 *dr_in, u8 dr_out, int dr_len, int rti)
                LOG_ERROR("dr_len overflow, maxium is 8");
                return ERROR_FAIL;
        }
-       
+
        mcu_write_dr(tap, dr_in, &dr_out, dr_len, rti);
-       
+
        return ERROR_OK;
 }
 
@@ -303,9 +278,9 @@ int mcu_write_ir_u16(jtag_tap_t *tap, u16 *ir_in, u16 ir_out, int ir_len, int rt
                LOG_ERROR("ir_len overflow, maxium is 16");
                return ERROR_FAIL;
        }
-       
+
        mcu_write_ir(tap, (u8*)ir_in, (u8*)&ir_out, ir_len, rti);
-       
+
        return ERROR_OK;
 }
 
@@ -316,9 +291,9 @@ int mcu_write_dr_u16(jtag_tap_t *tap, u16 *dr_in, u16 dr_out, int dr_len, int rt
                LOG_ERROR("dr_len overflow, maxium is 16");
                return ERROR_FAIL;
        }
-       
+
        mcu_write_dr(tap, (u8*)dr_in, (u8*)&dr_out, dr_len, rti);
-       
+
        return ERROR_OK;
 }
 
@@ -329,9 +304,9 @@ int mcu_write_ir_u32(jtag_tap_t *tap, u32 *ir_in, u32 ir_out, int ir_len, int rt
                LOG_ERROR("ir_len overflow, maxium is 32");
                return ERROR_FAIL;
        }
-       
+
        mcu_write_ir(tap, (u8*)ir_in, (u8*)&ir_out, ir_len, rti);
-       
+
        return ERROR_OK;
 }
 
@@ -342,9 +317,9 @@ int mcu_write_dr_u32(jtag_tap_t *tap, u32 *dr_in, u32 dr_out, int dr_len, int rt
                LOG_ERROR("dr_len overflow, maxium is 32");
                return ERROR_FAIL;
        }
-       
+
        mcu_write_dr(tap, (u8*)dr_in, (u8*)&dr_out, dr_len, rti);
-       
+
        return ERROR_OK;
 }
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)