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>
This commit is contained in:
Marti Bolivar 2018-03-26 13:14:22 -04:00 committed by David Brown
parent adf57829dc
commit 23e3853c0a
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ macro(app_set_runner_args)
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()