Hello!
The best way I found was to make my own implementation of SD.h / SD.c (well, .cpp in my case).
The problem is that any code you find on the net is not safe because you don't know who wrote it
and whether it's reliable. Therefore you end up digging into the code, struggling to find out what the
author tried to do, and at the end of the day you spend more time than if you do it by yourself.
Beside this, there are many possible implementations. For a small MCU with a few K of memory,
you have to reuse the same buffers for data, tables and file records. This means that you will loose
some time re-reading the same buffers. But depending on your applications, you may want to work
a little bit faster, and therefore have one buffer for file record access, one for tables, and one for data.
This is less memory efficient but a lot faster...
So my advice: although it's usually not recommended to re-invent the wheel, you may consider
writing your own implementation of SD and FAT.
Dora.