+ /* If the device can tell us the size of flash, make sure
+ * the image fits in that
+ */
+ if (has_flash_size) {
+ if (load->address < flash_base ||
+ load->address + load->length > flash_bound)
+ {
+ fprintf(stderr, "Image does not fit on device.\n");
+ fprintf(stderr, " Image base: %08x bounds %08x\n",
+ load->address, load->address + load->length);
+ fprintf(stderr, " Device base: %08x bounds %08x\n",
+ flash_base, flash_bound);
+ done(cc, 1);
+ }
+ }
+