samples: nvs: Do full chip erase when flashing

Add for various flash runners (pyocd, nrfjprog, and dfu-util) to do a
full chip erase.  This is needed for the sample to pass in sanitycheck
on real hardware.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-08-07 11:58:46 -05:00 committed by Anas Nashif
parent 2652dc71a3
commit c5496e8e7b

View file

@ -1,6 +1,13 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1) cmake_minimum_required(VERSION 3.13.1)
macro(app_set_runner_args)
board_runner_args(dfu-util "--dfuse-modifiers=force:mass-erase")
board_runner_args(pyocd "--erase")
board_runner_args(nrfjprog "--erase")
endmacro()
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(nvs) project(nvs)