diff --git a/src/st-flash/flash.c b/src/st-flash/flash.c index a7506366..cd27cebe 100644 --- a/src/st-flash/flash.c +++ b/src/st-flash/flash.c @@ -197,7 +197,7 @@ int32_t main(int32_t ac, char** av) { printf("OTP Write NOT implemented\n"); goto on_error; } - err = stlink_fwrite_flash(sl, o.filename, o.addr, erase_type); + err = stlink_fwrite_flash(sl, o.filename, o.addr, NO_ERASE); if (err == -1) { printf("stlink_fwrite_flash() == -1\n"); diff --git a/src/stlink-lib/common_flash.h b/src/stlink-lib/common_flash.h index fce55bdd..a85e5439 100644 --- a/src/stlink-lib/common_flash.h +++ b/src/stlink-lib/common_flash.h @@ -11,6 +11,7 @@ #define BANK_2 1 enum erase_type_t { + NO_ERASE = 0, SECTION_ERASE = 1, MASS_ERASE = 2, };