blob: 33b5b8ccafb7ab03e0f53dc8366be840fbe1755e [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 Puzdrowski8e96b832017-09-08 16:49:14 +020037 select NEWLIB_LIBC
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020038 help
39 Enable serial recovery feature in mcuboot.
40
Andrzej Puzdrowskif6f652e2017-10-19 11:21:52 +020041config BOOT_MAX_LINE_INPUT_LEN
42 int "cmd line max length"
43 default 512
44 depends on MCUBOOT_SERIAL
45 help
46 Maximum length of commands transported over the serial protocol
47
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020048config BOOT_SERIAL_DETECT_PORT
49 string
50 prompt "GPIO Port to trigger serial recovery mode"
Andrzej Puzdrowski8e96b832017-09-08 16:49:14 +020051 default GPIO_0 if SOC_FAMILY_NRF5
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020052 depends on MCUBOOT_SERIAL
53 help
54 Serial recovery detect port
55
56config BOOT_SERIAL_DETECT_PIN
57 int
58 prompt "Pin to trigger serial recovery mode"
Andrzej Puzdrowski8e96b832017-09-08 16:49:14 +020059 default 11 if BOARD_NRF52840_PCA10056
60 default 13 if BOARD_NRF52_PCA10040
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020061 depends on MCUBOOT_SERIAL
62 help
63 Serial recovery detect pin
64
65config BOOT_SERIAL_DETECT_PIN_VAL
66 int "Boot Pin trigger value"
67 default 0
68 range 0 1
69 depends on MCUBOOT_SERIAL
70 help
71 The input pin logic value which triggers the boot serial recovery mode.