GDB alive fixes for verify_image
git-svn-id: svn://svn.berlios.de/openocd/trunk@1014 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
aef29d913f
commit
316c9b9698
|
@ -1821,6 +1821,8 @@ int arm7_9_read_memory(struct target_s *target, u32 address, u32 size, u32 count
|
|||
reg[0] = address;
|
||||
arm7_9->write_core_regs(target, 0x1, reg);
|
||||
|
||||
int j=0;
|
||||
|
||||
switch (size)
|
||||
{
|
||||
case 4:
|
||||
|
@ -1848,6 +1850,11 @@ int arm7_9_read_memory(struct target_s *target, u32 address, u32 size, u32 count
|
|||
/* advance buffer, count number of accesses */
|
||||
buffer += thisrun_accesses * 4;
|
||||
num_accesses += thisrun_accesses;
|
||||
|
||||
if ((j++%1024)==0)
|
||||
{
|
||||
keep_alive();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
@ -1876,6 +1883,11 @@ int arm7_9_read_memory(struct target_s *target, u32 address, u32 size, u32 count
|
|||
/* advance buffer, count number of accesses */
|
||||
buffer += thisrun_accesses * 2;
|
||||
num_accesses += thisrun_accesses;
|
||||
|
||||
if ((j++%1024)==0)
|
||||
{
|
||||
keep_alive();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1904,6 +1916,11 @@ int arm7_9_read_memory(struct target_s *target, u32 address, u32 size, u32 count
|
|||
/* advance buffer, count number of accesses */
|
||||
buffer += thisrun_accesses * 1;
|
||||
num_accesses += thisrun_accesses;
|
||||
|
||||
if ((j++%1024)==0)
|
||||
{
|
||||
keep_alive();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
* Copyright (C) 2008 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
* *
|
||||
* Copyright (C) 2008 by Oyvind Harboe *
|
||||
* oyvind.harboe@zylin.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
|
|
|
@ -1022,6 +1022,10 @@ int image_calculate_checksum(u8* buffer, u32 nbytes, u32* checksum)
|
|||
{
|
||||
/* as per gdb */
|
||||
crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buffer++) & 255];
|
||||
if ((nbytes%16384)==0)
|
||||
{
|
||||
keep_alive();
|
||||
}
|
||||
}
|
||||
|
||||
*checksum = crc;
|
||||
|
|
|
@ -2285,6 +2285,10 @@ int handle_verify_image_command(struct command_context_s *cmd_ctx, char *cmd, ch
|
|||
retval=ERROR_FAIL;
|
||||
goto done;
|
||||
}
|
||||
if ((t%16384)==0)
|
||||
{
|
||||
keep_alive();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue