Skip to content

Commit

Permalink
hw/usb/tinyusb: Fix msc fat view with coredump on mcuboot
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzej-kaczmarek committed Dec 19, 2023
1 parent da102f1 commit ac9aff0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hw/usb/tinyusb/msc_fat_view/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ pkg.deps:
pkg.init.!BOOT_LOADER:
msc_fat_view_pkg_init: $before:tinyusb_start

pkg.init.MSC_FAT_VIEW_COREDUMP_FILES:
pkg.init.'!BOOT_LOADER && MSC_FAT_VIEW_COREDUMP_FILES':
msc_fat_view_coredump_pkg_init: $before:msc_fat_view_pkg_init
4 changes: 4 additions & 0 deletions hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,10 @@ boot_preboot(void)
os_cputime_delay_usecs(30);
if (hal_gpio_read(MYNEWT_VAL(MSC_FAT_BOOT_PIN)) == MYNEWT_VAL(MSC_FAT_BOOT_PIN_VALUE)) {
hal_gpio_deinit(MYNEWT_VAL(MSC_FAT_BOOT_PIN));
#if MYNEWT_VAL(MSC_FAT_VIEW_COREDUMP_FILES)
extern void msc_fat_view_coredump_pkg_init(void);
msc_fat_view_coredump_pkg_init();
#endif
msc_fat_view_pkg_init();
tinyusb_start();
}
Expand Down

0 comments on commit ac9aff0

Please sign in to comment.