zephyr/samples/subsys/nvs/CMakeLists.txt
Kumar Gala c5496e8e7b 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>
2020-08-11 09:39:49 -04:00

17 lines
439 B
CMake

# 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)
target_sources(app PRIVATE src/main.c)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs/nvs)