Reading a file from an sd card using RLP

Hello

I need some help as to how to go about reading data from an sd card using rlp as i am processing my information through rlp and reading data through c# will not work and will be slow compared to native coding.

Thanks
Any help would be appreciated

The only way would be by building your own FAT and SD drivers in RLP. There is no “file system” extensions in RLP, at least not nor now.

WE have been using FatFs - Generic FAT Filesystem Module with a freescale S12 and reading the cards on Windows. So if you are really wanting to implement one in RLP. This may be the boot strap you are looking for. The low-level I/O is implemented separate from the file system implementation so you should be able to build the FS with no changes( yea like that will ever happen :-).
Also here is an example using the STM32 http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/arm_memcards/index.html#chanfat_stm32.

I have a working FATFS RLP implementation for EMX module. What module are you using?

Thanks for the help.

I am using a FEZ hydra to build a portable video player. I have an lcd and configured it by using the lcdcontroller.configuration method in c# and thereafter updating the lcd base address in rlp with the pixel format in order to update the lcd.

The only problem i am having is video decoding,whichever video format it may be. Reading from the sd card through c# will not be fast enough and it will be easier to pass data from the sd card to the decoder algorithm using rlp . Therefore by using native code to implement the sd card the system will be faster as i need to read and decode data at a relatively fast rate. Any ideas with to help me would me much appreciated.

Using the libmpeg2 video codec isnt easy as well.

Please provide me with any help as i am relatively new to video decoding as well as implementing file systems.

Thanks

I have ordered a Hydra one week ago. Once I receive it I’ll be able to check things out.

In the meanwhile you can search for the open source FATFS library.

Btw, why are you using NETMF anyway? Seems like your project doesn’t benefit from it. Get a jtag programmer and write directly in C++ is also an option on the hydra (that’s one of the reasons I’ve ordered the board)

Im using netmf for the interface and the module usage and im more familiar with c# rather than c.
Can you please email me your fatfs code if you dont mind. I will try and use the idea and incorporate it in my design.
(208512294@ stu.ukzn.ac.za)

One more question
Have you used libmpeg2 before?

Thud . Do you think it would work with RLP-Lite on Cerb? I’d love to take a look at the code to see if I could make it work on Cerb.

I will not share the code because it took me a LOT of time to get it working. But if you google FATFS, on the projects site you’ll find example implementations for STM32 and LPC23xx. If you had EMX, I could give you a compiled objectfile for you to use.

The fat library itself will work in rlp lite but interfacing the SD card might be difficult because you need to handle DMA, timer and SD card interrupts.

Its ok, i understand . Thanks
Another question…

Is it possible to open a file stream in RLP after you have mounted the sd card in c#?? Ive sorted displaying the frames from a video file although i am reading the data from the sd card through c# and i have timed it and its taking abit long to actually read the bytes from the file.