blob: 4db769eb95f1e3276c4d8d329fb108e6a1bf8ea1 [file] [log] [blame]
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +02001# Copyright (c) 2017 Linaro Limited
2#
3# SPDX-License-Identifier: Apache-2.0
4#
5
6mainmenu "MCUBOOT configuration"
7
8config ZEPHYR_BASE
9 string
10 option env="ZEPHYR_BASE"
11
12source "$ZEPHYR_BASE/Kconfig.zephyr"
13
Carles Cufi84ede582018-01-29 15:12:00 +010014config MCUBOOT_DEVICE_SETTINGS
15 # Hidden selector for device-specific settings
16 bool
17 default y
18 # CPU options
19 select MCUBOOT_DEVICE_CPU_CORTEX_M0 if CPU_CORTEX_M0
Carles Cufi67c792e2018-01-29 15:14:31 +010020 # Enable flash page layout if available
21 select FLASH_PAGE_LAYOUT if FLASH_HAS_PAGE_LAYOUT
Carles Cufi84ede582018-01-29 15:12:00 +010022
23config MCUBOOT_DEVICE_CPU_CORTEX_M0
24 # Hidden selector for Cortex-M0 settings
25 bool
26 default n
27 select SW_VECTOR_RELAY if !CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP
28
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020029menuconfig MCUBOOT_SERIAL
30 bool
31 prompt "MCUBOOT serial recovery"
32 default n
33 select REBOOT
Andrzej Puzdrowskif6f652e2017-10-19 11:21:52 +020034 select UART_INTERRUPT_DRIVEN
35 select SERIAL
Andrzej Puzdrowski8e96b832017-09-08 16:49:14 +020036 select NEWLIB_LIBC
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020037 help
38 Enable serial recovery feature in mcuboot.
39
Andrzej Puzdrowskif6f652e2017-10-19 11:21:52 +020040config BOOT_MAX_LINE_INPUT_LEN
41 int "cmd line max length"
42 default 512
43 depends on MCUBOOT_SERIAL
44 help
45 Maximum length of commands transported over the serial protocol
46
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020047config BOOT_SERIAL_DETECT_PORT
48 string
49 prompt "GPIO Port to trigger serial recovery mode"
Andrzej Puzdrowski8e96b832017-09-08 16:49:14 +020050 default GPIO_0 if SOC_FAMILY_NRF5
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020051 depends on MCUBOOT_SERIAL
52 help
53 Serial recovery detect port
54
55config BOOT_SERIAL_DETECT_PIN
56 int
57 prompt "Pin to trigger serial recovery mode"
Andrzej Puzdrowski8e96b832017-09-08 16:49:14 +020058 default 11 if BOARD_NRF52840_PCA10056
59 default 13 if BOARD_NRF52_PCA10040
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020060 depends on MCUBOOT_SERIAL
61 help
62 Serial recovery detect pin
63
64config BOOT_SERIAL_DETECT_PIN_VAL
65 int "Boot Pin trigger value"
66 default 0
67 range 0 1
68 depends on MCUBOOT_SERIAL
69 help
70 The input pin logic value which triggers the boot serial recovery mode.