zephyr: CMakeLists.txt: support nrfjprog mass erase flag
The upstream Zephyr runner for nrfjprog now supports an --erase
toggle, which controls whether a mass-erase is done. Add that to its
invocation when CONF_ZEPHYR_TRY_MASS_ERASE is given, just like is done
for dfu-util and pyocd.
Signed-off-by: Marti Bolivar <marti@foundries.io>
diff --git a/boot/zephyr/CMakeLists.txt b/boot/zephyr/CMakeLists.txt
index 5965f4a..6050e0d 100644
--- a/boot/zephyr/CMakeLists.txt
+++ b/boot/zephyr/CMakeLists.txt
@@ -53,6 +53,7 @@
if(CONFIG_ZEPHYR_TRY_MASS_ERASE)
board_runner_args(dfu-util "--dfuse-modifiers=force:mass-erase")
board_runner_args(pyocd "--flashtool-opt=-ce")
+ board_runner_args(nrfjprog "--erase")
endif()
endmacro()