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.

RTOS: EK-TM4C129EXL | USB Mass Storage Client - File Processing

Tool/software: TI-RTOS

Dear Support Team,

I could make the usb_dev_msc example work, thank you for your help. Now the host PC can format the device for FAT file partition and can copy to and from the device. My goal is to process the file that is copied into the launchpad. Do you have any advices how can I read the *.txt file. I have investigated the spec of FAT12 file system, but I do belive that TI has some useful resource for my task.

Thank you for your help!

  • Hello Daniel,

    FAT12? For a .txt file on a USB drive? Never heard of that. Maybe you meant FAT32?

    Also I am not sure I am fully understanding how that relates to reading the file. Once you have navigated the FAT32 file system and downloaded your .txt file, then isn't reading it only related to decoding what is in the MCU memory already? FAT is all about file systems and file tables, if you already found and downloaded your file you are done with the FAT portion.

    At that point, I would think you need to deal with encoding of the file which would depending on the system you are in.
  • Hello,

    Thank you for your reply. The DK example is modified where a statically allocated array is used as storage. The size of this array is about 0×10000 thats why FAT12 is used when I format it under Windows. So all the FAT file system is created in the array that i mentioned above.

    My problem is, how can I find the file position in the file system? When I got it, I am going to process and delete it taking care of the Fat consistency.

  • Hello Daniel,

    FAT12 doesn't make sense to me to use, and I am not aware of any TI resources for that. That's a real old standard. I would use something newer like FAT32.

    TivaWare comes with third party resources for FAT32, so that would offer a good starting point if you are needing resources to make the file system work.

    For example our usb_host_msc example uses that FAT32 third party library, would be a good place to look to start.

    I think that would be the best path forward you with your application.
  • Thank you for your help! I will check this example.