Skip to content

SD over USB MSC doesn't work when SD is on an Adalogger FeatherWing or microSD breakout #10969

@mikeysklar

Description

@mikeysklar

The scenario

A common Adafruit setup: a Feather or Pico board that doesn't have onboard SD storage, paired with an Adalogger FeatherWing or an SPI / SDIO microSD breakout. The user mounts the SD from boot.py and expects it to show up on the host as a second USB drive next to CIRCUITPY — the way it does on dedicated onboard-SD boards after the #10963 + #10967 + #10968 PR stack.

In this configuration the SD does not show up on the host OS. This is not macOS-specific — verified on both macOS and Linux.

The new native automount path only applies to boards that declare onboard SD hardware in mpconfigboard.h with DEFAULT_SD_* pin defines. FeatherWings and breakouts aren't known at compile time, so the user has to mount them from boot.py — which puts the SDCard object on the MicroPython VM heap. get_vfs() in supervisor/shared/usb/usb_msc_flash.c intentionally returns NULL for heap-mounted SDs whenever the VM isn't running (GC windows, between scripts). The host sees the LUN as "not ready" during probe and never gets a stable size.

Reproduction (Linux receipt)

CP side works:

boot.py: mounting SD
boot.py: SDCard OK, 7500 MB
boot.py: /sd mounted

Linux side (after reset, boot.py ran):

sdd   7M   CIRCUITPY
sdf   0B

LUN 1 (/dev/sdf) is enumerated but reports 0 bytes. macOS behavior is similar — LUN 1 does not publish a usable IOMedia.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions