#
# Copyright (c) 2021 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_BOOT_MAX_IMG_SECTORS=240
CONFIG_DISABLE_FLASH_PATCH=y

## the following kconfig are optional
# CONFIG_SIZE_OPTIMIZATIONS=y

# Disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n
# FOR NCS 1.8
#CONFIG_SYSTEM_CLOCK_DISABLE=y
# FOR NCS 1.9
#CONFIG_SYSTEM_TIMER_HAS_DISABLE_SUPPORT=y

CONFIG_SYSTEM_CLOCK_NO_WAIT=y
CONFIG_PM=n

CONFIG_MAIN_STACK_SIZE=10240
# CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"

CONFIG_BOOT_BOOTSTRAP=n

# CONFIG_BOOT_ENCRYPT_RSA=n
# CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
# CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=n
## replace the default signing key with your own key before production ##
# CONFIG_BOOT_SIGNATURE_KEY_FILE="mcuboot_private.pem"

## the following kconfig is used to make external flash as the secondary slot
CONFIG_FLASH=y

# Required by QSPI
CONFIG_MULTITHREADING=y

CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# Open the following config for NCS v1.7.x or earlier
# CONFIG_PM_EXTERNAL_FLASH=y
# CONFIG_PM_EXTERNAL_FLASH_DEV_NAME="MX25R64"
# CONFIG_PM_EXTERNAL_FLASH_BASE=0x0
# CONFIG_PM_EXTERNAL_FLASH_SIZE=0x800000

# Logger
# CONFIG_USE_SEGGER_RTT=y
# CONFIG_LOG=y
# CONFIG_LOG_DEFAULT_LEVEL=2
# CONFIG_LOG_MAX_LEVEL=3
# CONFIG_LOG_PRINTK=y
# CONFIG_LOG_IMMEDIATE=y
# CONFIG_LOG_BACKEND_SHOW_COLOR=n
# CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n
