From: ntfreak at B. <nt...@ma...> - 2009-02-12 16:35:04
|
Author: ntfreak Date: 2009-02-12 16:35:03 +0100 (Thu, 12 Feb 2009) New Revision: 1371 Modified: trunk/src/flash/flash.c Log: - issue warning when flash image exceeds configured flash size. - see https://lists.berlios.de/pipermail/openocd-development/2009-February/004680.html Modified: trunk/src/flash/flash.c =================================================================== --- trunk/src/flash/flash.c 2009-02-10 18:21:17 UTC (rev 1370) +++ trunk/src/flash/flash.c 2009-02-12 15:35:03 UTC (rev 1371) @@ -1053,7 +1053,11 @@ /* fit the run into bank constraints */ if (run_address + run_size > c->base + c->size) + { + LOG_WARNING("writing %d bytes only - as image section is %d bytes and bank is only %d bytes", \ + c->base + c->size - run_address, run_size, c->size); run_size = c->base + c->size - run_address; + } /* allocate buffer */ buffer = malloc(run_size); |