7
Frederick
23d

So i am doing a embedded project right now,
and the last feature i want to add, does require the use of a SD card. So of cause i cant use the built in API for the board to this, due to this model is one of the few that doesnt have the required pins (miso, mosi, sclk cs). So i have to use a library specially developed to this board i use.

So first of all the library wasnt even able to mount the SD card, so after fixing and making some changes to the library and happy me thinkingit finally works. Ohhh boy was i wrong it was only able to read files, so everytime i would use "w" for the FILE* and call fclose on it, it would delete everything on the SD cant (and of cause wouldnt write anything in the first place). It could mean some permissions shit on the SD card (which i have already tried). So now i am pretty much stuck. It would help if i acutally could find what the error code fclose returns means.

IIt has been a horrible day and i am tired and just wants to go to sleep and make this day go away.

Comments
  • 1
    Are you using the fatfs library by any chance? If so there are quite some useful things to be found on the internet. Especially about the really specific things that are not obvious at first glance...
  • 0
    @NEMESISprj Nope i did use the built FatFileSystem but the the libary were for the custom BlockDevice, since i couldnt use the built in SDBlockDevice class for the FatFileSystem libary, since the pind required wasnt used for my board.
  • 0
    Always fun if they don't use standards I guess..
    Hopefully you have it working by now though!
Add Comment