Skip to content

Commit 419565a

Browse files
committed
improve startup error messages
1 parent b9a7773 commit 419565a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runcpm-rp2040-dvi-usb/runcpm-pico/hardware/pico/feather_dvi.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,16 @@ bool port_init_early() {
104104
_getch_hook = getch_serial1;
105105
_kbhit_hook = kbhit_serial1;
106106
// USB mass storage / filesystem setup (do BEFORE Serial init)
107-
if (!blockdevice.begin(SD_CONFIG)) { _puts("!blockdevice.begin()"); return false; }
107+
if (!blockdevice.begin(SD_CONFIG)) { _puts("Failed to initialize SD card"); return false; }
108+
#if USE_MSC
108109
// Set disk vendor id, product id and revision
109110
usb_msc.setID("Adafruit", "Internal Flash", "1.0");
110111
// Set disk size, block size is 512 regardless of blockdevice page size
111112
usb_msc.setCapacity(blockdevice.sectorCount(), 512);
112113
usb_msc.setReadWriteCallback(msc_read_cb, msc_write_cb, msc_flush_cb);
113114
usb_msc.setUnitReady(true); // MSC is ready for read/write
114115
if (!usb_msc.begin()) {
115-
_puts("!usb_msc.begin()"); return false;
116+
_puts("Failed to initialize USB MSC"); return false;
116117
}
117118
return true;
118119
}

0 commit comments

Comments
 (0)