]> git.sur5r.net Git - openocd/blobdiff - src/flash/aduc702x.c
Use parse_u32 in handle_resume_command and handle_step_command.
[openocd] / src / flash / aduc702x.c
index 3bffe1112ca3045de55b5e5fba49336d22505769..6268b1cde83977e2faa8d5604fc241ddfed03026 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "time_support.h"
 #include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "armv4_5.h"
-#include "algorithm.h"
 #include "binarybuffer.h"
+#include "time_support.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 static int aduc702x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
 static int aduc702x_register_commands(struct command_context_s *cmd_ctx);
@@ -295,7 +288,7 @@ static int aduc702x_write_block(struct flash_bank_s *bank, u8 *buffer, u32 offse
                buf_set_u32(reg_params[2].value, 0, 32, address);
                buf_set_u32(reg_params[4].value, 0, 32, 0xFFFFF800);
 
-               if ((retval = target->type->run_algorithm(target, 0, NULL, 5, 
+               if ((retval = target_run_algorithm(target, 0, NULL, 5, 
                         reg_params, aduc702x_info->write_algorithm->address, 
                         aduc702x_info->write_algorithm->address + sizeof(aduc702x_flash_write_code) - 4, 
                         10000, &armv4_5_info)) != ERROR_OK)
@@ -331,7 +324,7 @@ static int aduc702x_write_block(struct flash_bank_s *bank, u8 *buffer, u32 offse
  * working area available. */
 static int aduc702x_write_single(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
 {
-       int x;
+       u32 x;
         u8 b;
        target_t *target = bank->target;