Visitar URL original
boards/arm/rp23xx: Do not log an absent SD card as an error by casaroli · Pull Request #20486 · apache/nuttx · GitHub
Skip to content

boards/arm/rp23xx: Do not log an absent SD card as an error - #20486

Merged
acassis merged 1 commit into
apache:masterfrom
casaroli:rp23xx-spisd-absent-card
Oct 8, 2026
Merged

acassis merged 1 commit into
apache:masterfrom
casaroli:rp23xx-spisd-absent-card

Conversation

@casaroli

@casaroli casaroli commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

board_spisd_initialize() logged ERROR: Failed to mount the SDCARD at every boot when there was no card in the slot. A missing card, or a card with no filesystem, is not an error: the block device is registered, and the card can be formatted with mkfatfs and mounted later.

This PR logs -EINVAL and -ENODEV from nx_mount() with finfo(). Other errors are still logged with ferr(), as the rest of the file does. It also includes errno.h, which the file used without including it.

Impact

Log output of rp23xx boards with CONFIG_RP23XX_SPISD. No functional change.

Testing

Arm GNU Toolchain 13.2.rel1 (the CI version). tools/checkpatch.sh -c -u -m -g passes.

On a Pimoroni Pico Plus 2 W with no card, pimoroni-pico-plus-2-w:nsh with SPI0 on GPIO 2-5, CONFIG_RP23XX_SPISD and CONFIG_DEBUG_FS_ERROR/CONFIG_DEBUG_FS_INFO. The boot log before this PR:

board_spisd_initialize: ERROR: Failed to mount the SDCARD. -19

and after it:

board_spisd_initialize: No filesystem on /dev/mmcsd0 (no card, or unformatted)

@github-actions github-actions Bot added Size: S The size of the change in this PR is small Board: arm labels Oct 7, 2026
xiaoxiang781216
xiaoxiang781216 previously approved these changes Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

board_spisd_initialize() logged "ERROR: Failed to mount the SDCARD" at
every boot when the mount failed.  The two usual causes are no card in
the slot and a card with no filesystem.  Neither is an error: the block
device is registered, and the card can be formatted with mkfatfs and
mounted later.

Log -EINVAL and -ENODEV from nx_mount() with finfo().  Other errors
are still logged with ferr(), as the rest of the file does.

Also include errno.h, which the file used without including it.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
@acassis
acassis merged commit 3ec7a93 into apache:master Oct 8, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Board: arm Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants