diff --git a/platforms/nuttx/src/bootloader/stm/stm32_common/main.c b/platforms/nuttx/src/bootloader/stm/stm32_common/main.c index b6bc2f4214f..42e0bf25e97 100644 --- a/platforms/nuttx/src/bootloader/stm/stm32_common/main.c +++ b/platforms/nuttx/src/bootloader/stm/stm32_common/main.c @@ -658,7 +658,8 @@ arch_do_jump(const uint32_t *app_base) for (;;) ; } -#if defined(CONFIG_ARCH_CHIP_STM32H7) +/* A bootloader that checks signatures leaves this out, because the ROM's DFU bootloader writes any image. */ +#if defined(CONFIG_ARCH_CHIP_STM32H7) && !defined(BOOTLOADER_USE_SECURITY) /* NuttX's __start calls this before any clock setup, so the chip is still as reset left it, which is how the ROM's * DFU bootloader expects to find it. The app asks for it with reboot -i. */