blob: b86d6f90f4637e8cc78bb46849e175cc7aba9fb2 [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
Marti Bolivar0e091c92018-04-12 11:23:16 -04006mainmenu "MCUboot configuration"
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +02007
Marti Bolivar0e091c92018-04-12 11:23:16 -04008comment "MCUboot-specific configuration options"
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +02009
Marti Bolivar0e091c92018-04-12 11:23:16 -040010config BOOT_MAX_IMG_SECTORS
11 int "Maximum number of sectors per image slot"
12 default 128
13 help
14 This option controls the maximum number of sectors that each of
15 the two image areas can contain. Smaller values reduce MCUboot's
16 memory usage; larger values allow it to support larger images.
17 If unsure, leave at the default value.
18
19menuconfig MCUBOOT_SERIAL
20 bool "MCUboot serial recovery"
21 default n
22 select REBOOT
23 select UART_INTERRUPT_DRIVEN
24 select SERIAL
25 select BASE64
26 select TINYCBOR
27 help
28 If y, enables a serial-port based update mode. This allows
29 MCUboot itself to load update images into flash over a UART.
30 If unsure, leave at the default value.
31
32if MCUBOOT_SERIAL
33
34config BOOT_MAX_LINE_INPUT_LEN
35 int "Maximum command line length"
36 default 512
37 help
38 Maximum length of commands transported over the serial port.
39
40config BOOT_SERIAL_DETECT_PORT
41 string "GPIO device to trigger serial recovery mode"
42 default GPIO_0 if SOC_FAMILY_NRF
43 help
44 Zephyr GPIO device which contains the pin used to trigger
45 serial recovery mode.
46
47config BOOT_SERIAL_DETECT_PIN
48 int "Pin to trigger serial recovery mode"
49 default 11 if BOARD_NRF52840_PCA10056
50 default 13 if BOARD_NRF52_PCA10040
51 help
52 Pin on the serial detect port which triggers serial recovery mode.
53
54config BOOT_SERIAL_DETECT_PIN_VAL
55 int "Serial detect pin trigger value"
56 default 0
57 range 0 1
58 help
59 Logic value of the detect pin which triggers serial recovery
60 mode.
61
62endif # MCUBOOT_SERIAL
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020063
Carles Cufi84ede582018-01-29 15:12:00 +010064config MCUBOOT_DEVICE_SETTINGS
65 # Hidden selector for device-specific settings
66 bool
67 default y
68 # CPU options
69 select MCUBOOT_DEVICE_CPU_CORTEX_M0 if CPU_CORTEX_M0
Carles Cufi67c792e2018-01-29 15:14:31 +010070 # Enable flash page layout if available
71 select FLASH_PAGE_LAYOUT if FLASH_HAS_PAGE_LAYOUT
Carles Cufi84ede582018-01-29 15:12:00 +010072
73config MCUBOOT_DEVICE_CPU_CORTEX_M0
74 # Hidden selector for Cortex-M0 settings
75 bool
76 default n
77 select SW_VECTOR_RELAY if !CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP
78
Marti Bolivar0e091c92018-04-12 11:23:16 -040079comment "Zephyr configuration options"
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020080
Marti Bolivar0e091c92018-04-12 11:23:16 -040081config ZEPHYR_BASE
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020082 string
Marti Bolivar0e091c92018-04-12 11:23:16 -040083 option env="ZEPHYR_BASE"
Andrzej Puzdrowski64ad0922017-09-22 11:33:41 +020084
Marti Bolivar0e091c92018-04-12 11:23:16 -040085source "$ZEPHYR_BASE/Kconfig.zephyr"