Compilation failed due to undefined SD pins

Hello,

I am compiling Marlin for an SKR 3 EZ
I started from Marlin 2.1.1 as a base
I integrated modifications found in Configuration.h and Configuration_adv.h of the official V1 firmware for skr pro into my configs.

One of these changes makes the compilation fail with the error message below. It is the activation of the onboard SD slot
#define SDSUPPORT (in Configuration.h)

Did any of you had this error already and was able to resolve it?
In the meantime, I commented back this line, defined the SDCARD_CONNECTION as LCD in adv, and compilation succeeds.
That’s just a workaround, as obviously I would like to have the option to use that slot (I am sure yet what LCD I will use, I have several lying around).

Compiling .pio\build\STM32H743Vx_btt\src\src\feature\host_actions.cpp.o
Marlin\src\HAL\STM32\sdio.cpp: In function ‘void HAL_SD_MspInit(SD_HandleTypeDef*)’:
Marlin\src\HAL\STM32\sdio.cpp:91:26: error: ‘PinMap_SD’ was not declared in this scope; did you mean ‘PinMap_USB’?
91 | pinmap_pinout(PC_12, PinMap_SD);
| ^~~~~~~~~
| PinMap_USB
*** [.pio\build\STM32H743Vx_btt\src\src\HAL\STM32\sdio.cpp.o] Error 1

that board is not Officially supported,
with that said: you need to look for the SKR pro version (skrpro 1.2) pinout and the pinout for that especific board you are using and make the necesary changes in orther to make the board compatible

UPDATE:
This is a Marlin bug with that card.
I restarted from a vanilla 2.1.1, compiled successfully for SKR3 EZ, then just activated the SD support, and got the same error.
I saw in the release notes of 2.1.2 that they have a fix for bugs in sdio.cpp, maybe that’s fixed there, I’ll check

RESOLVED (kind of)
Did the same with 2.1.2.5 (latest stable release to date)
No compilation error when I activate SD support for that card.

I wish I could work on 2.1.1 to be closest possible to the V1 firmware for comparison, but I will have to take 2.1.2.5 as a baseline instead, as it has better support for my card.

Just saw you already opened a thread a couple of days ago for some issues with that board.