RAMDISK in FAT format

Pavel Pisa ppisa4lists at pikron.com
Thu Dec 15 00:09:16 UTC 2005


On Thursday 15 December 2005 00:30, Joel Sherrill <joel at OARcorp.com> wrote:
> Pavel.. could you add this to the Wiki?
>
> And if you don't mind, I will try to grab your example tomorrow and move
> it to at least contrib.  It is probably more useful in the examples I
> buidl all the time but one step at a time.
>
> --joel

Hello Joel,

I would be only pleased, if the code and work can be reused
and helps others.
If you think about taking whole MMC/SD code, then wait for
a while. I have to add DMA driven read/write. I have plan to do that
before morning, but I am stuck on some dispute about Linux code port.

It would help, if you can add example to the Wiki yourself now,
I am really out of time this month and would not probably find time
for that.

Best wishes

               Pavel


> Pavel Pisa wrote:
> > On Wednesday 14 December 2005 10:59, Wilfried Busalski wrote:
> >>Hi
> >>
> >>I need a little help to use a FAT RAMDISK.
> >>
> >>Is there an example to see how it is to use?
> >>
> >>Regards
> >>W.Busalski
> >
> > Hello Wilfried,
> >
> > I have time only for glimpse answer. But I have teaching
> > MMC/SD to work with FAT last week, so some code fragments could help.
> >
> > I have found next lines in some former RTEMS post.
> > I have not author name on hand to credit him so excuse me.
> > This is slightly updated, to correct function names etc.
> >
> > Steps to mount and create file:
> >
> > 1. msdos_format("/dev/ramdisk0", NULL);
> > 2. ide_part_table_initialize("/dev/ramdisk0");
> > 3. binary fstab
> >
> >   fstab_t fs_table[] = {
> >     {
> >       "/dev/ramdisk0", "/mnt/ramdisk0",
> >       &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
> >       FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
> >       0
> >     }
> >   };
> >
> > 4. rtems_fsmount( fs_table,
> >                   sizeof(fs_table)/sizeof(fs_table[0]),
> >                   NULL);
> >
> > 5. creat("/mnt/ramdisk0/file1", S_IREAD | S_IWRITE);
> >
> > The examples with already working MMC/SD driver can be taken from my
> > homepage
> >
> > http://cmp.felk.cvut.cz/~pisa/rtems/rtems-mx1-mmcsd-051212.tar.gz
> >
> > Look at file mmcsd_rtems.c for examples.
> >
> > Best wishes
> >
> >             Pavel Pisa




More information about the users mailing list