X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fcore.c;h=9083ed15ef92a95dda02aa4f0d9362922c2b4905;hb=8c730aaee22a505cf66666be3ff28734ac885418;hp=01088f3c14e5bbc6387e12580618cabe3d8a89a3;hpb=cba1813d5c017e2d20969bb419a856fe15c5ceef;p=fw%2Fopenocd diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 01088f3c1..9083ed15e 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -29,6 +29,13 @@ #include +/** + * @file + * Upper level of NOR flash framework. + * The lower level interfaces are to drivers. These upper level ones + * primarily support access from Tcl scripts or from GDB. + */ + struct flash_bank *flash_banks; int flash_driver_erase(struct flash_bank *bank, int first, int last) @@ -449,9 +456,12 @@ int flash_write_unlock(struct target *target, struct image *image, break; } - /* REVISIT This needlessly touches sectors BETWEEN the + /* FIXME This needlessly touches sectors BETWEEN the * sections it's writing. Without auto erase, it just - * writes ones; unlikely to destroy data. + * writes ones. That WILL INVALIDATE data in cases + * like Stellaris Tempest chips, corrupting internal + * ECC codes; and at least FreeScale suggests issues + * with that approach (in HC11 documentation). * * With auto erase enabled, data in those sectors will * be needlessly destroyed; and some of the limited