This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Freeware FAT16/32 Library?

Other Parts Discussed in Thread: TMS320F2808

Hi,

I am currently trying to write to an SD card in the FAT16 (or 32 ... I only need 16 though) format. I can't seem to find any libraries out the for the TMS320f2808. The couple I found on the third party list are not free.

Anyone know of any libraries I can use? I just want to make sure it hasn't already been done (for free) before I start writing my own.

Thanks,
Aditya

  • I've used dosFS before (http://www.larwe.com/zws/products/dosfs/index.html) for an Atmel AVR project. The code is pretty generalized so you'll just need to provide a function for a sector write/read. TI provides an SD card library that can read the sectors so you just need to put the two pieces of code together.

    In fact I plan on doing that myself this week.

    Josh

  • I am currently modifying the Microchip library. The problem that arises with these libraries is that they use 8-bit data types. The TMS320 however, has no such thing. So when you have a struct that relies on 8-bit offsets for the structs to map correctly to the disk buffers, you have problems...

    I have gotten around this by filtering assignments to structs using some macros of mine. The disk I format and write files to from the TMS, is currently recognized by Windows and it sees the files in the directory. The problem arrives when actually opening the file... thats when the OS freaks out and gives a corrupted message... I am thinking more offset errors.

    Even this Atmel library, it looks good (and much smaller), but I think it still requires 8-bit data types...

  • Just an update on this. I was able to get the dosFS library working by mearly doing a search and replace for uint_8_t to Uint16. It all seems to be working from what I tested so far. I can create and write to files, which is all I needed. The Microchip library has more functionality but not what I need.

    Josh

  • I have gotten the Microchip one to work, but the final file size is around 15K.. wihch is insane, I am guessing the DosFS one is much much smaller...I will give it a try.

     

    Thanks a lot,

    Aditya

  • With the dosFS library I used TI's SD library which does the initializationa and the read/write sector. After you get that working its pretty simple.

  • I have some problems running TIs SD library on F280x. Could you please send me an example project with SD-Card and a running filesystem?

  • Hi Joshua,

    I can't find Texas SD card library, could you tell me where could I download it?

    Thank you,

    Alex