On Sat, 23 Aug 2008 10:33:37 +0200, Øyvind Harboe wrote:
> a flash starting at 0 is a common case.
>
> How about:
>
> (addr <= c->base + c->size - 1)
Ah! How late it was…
Index: src/flash/flash.c
===================================================================
--- src/flash/flash.c (revision 959)
+++ src/flash/flash.c (working copy)
@@ -905,7 +905,7 @@
return NULL;
}
/* check whether address belongs to this flash bank */
- if ((addr >= c->base) && (addr < c->base + c->size) && target
== c->target)
+ if ((addr >= c->base) && (addr <= c->base + (c->size - 1)) &&
target == c->target)
return c;
}
LOG_ERROR("No flash at address 0x%08x\n", addr);
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development