FreeCalypso > hg > freecalypso-tools
comparison loadtools/flprogsrec.c @ 629:0f70fe9395c4
fc-loadtool: bug in the new program-m0 CRC-32 verification
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 29 Feb 2020 09:10:39 +0000 |
parents | 9c5b0629e346 |
children | d42534e5ac02 |
comparison
equal
deleted
inserted
replaced
628:9c5b0629e346 | 629:0f70fe9395c4 |
---|---|
285 /* reset flash to read mode */ | 285 /* reset flash to read mode */ |
286 if (bi->ops->reset_cmd(bi) < 0) | 286 if (bi->ops->reset_cmd(bi) < 0) |
287 return(-1); | 287 return(-1); |
288 printf("Verifying CRC-32 of %u programmed region(s)\n", nregions); | 288 printf("Verifying CRC-32 of %u programmed region(s)\n", nregions); |
289 for (reg = 0, regp = regions; reg < nregions; reg++, regp++) { | 289 for (reg = 0, regp = regions; reg < nregions; reg++, regp++) { |
290 rc = crc32_on_target((u_long) regp->start, | 290 rc = crc32_on_target((u_long) (bi->base_addr + regp->start), |
291 (u_long) (regp->end - regp->start), | 291 (u_long) (regp->end - regp->start), |
292 &crc_from_target); | 292 &crc_from_target); |
293 if (rc < 0) | 293 if (rc < 0) |
294 return(rc); | 294 return(rc); |
295 if (crc_from_target != regp->crc) { | 295 if (crc_from_target != regp->crc) { |