After some debugging, it seems that the first wait_ready function called during initialization (sdcard.c) exits due to timeout (also increasing the limit). I am pretty sure there is something wrong with the porting of some commands, but I am not sure what.
I am working on something similar. In my case I'm on a CY8C6347BZI-BLD53, so I need to use an SPI interface. I decided to use SDFilesystem (SDFileSystem - A re-written SDFileSystem library with improved... | Mbed) as a starting point. (Also, see SDBlockDevice - APIs | Mbed OS 5 Documentation.) I am currently porting it from C++/mbed to C/FreeRTOS+FAT (FreeRTOS+FAT DOS Compatible Embedded FAT File System ).