[Announcement] SDFileSystem available soon on Pokitto

did you add/import the library?

From where, there are 20 on mbedā€¦?

as linked at the very start of this post
https://os.mbed.com/users/mbed_official/code/SDFileSystem/

Then I get

Error: Identifier "_VOLUMES" is undefined in "SDFileSystem/FATFileSystem/FATFileSystem.h", Line: 41, Col: 34

Please explain in detail your starting point and what youā€™re currently trying to do, so I can retrace your steps

define _VOLUMES 1 i think it was i think thats referring to the amount sd cards

Just trying to get my solitaire game into mbed online.Pokittaire.zip (15.1 KB)
because I updated pokittolib offline and not my gfx dont work.

I appear to be stuck importing sdFileSystem. I followed the above like, imported it into my poroject and tried to compile.

why do you need it?

Iā€™m using a save file

Use eeprom instead. I have moved the core-dependent eeprom settings to a safe area. There is no more danger of conflict.

Eeprom is super easy to use

I donā€™t like the idea of using eeprom, simply because anyone can accidentally overwrite your data. Also I donā€™t like that everyone coding for the system will have to take into account that someone elseā€™s data might be in the spot they want to load/save.

We will fix this with some sort of a token system, donā€™t worry

Meanwhile you can simply put a solitaire.sav file on the SD card and use the PetitFATFS commands to read and write in it

How do I get SDFileSystem working in embitz? Iā€™m getting

C:\Users\Spinal\Documents\GitHub\PokittoLib\Examples\Mode13\mode13.cpp|6|undefined reference to `SDFileSystem::SDFileSystem(PinName, PinName, PinName, PinName, char const*, PinName, SDFileSystem::SwitchType, int)'|
C:\Users\Spinal\Documents\GitHub\PokittoLib\Pokitto\POKITTO_LIBS\SDFileSystem\SDFileSystem.h|70|undefined reference to `FATFileSystem::~FATFileSystem()'|
C:\Users\Spinal\Documents\GitHub\PokittoLib\Pokitto\POKITTO_LIBS\SDFileSystem\SDFileSystem.h|70|undefined reference to `vtable for SDFileSystem'|

You have to add SDFS sources to your project. Look at the SD test program in Embitz.

Pokitto\POKITTO_LIBS\SDFileSystem\SDFileSystem.cpp|338|error: 'STA_PROTECT' was not declared in this scope|
Pokitto\POKITTO_LIBS\SDFileSystem\SDFileSystem.cpp|339|error: 'RES_WRPRT' was not declared in this scope|

Is this the test program? Can you compile it?

@spinal & @Hanski

I had the exact same problem a while back, see this thread:

Where do I find this test program?

I canā€™t understand whats wrong, I had it working for pokittaire (game loading and saving) bu now it doesnā€™t work for that either.

[edit] - Update,

I updated pokittolib, the sd example builds and works. I really need to update more :slight_smile:

There is a ā€œSDCardIOā€ target in Embitz (Pokittolib\Examples\SDCardIO). I just tested with the latest Pokittolib that is compiles ok.

You may have to do ā€œAdd files recursivelyā€¦ā€ again for your project as there are some renamed files under PokittoLib\Pokitto\POKITTO_LIBS\SDFileSystem\