On Sat, 23 Aug 2008 10:13:05 +0200, Øyvind Harboe wrote: > On Sat, Aug 23, 2008 at 10:04 AM, Daniel Gimpelevich > <[EMAIL PROTECTED]> > wrote: >> On Sat, 23 Aug 2008 09:57:42 +0200, Øyvind Harboe wrote: >> >>>> /* 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 - 1 < c->base + c->size - 1) && target == c->target) >>>> return c; >>> >>> what about the case where addr==0 for a flash starting at address 0? >> >> Got a better idea? > > My question was as to whether the above was correct or not. > > I don't disagree that there is a bug to be fixed.
Currently, it would work for a flash at zero, and not at the end. The proposed change would make it work at the end, and not at zero. A hypothetical flash containing the zero address in its middle would not work either way. I don't have immediate ideas of how to account for all these possibilities, but the reset vector is near the end, and one may expect that to be in flash. _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development