Commit 2fa1190f authored by Marek Pieta's avatar Marek Pieta Committed by Andrzej Puzdrowski
Browse files

boot: zephyr: Add default values of boot detect pins



Change introduces default values of CONFIG_BOOT_SERIAL_DETECT_PIN
and CONFIG_BOOT_USB_DFU_DETECT_PIN. This is needed to prevent build
issues caused by uninitialized Kconfig.

Signed-off-by: default avatarMarek Pieta <Marek.Pieta@nordicsemi.no>
parent 73d69e9b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -448,6 +448,7 @@ config BOOT_USB_DFU_DETECT_PIN
	default 13 if BOARD_NRF52DK_NRF52832
	default 23 if BOARD_NRF5340_DK_NRF5340_CPUAPP || BOARD_NRF5340_DK_NRF5340_CPUAPP_NS
	default 43 if BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS
	default -1
	help
	  Pin on the DFU detect port that triggers DFU mode.

+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ config BOOT_SERIAL_DETECT_PIN
	default 13 if BOARD_NRF52DK_NRF52832 || BOARD_NRF52833DK_NRF52833
	default 23 if BOARD_NRF5340PDK_NRF5340_CPUAPP || BOARD_NRF5340PDK_NRF5340_CPUAPP_NS || \
		BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
	default -1
	help
	  Pin on the serial detect port that triggers serial recovery mode.

+6 −0
Original line number Diff line number Diff line
@@ -389,6 +389,9 @@ static const struct gpio_dt_spec button0 = GPIO_DT_SPEC_GET(BUTTON_0_NODE, gpios

#if defined(CONFIG_MCUBOOT_SERIAL)

/* The value of -1 is used by default. It must be properly specified for a board before used. */
BUILD_ASSERT(CONFIG_BOOT_SERIAL_DETECT_PIN != -1);

#define BUTTON_0_GPIO_LABEL CONFIG_BOOT_SERIAL_DETECT_PORT
#define BUTTON_0_GPIO_PIN CONFIG_BOOT_SERIAL_DETECT_PIN
#define BUTTON_0_GPIO_FLAGS ((CONFIG_BOOT_SERIAL_DETECT_PIN_VAL) ?\
@@ -397,6 +400,9 @@ static const struct gpio_dt_spec button0 = GPIO_DT_SPEC_GET(BUTTON_0_NODE, gpios

#elif defined(CONFIG_BOOT_USB_DFU_GPIO)

/* The value of -1 is used by default. It must be properly specified for a board before used. */
BUILD_ASSERT(CONFIG_BOOT_USB_DFU_DETECT_PIN != -1);

#define BUTTON_0_GPIO_LABEL CONFIG_BOOT_USB_DFU_DETECT_PORT
#define BUTTON_0_GPIO_PIN CONFIG_BOOT_USB_DFU_DETECT_PIN
#define BUTTON_0_GPIO_FLAGS ((CONFIG_BOOT_USB_DFU_DETECT_PIN_VAL) ?\