blob: 6883a2f12e83f47030998769361706f18e1a6b5c [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
Carles Cufi0165be82018-03-26 17:43:51 +020036 select BASE64
Andrzej Puzdrowski386b5922018-04-06 19:26:24 +020037 select TINYCBOR
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020038 help
39 Enable serial recovery feature in mcuboot.
40
Fabio Utziga1fae672018-03-30 10:52:38 -030041config BOOT_MAX_IMG_SECTORS
42 int "max number of sectors per image slot"
43 default 128
44 help
45 Maximum number of sectors that a swap upgrade can handle
46
Andrzej Puzdrowskif6f652e2017-10-19 11:21:52 +020047config BOOT_MAX_LINE_INPUT_LEN
Fabio Utziga1fae672018-03-30 10:52:38 -030048 int "cmd line max length"
Andrzej Puzdrowskif6f652e2017-10-19 11:21:52 +020049 default 512
50 depends on MCUBOOT_SERIAL
51 help
52 Maximum length of commands transported over the serial protocol
53
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020054config BOOT_SERIAL_DETECT_PORT
55 string
56 prompt "GPIO Port to trigger serial recovery mode"
Andrzej Puzdrowski8a67dba2018-04-09 09:57:44 +020057 default GPIO_0 if SOC_FAMILY_NRF
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020058 depends on MCUBOOT_SERIAL
59 help
60 Serial recovery detect port
61
62config BOOT_SERIAL_DETECT_PIN
63 int
64 prompt "Pin to trigger serial recovery mode"
Andrzej Puzdrowski8e96b832017-09-08 16:49:14 +020065 default 11 if BOARD_NRF52840_PCA10056
66 default 13 if BOARD_NRF52_PCA10040
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020067 depends on MCUBOOT_SERIAL
68 help
69 Serial recovery detect pin
70
71config BOOT_SERIAL_DETECT_PIN_VAL
72 int "Boot Pin trigger value"
73 default 0
74 range 0 1
75 depends on MCUBOOT_SERIAL
76 help
77 The input pin logic value which triggers the boot serial recovery mode.