diff --git a/boards/arm/rp23xx/common/src/rp23xx_spisd.c b/boards/arm/rp23xx/common/src/rp23xx_spisd.c index 211ce5e2243..7706eb50399 100644 --- a/boards/arm/rp23xx/common/src/rp23xx_spisd.c +++ b/boards/arm/rp23xx/common/src/rp23xx_spisd.c @@ -24,6 +24,8 @@ #include +#include + #include #include #include @@ -99,9 +101,17 @@ int board_spisd_initialize(int minor, int bus) /* Mount filesystem */ ret = nx_mount("/dev/mmcsd0", "/mnt/sd0", "vfat", 0, NULL); - if (ret < 0) + if (ret == -EINVAL || ret == -ENODEV) { - _err("ERROR: Failed to mount the SDCARD. %d\n", ret); + /* No card, or no filesystem on it. Not an error: the block device + * is registered and the card can be formatted with mkfatfs. + */ + + finfo("No filesystem on /dev/mmcsd0 (no card, or unformatted)\n"); + } + else if (ret < 0) + { + ferr("ERROR: Failed to mount the SDCARD. %d\n", ret); } return OK;