X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Ftarget.c;h=1eb14352aeacd13c57370185904e09d9137af9a7;hb=e7e9bfde47768b22be8b15c30c027dc8fb67c778;hp=9596302d7db41cbd5829f1e93444e0ef59bdd6f4;hpb=d72e90ae4b070cc08799e800c111dd422ac6b1a4;p=openocd.git diff --git a/src/target/target.c b/src/target/target.c index 9596302d7d..1eb14352ae 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -35,6 +35,7 @@ #include #include +#include #include "target.h" #include "target_type.h" @@ -472,6 +473,14 @@ int target_resume(struct target *target, int current, uint32_t address, int hand if ((retval = target->type->resume(target, current, address, handle_breakpoints, debug_execution)) != ERROR_OK) return retval; + /* Invalidate any cached protect/erase/... flash status, since + * almost all targets will now be able modify the flash by + * themselves. We want flash drivers and infrastructure to + * be able to rely on (non-invalidated) cached state. + * + * REVISIT do the same for NAND ; maybe other flash flavors too... + */ + nor_resume(target); return retval; }