Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erbui sdmmc support #693

Merged
merged 11 commits into from
Feb 6, 2025
Merged

Erbui sdmmc support #693

merged 11 commits into from
Feb 6, 2025

Conversation

ohmtech-rdi
Copy link
Owner

@ohmtech-rdi ohmtech-rdi commented Feb 6, 2025

This PR adds SD with FatFs support to ERB.

Warning

Support of this feature is not available on Windows, and probably never will (see details below)

VCV makefile on Windows include the -municode flag to GCC compile command. This will in turn define automatically new types, such as TCHAR that is then set to wchar_t (instead of char in the ANSI/OEM version).

Unfortunately, FatFs also defines this type, and since we have #define _LFN_UNICODE 0 in ffconf.h provided in libDaisy, FatFs will try (and fail) to define the TCHAR type as char.

To solve this, we would need to isolate the source code to make sure our implementation of the FatFs wrapper is not compiled with -municode, but this is asking for troubles. Rather we don't support it on Window and will assess a potential correction some time in the future.

@ohmtech-rdi ohmtech-rdi added the feature Feature label Feb 6, 2025
@ohmtech-rdi ohmtech-rdi self-assigned this Feb 6, 2025
VCV needs -municode for build, which defines TCHAR as wchar_t while FatFs
also defines this type to char. So we have a global namespace name clash
we can't solve without changing FatFs implementation (which is available
as a dependency inside libdaisy). We therefore remove the test and
support for Windows.
@ohmtech-rdi ohmtech-rdi merged commit abca6b4 into main Feb 6, 2025
21 checks passed
@ohmtech-rdi ohmtech-rdi deleted the erbui-sdmmc-support branch February 6, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant