diff --git a/boards/xtensa/esp32/common/src/esp32_board_spiflash.c b/boards/xtensa/esp32/common/src/esp32_board_spiflash.c index 026733b4449..67c82595be1 100644 --- a/boards/xtensa/esp32/common/src/esp32_board_spiflash.c +++ b/boards/xtensa/esp32/common/src/esp32_board_spiflash.c @@ -204,6 +204,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd, if (ret < 0) { ferr("ERROR: Failed to mount the FS volume: %d\n", ret); + if (ret == -ENODEV) + { + fwarn("Smartfs seems unformatted. " + "Did you run 'mksmartfs /dev/smart%d'?\n", smartn); + } + return ret; } } diff --git a/boards/xtensa/esp32s2/common/src/esp32s2_board_spiflash.c b/boards/xtensa/esp32s2/common/src/esp32s2_board_spiflash.c index 64131350fb1..e3dc6f172ee 100644 --- a/boards/xtensa/esp32s2/common/src/esp32s2_board_spiflash.c +++ b/boards/xtensa/esp32s2/common/src/esp32s2_board_spiflash.c @@ -115,6 +115,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd, if (ret < 0) { ferr("ERROR: Failed to mount the FS volume: %d\n", ret); + if (ret == -ENODEV) + { + fwarn("Smartfs seems unformatted. " + "Did you run 'mksmartfs /dev/smart%d'?\n", smartn); + } + return ret; } } diff --git a/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c b/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c index 56340aadc05..5a024c87b17 100644 --- a/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c +++ b/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c @@ -106,6 +106,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd, if (ret < 0) { ferr("ERROR: Failed to mount the FS volume: %d\n", ret); + if (ret == -ENODEV) + { + fwarn("Smartfs seems unformatted. " + "Did you run 'mksmartfs /dev/smart%d'?\n", smartn); + } + return ret; } }