@@ -463,20 +463,25 @@ int main(void)
463463 mcuboot_status_change (MCUBOOT_STATUS_STARTUP );
464464
465465#ifdef CONFIG_BOOT_SERIAL_ENTRANCE_GPIO
466+ BOOT_LOG_DBG ("Checking GPIO for serial recovery" );
466467 if (io_detect_pin () &&
467468 !io_boot_skip_serial_recovery ()) {
468469 boot_serial_enter ();
469470 }
470471#endif
471472
472473#ifdef CONFIG_BOOT_SERIAL_PIN_RESET
474+ BOOT_LOG_DBG ("Checking RESET pin for serial recovery" );
473475 if (io_detect_pin_reset ()) {
474476 boot_serial_enter ();
475477 }
476478#endif
477479
478480#if defined(CONFIG_BOOT_USB_DFU_GPIO )
481+ BOOT_LOG_DBG ("Checking GPIO for USB DFU request" );
479482 if (io_detect_pin ()) {
483+ BOOT_LOG_DBG ("Entering USB DFU" );
484+
480485 usb_dfu_requested = true;
481486
482487#ifdef CONFIG_MCUBOOT_INDICATION_LED
@@ -498,6 +503,7 @@ int main(void)
498503 BOOT_LOG_INF ("Waiting for USB DFU" );
499504
500505#if defined(CONFIG_BOOT_USB_DFU_WAIT )
506+ BOOT_LOG_DBG ("Waiting for USB DFU for %dms" , CONFIG_BOOT_USB_DFU_WAIT_DELAY_MS );
501507 mcuboot_status_change (MCUBOOT_STATUS_USB_DFU_WAITING );
502508 wait_for_usb_dfu (K_MSEC (CONFIG_BOOT_USB_DFU_WAIT_DELAY_MS ));
503509 BOOT_LOG_INF ("USB DFU wait time elapsed" );
@@ -529,12 +535,14 @@ int main(void)
529535 if (FIH_EQ (fih_rc , FIH_BOOT_HOOK_REGULAR )) {
530536 FIH_CALL (boot_go , fih_rc , & rsp );
531537 }
538+ BOOT_LOG_DBG ("Left boot_go with success == %d" , FIH_EQ (fih_rc , FIH_SUCCESS ) ? 1 : 0 );
532539
533540#ifdef CONFIG_BOOT_SERIAL_BOOT_MODE
534541 if (io_detect_boot_mode ()) {
535542 /* Boot mode to stay in bootloader, clear status and enter serial
536543 * recovery mode
537544 */
545+ BOOT_LOG_DBG ("Staying in serial recovery" );
538546 boot_serial_enter ();
539547 }
540548#endif
0 commit comments