Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ports/raspberrypi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,20 @@ CFLAGS += \
-DCFG_TUD_CDC_RX_BUFSIZE=256 \
-DCFG_TUD_MIDI_TX_BUFSIZE=128 \
-DCFG_TUD_CDC_TX_BUFSIZE=256 \
-DCFG_TUD_MSC_BUFSIZE=1024 \
-DPICO_RP2040_USB_DEVICE_UFRAME_FIX=1 \
-DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 \

# CFG_TUD_MSC_BUFSIZE: 1024 bytes is enough for internal flash MSC but
# causes macOS bulk-IN endpoint stalls on RP2040 during multi-sector
# SD card READ(10) probes. Bump to 16 KB only for RP2040 boards that
# actually expose an SD card over MSC. Other chips and non-SD boards
# stay at the small default. Root cause tracked at hathach/tinyusb.
ifeq ($(CHIP_VARIANT)_$(CIRCUITPY_SDCARDIO),RP2040_1)
CFLAGS += -DCFG_TUD_MSC_BUFSIZE=16384
else
CFLAGS += -DCFG_TUD_MSC_BUFSIZE=1024
endif

# option to override default optimization level, set in boards/$(BOARD)/mpconfigboard.mk
CFLAGS += $(OPTIMIZATION_FLAGS)

Expand Down
Loading