usb: samples: mass: add warning for no conf and nrf52840 conf

Added a warning that will abort build without disks.
Added a default configuration for nrf52840_pca10056.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
This commit is contained in:
Marcin Szymczyk 2019-03-12 12:52:23 +01:00 committed by Kumar Gala
parent d293d0c682
commit c8dfdb63f9
2 changed files with 16 additions and 0 deletions

View file

@ -2,5 +2,9 @@ cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(mass)
if((NOT CONFIG_DISK_ACCESS_FLASH) AND (NOT CONFIG_DISK_ACCESS_RAM))
message( FATAL_ERROR "No disk access settings detected. Enable one of overlays: overlay-flash-disk.conf or overlay-ram-disk.conf" )
endif()
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

View file

@ -0,0 +1,12 @@
CONFIG_STDOUT_CONSOLE=y
CONFIG_GPIO=y
CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_MASS_STORAGE=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
CONFIG_DISK_ACCESS_RAM=y
CONFIG_MASS_STORAGE_DISK_NAME="RAM"