mips32, use scan32 function for reading impcode/idcode.
[fw/openocd] / src / target / hla_target.c
index feeb11f667c3b2d867967664aae8ba448ea949ed..78dc8c5128228ef12e22c5636eeb80ae28f3d62a 100644 (file)
@@ -584,7 +584,7 @@ static int adapter_halt(struct target *target)
 }
 
 static int adapter_resume(struct target *target, int current,
-               uint32_t address, int handle_breakpoints,
+               target_addr_t address, int handle_breakpoints,
                int debug_execution)
 {
        int res;
@@ -594,8 +594,8 @@ static int adapter_resume(struct target *target, int current,
        struct breakpoint *breakpoint = NULL;
        struct reg *pc;
 
-       LOG_DEBUG("%s %d 0x%08" PRIx32 " %d %d", __func__, current, address,
-                       handle_breakpoints, debug_execution);
+       LOG_DEBUG("%s %d " TARGET_ADDR_FMT " %d %d", __func__, current,
+                       address, handle_breakpoints, debug_execution);
 
        if (target->state != TARGET_HALTED) {
                LOG_WARNING("target not halted");
@@ -642,7 +642,7 @@ static int adapter_resume(struct target *target, int current,
                /* Single step past breakpoint at current address */
                breakpoint = breakpoint_find(target, resume_pc);
                if (breakpoint) {
-                       LOG_DEBUG("unset breakpoint at 0x%8.8" PRIx32 " (ID: %" PRIu32 ")",
+                       LOG_DEBUG("unset breakpoint at " TARGET_ADDR_FMT " (ID: %" PRIu32 ")",
                                        breakpoint->address,
                                        breakpoint->unique_id);
                        cortex_m_unset_breakpoint(target, breakpoint);
@@ -675,7 +675,7 @@ static int adapter_resume(struct target *target, int current,
 }
 
 static int adapter_step(struct target *target, int current,
-               uint32_t address, int handle_breakpoints)
+               target_addr_t address, int handle_breakpoints)
 {
        int res;
        struct hl_interface_s *adapter = target_to_adapter(target);
@@ -738,7 +738,7 @@ static int adapter_step(struct target *target, int current,
        return ERROR_OK;
 }
 
-static int adapter_read_memory(struct target *target, uint32_t address,
+static int adapter_read_memory(struct target *target, target_addr_t address,
                uint32_t size, uint32_t count,
                uint8_t *buffer)
 {
@@ -747,12 +747,13 @@ static int adapter_read_memory(struct target *target, uint32_t address,
        if (!count || !buffer)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
-       LOG_DEBUG("%s 0x%08" PRIx32 " %" PRIu32 " %" PRIu32, __func__, address, size, count);
+       LOG_DEBUG("%s " TARGET_ADDR_FMT " %" PRIu32 " %" PRIu32,
+                         __func__, address, size, count);
 
        return adapter->layout->api->read_mem(adapter->handle, address, size, count, buffer);
 }
 
-static int adapter_write_memory(struct target *target, uint32_t address,
+static int adapter_write_memory(struct target *target, target_addr_t address,
                uint32_t size, uint32_t count,
                const uint8_t *buffer)
 {
@@ -761,7 +762,8 @@ static int adapter_write_memory(struct target *target, uint32_t address,
        if (!count || !buffer)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
-       LOG_DEBUG("%s 0x%08" PRIx32 " %" PRIu32 " %" PRIu32, __func__, address, size, count);
+       LOG_DEBUG("%s " TARGET_ADDR_FMT " %" PRIu32 " %" PRIu32,
+                         __func__, address, size, count);
 
        return adapter->layout->api->write_mem(adapter->handle, address, size, count, buffer);
 }