From 3b1a778f1737c6424705f3f2fae0714c287ed1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Tue, 21 Oct 2025 10:21:47 +0200 Subject: [PATCH 1/2] zephyr: remove NRFX_WDT instance symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed from Zephyr. Signed-off-by: Michał Stasiak --- boot/zephyr/Kconfig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig index 712418a4b..d12b36ccc 100644 --- a/boot/zephyr/Kconfig +++ b/boot/zephyr/Kconfig @@ -1088,11 +1088,6 @@ config BOOT_WATCHDOG_FEED_NRFX_WDT depends on SOC_FAMILY_NORDIC_NRF # for nRF nrfx based implementation is available imply NRFX_WDT - imply NRFX_WDT0 - imply NRFX_WDT1 - imply NRFX_WDT30 - imply NRFX_WDT31 - imply NRFX_WDT010 config BOOT_IMAGE_ACCESS_HOOKS bool "Enable hooks for overriding MCUboot's native routines" From 3a32ca0ee25f5ca453b5b429ee0912704b95a041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Tue, 21 Oct 2025 10:22:21 +0200 Subject: [PATCH 2/2] zephyr: mcuboot_config: align nrfx_wdt usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instance config symbols are no longer present, replaced with presence for peripheral intself. No need to create instance of driver when using nrf api directly. Signed-off-by: Michał Stasiak --- .../include/mcuboot_config/mcuboot_config.h | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/boot/zephyr/include/mcuboot_config/mcuboot_config.h b/boot/zephyr/include/mcuboot_config/mcuboot_config.h index d4be9d412..5750fb9ea 100644 --- a/boot/zephyr/include/mcuboot_config/mcuboot_config.h +++ b/boot/zephyr/include/mcuboot_config/mcuboot_config.h @@ -442,39 +442,38 @@ #if CONFIG_BOOT_WATCHDOG_FEED_NRFX_WDT #include -#define FEED_WDT_INST(id) \ +#define FEED_WDT_INST(inst) \ do { \ - nrfx_wdt_t wdt_inst_##id = NRFX_WDT_INSTANCE(id); \ for (uint8_t i = 0; i < NRF_WDT_CHANNEL_NUMBER; i++) \ { \ - nrf_wdt_reload_request_set(wdt_inst_##id.p_reg, \ + nrf_wdt_reload_request_set(inst, \ (nrf_wdt_rr_register_t)(NRF_WDT_RR0 + i)); \ } \ } while (0) -#if defined(CONFIG_NRFX_WDT0) && defined(CONFIG_NRFX_WDT1) -#define MCUBOOT_WATCHDOG_FEED() \ - do { \ - FEED_WDT_INST(0); \ - FEED_WDT_INST(1); \ +#if defined(NRF_WDT0) && defined(NRF_WDT1) +#define MCUBOOT_WATCHDOG_FEED() \ + do { \ + FEED_WDT_INST(NRF_WDT0); \ + FEED_WDT_INST(NRF_WDT1); \ } while (0) -#elif defined(CONFIG_NRFX_WDT0) -#define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(0); -#elif defined(CONFIG_NRFX_WDT30) && defined(CONFIG_NRFX_WDT31) +#elif defined(NRF_WDT0) #define MCUBOOT_WATCHDOG_FEED() \ - do { \ - FEED_WDT_INST(30); \ - FEED_WDT_INST(31); \ + FEED_WDT_INST(NRF_WDT0); +#elif defined(NRF_WDT30) && defined(NRF_WDT31) +#define MCUBOOT_WATCHDOG_FEED() \ + do { \ + FEED_WDT_INST(NRF_WDT30); \ + FEED_WDT_INST(NRF_WDT31); \ } while (0) -#elif defined(CONFIG_NRFX_WDT30) +#elif defined(NRF_WDT30) #define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(30); -#elif defined(CONFIG_NRFX_WDT31) + FEED_WDT_INST(NRF_WDT30); +#elif defined(NRF_WDT31) #define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(31); -#elif defined(CONFIG_NRFX_WDT010) + FEED_WDT_INST(NRF_WDT31); +#elif defined(NRF_WDT010) #define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(010); + FEED_WDT_INST(NRF_WDT010); #else #error "No NRFX WDT instances enabled" #endif