#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
# General config
CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_REBOOT=y
CONFIG_NEWLIB_LIBC=y

# Network
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_NATIVE=n

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n

# Modem library
CONFIG_NRF_MODEM_LIB=y
CONFIG_NRF_MODEM_LIB_SYS_INIT=n

# Library for buttons and LEDs
CONFIG_DK_LIBRARY=y
CONFIG_DK_LIBRARY_INVERT_LEDS=n

# Heap and stacks
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=8192

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# GPIO
CONFIG_GPIO=y

# FOTA library
CONFIG_FOTA_DOWNLOAD=y

# Download client
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096

# DFU Target
CONFIG_DFU_TARGET=y

# Modem key management
CONFIG_MODEM_KEY_MGMT=y

# Application Upgrade support
CONFIG_BOOTLOADER_MCUBOOT=y

# Sample configuration
CONFIG_DOWNLOAD_HOST="nrfconnectsdk.s3.eu-central-1.amazonaws.com"
CONFIG_DOWNLOAD_FILE="app_update.bin"
CONFIG_APPLICATION_VERSION=1


# Open the following config for NCS v1.7.x or earlier
CONFIG_PM_EXTERNAL_FLASH=y
CONFIG_PM_EXTERNAL_FLASH_DEV_NAME="w25q128jv"
CONFIG_PM_EXTERNAL_FLASH_BASE=0x0
CONFIG_PM_EXTERNAL_FLASH_SIZE=0x800000
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_PM_EXTERNAL_FLASH_SUPPORT_LEGACY=y
## secondary slot on external Flash ##
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x2000
CONFIG_STREAM_FLASH=y
CONFIG_STREAM_FLASH_ERASE=y