Skip to content

Match Marlin's CardReader::mount() signature - #99

Open
ellensp wants to merge 1 commit into
luc-github:3.0.beta1from
ellensp:fix-marlin-mount-signature
Open

ellensp wants to merge 1 commit into
luc-github:3.0.beta1from
ellensp:fix-marlin-mount-signature

Conversation

@ellensp

@ellensp ellensp commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Description

src/include/Marlin/cardreader.h declares Marlin's CardReader for ESP3DLib's shared SD support, including:

static void mount();

In Marlin bugfix-2.1.x, CardReader::mount() now takes an argument (MarlinFirmware/Marlin#28656):

static void mount(const bool alert=true);

The two declarations mangle to different symbols, so a Marlin build with ESP3D_WIFISUPPORT and SDSUPPORT fails to link:

undefined reference to `CardReader::mount()'

This PR declares mount() the way Marlin does now. ESP3DLib's calls (card.mount() in esp_sd.cpp) are unchanged and use the default argument.

The declaration now matches Marlin bugfix-2.1.x after #28656. Marlin versions from before #28656 have only mount() without an argument.

Testing

MKS TinyBee, Marlin bugfix-2.1.x with arduino-esp32 3.0.4 (pioarduino 51.03.04), ESP3D_WIFISUPPORT, SDSUPPORT, WEBSUPPORT:

  • Before: the link fails with the error above.
  • After: it builds and links. ESP3D SD commands ([ESP740], [ESP750]) and the web SD file list release the card from Marlin and mount it again afterwards (Marlin reports SD card released / SD card ok), and Marlin can still list and print from the card.

Marlin's CardReader::mount() now takes a bool alert argument
(MarlinFirmware/Marlin#28656), so the declaration in the local copy of
cardreader.h no longer matches and linking fails with an undefined
reference to CardReader::mount(). Declare it as Marlin does.
@luc-github

Copy link
Copy Markdown
Owner

@ellensp Thank you for the PR - may I know which Marlin are you refering to ?
Currently only my fork (outdated , sorry) support ESP3DLib V3.0.
Current Marlin upstream still lack of several updates for ESP3D V3 SDCard Sharing as well as others points related to core pioarduino 51.03.04 update (Watchdog, adc, etc...) so what is the Marlin reference for using ESP3D V3 with this PR?

@ellensp

ellensp commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

It's current Marlin bugfix-2.1.x. CardReader::mount() there takes a bool alert since MarlinFirmware/Marlin#28656, so ESP3DLib 3.0 needs this change to link against it.

I'm working on pioarduino 51.03.04 (arduino-esp32 3.0.4) support for upstream Marlin, using ESP3DLib 3.0. It's a work in progress and not published yet.

@luc-github

Copy link
Copy Markdown
Owner

Ok thank you for the clarification. So I hold the PR for the moment for consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants