From c5496e8e7b5ce9f7296f01777a5456b47054b5d3 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 7 Aug 2020 11:58:46 -0500 Subject: [PATCH] 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 --- samples/subsys/nvs/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/samples/subsys/nvs/CMakeLists.txt b/samples/subsys/nvs/CMakeLists.txt index 8055d6d440..faa8ab16a5 100644 --- a/samples/subsys/nvs/CMakeLists.txt +++ b/samples/subsys/nvs/CMakeLists.txt @@ -1,6 +1,13 @@ # SPDX-License-Identifier: Apache-2.0 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}) project(nvs)