Mega-commit to bring in memory tagging.

Each memory image byte is now tagged as it's being read from a file.
Only bytes read from a file will be written or verified (modulo page
granularity requirements).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1007 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2011-09-14 21:49:42 +00:00
parent 0926a2cbd7
commit d742827da1
18 changed files with 489 additions and 469 deletions

View File

@@ -737,9 +737,11 @@ static void jtagmkI_close(PROGRAMMER * pgm)
static int jtagmkI_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
int page_size, int n_bytes)
unsigned int page_size,
unsigned int addr, unsigned int n_bytes)
{
int addr, block_size, send_size, tries;
int block_size, send_size, tries;
unsigned int maxaddr = addr + n_bytes;
unsigned char cmd[6], *datacmd;
unsigned char resp[2];
int is_flash = 0;
@@ -781,9 +783,7 @@ static int jtagmkI_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
datacmd[0] = CMD_DATA;
serial_recv_timeout = 1000;
for (addr = 0; addr < n_bytes; addr += page_size) {
report_progress(addr, n_bytes,NULL);
for (; addr < maxaddr; addr += page_size) {
tries = 0;
again:
@@ -875,9 +875,11 @@ static int jtagmkI_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
}
static int jtagmkI_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
int page_size, int n_bytes)
unsigned int page_size,
unsigned int addr, unsigned int n_bytes)
{
int addr, block_size, read_size, is_flash = 0, tries;
int block_size, read_size, is_flash = 0, tries;
unsigned int maxaddr = addr + n_bytes;
unsigned char cmd[6], resp[256 * 2 + 3];
long otimeout = serial_recv_timeout;
#define MAXTRIES 3
@@ -906,9 +908,7 @@ static int jtagmkI_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
}
serial_recv_timeout = 1000;
for (addr = 0; addr < n_bytes; addr += page_size) {
report_progress(addr, n_bytes,NULL);
for (; addr < maxaddr; addr += page_size) {
tries = 0;
again:
if (tries != 0 && jtagmkI_resync(pgm, 2000, 0) < 0) {