<br><font size=2 face="sans-serif">Hi Thomas,</font>
<br>
<br><font size=2 face="sans-serif">I managed to configure the RAMDISK,
and also accessing it but i got couple of questions.</font>
<br>
<br><font size=2 face="sans-serif">        -
I didn't use the msdos_initialize function at all and I don't know what
this function does exactly and why it is needed.</font>
<br><font size=2 face="sans-serif">        -
I had also to initialize the rtems_bdbuf_configuration structure and the
rtems_bdbuf_configuration_size variable, but i don't know what is this
structure/variable is for.</font>
<br><font size=2 face="sans-serif">        -
I can access to the RAMDISK by means of fopen("/dev/ramdisk0")
for instance. But this allows me to write/read in the RAMDISK area using
the file API. But apparently does not allow me to create files in the RAMDISK
area (which is my intention). Lets say, I want to allocate a RAMDISK area,
mount it, and then access it like a filesystem.</font>
<br>
<br><font size=2 face="sans-serif">Here is my configuration file:</font>
<br>
<br><font size=2 face="sans-serif">#ifndef RTEMSCONFIG_H_</font>
<br><font size=2 face="sans-serif">#define RTEMSCONFIG_H_</font>
<br>
<br><font size=2 face="sans-serif">/* configuration information */</font>
<br>
<br><font size=2 face="sans-serif">rtems_task Init( rtems_task_argument
argument);</font>
<br>
<br><font size=2 face="sans-serif">#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER</font>
<br>
<br><font size=2 face="sans-serif">#define CONFIGURE_RTEMS_INIT_TASKS_TABLE</font>
<br>
<br><font size=2 face="sans-serif">#define CONFIGURE_MAXIMUM_TASKS 10</font>
<br><font size=2 face="sans-serif">#define CONFIGURE_MAXIMUM_SEMAPHORES
10</font>
<br><font size=2 face="sans-serif">#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
4</font>
<br>
<br><font size=2 face="sans-serif">rtems_bdbuf_config rtems_bdbuf_configuration[]
= {</font>
<br><font size=2 face="sans-serif">  { 512, 20, (void *) 0 }</font>
<br><font size=2 face="sans-serif">};</font>
<br><font size=2 face="sans-serif">int rtems_bdbuf_configuration_size =
1;</font>
<br>
<br><font size=2 face="sans-serif">rtems_ramdisk_config rtems_ramdisk_configuration[]
= {</font>
<br><font size=2 face="sans-serif">  {</font>
<br><font size=2 face="sans-serif">     512, 20, (void *)
0</font>
<br><font size=2 face="sans-serif">  }</font>
<br><font size=2 face="sans-serif">};</font>
<br>
<br><font size=2 face="sans-serif">int rtems_ramdisk_configuration_size
= 1;</font>
<br>
<br><font size=2 face="sans-serif">#define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE</font>
<br><font size=2 face="sans-serif">rtems_driver_address_table Device_drivers[]
= {</font>
<br><font size=2 face="sans-serif">  CONSOLE_DRIVER_TABLE_ENTRY,</font>
<br><font size=2 face="sans-serif">  CLOCK_DRIVER_TABLE_ENTRY,</font>
<br><font size=2 face="sans-serif">  RAMDISK_DRIVER_TABLE_ENTRY</font>
<br><font size=2 face="sans-serif">};</font>
<br><font size=2 face="sans-serif">#define CONFIGURE_NUMBER_OF_DRIVERS
\</font>
<br><font size=2 face="sans-serif">  ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))</font>
<br><font size=2 face="sans-serif">#define CONFIGURE_MAXIMUM_DRIVERS 10</font>
<br>
<br><font size=2 face="sans-serif">#define CONFIGURE_INIT</font>
<br>
<br><font size=2 face="sans-serif">#include <confdefs.h></font>
<br>
<br><font size=2 face="sans-serif">#endif /*RTEMSCONFIG_H_*/</font>
<br>
<br>
<br><font size=2 face="sans-serif">Cheers,</font>
<br>
<br><font size=2 face="sans-serif">Aitor</font>
<br>
<br><font size=2 face="sans-serif"><br>
-----------------------------<br>
Aitor Viana Sánchez<br>
<br>
ESA - European Space Technology Centre (ESTEC)<br>
TEC-EDD - Computer and Data Systems Section<br>
ESA/ESTEC P.O. Box 299 / 2200AG Noordwijk ZH, The Netherlands<br>
Tel (+31) 71 565 6727<br>
Email: aitor.viana.sanchez@esa.int</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Thomas Doerfler <Thomas.Doerfler@embedded-brains.de></b>
</font>
<p><font size=1 face="sans-serif">11/13/2007 05:47 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Aitor.Viana.Sanchez@esa.int</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">rtems-users@rtems.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: External RAM filesystem</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br><tt><font size=2>Hi,<br>
</font></tt>
<br><tt><font size=2>yes, it should be possible. There still exists a ram
disk driver, which<br>
performs this function, see:<br>
</font></tt>
<br><tt><font size=2>cpukit/libblock/src/ramdisk.c<br>
</font></tt>
<br><tt><font size=2>We used it for our very first tests of the FATFS.
If I recall correctly,<br>
these are the steps to work with it:<br>
</font></tt>
<br><tt><font size=2>- define a rtems_ramdisk_config data structure (e.g.
in the init module)<br>
with the fixed name "rtems_ramdisk_configuration".<br>
</font></tt>
<br><tt><font size=2>- you can/must define the block size, the number of
blocks and location<br>
in this structure<br>
</font></tt>
<br><tt><font size=2>- If you add the RAMDISK_DRIVER_TABLE_ENTRY to your
device driver table,<br>
it will initialize automatically when your system comes up<br>
</font></tt>
<br><tt><font size=2>- Or, you can initialize the ramdisk with "ramdisk_initialize".<br>
</font></tt>
<br><tt><font size=2>- Next, you must format the ramdisk (use msdos_format
function in<br>
cpukit/libfs/src/dosfs/msdos_format.c).<br>
</font></tt>
<br><tt><font size=2>- Then you can mount the ramdisk as a (unpartitioned)
volume with<br>
msdos_initialze().<br>
</font></tt>
<br><tt><font size=2>I hope I am rather acurate on these steps.<br>
</font></tt>
<br><tt><font size=2>It would be nice if you could give us feedback, when
things work.<br>
</font></tt>
<br><tt><font size=2>And it would be even nicer, if you could write a wiki
entry on this<br>
under www.rtems.com/wiki<br>
</font></tt>
<br><tt><font size=2>wkr,<br>
Thomas.<br>
</font></tt>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Aitor.Viana.Sanchez@esa.int schrieb:<br>
><br>
> Hi all,<br>
><br>
><br>
> is it possible to configure RTEMS somehow to access and external RAM<br>
> memory address where a FAT32 (for instance) file system is placed?
Is it<br>
> possible to configure the address and size?<br>
><br>
> Thanks in advance.<br>
><br>
><br>
> Aitor<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> rtems-users mailing list<br>
> rtems-users@rtems.com<br>
> http://rtems.rtems.org/mailman/listinfo/rtems-users<br>
</font></tt>
<br>
<br><tt><font size=2>--<br>
--------------------------------------------<br>
embedded brains GmbH<br>
Thomas Doerfler           Obere Lagerstr. 30<br>
D-82178 Puchheim          Germany<br>
Tel. : +49-89-18 90 80 79-2<br>
Fax  : +49-89-18 90 80 79-9<br>
email: Thomas.Doerfler@embedded-brains.de<br>
PGP public key available on request<br>
</font></tt>
<br><tt><font size=2>Diese Nachricht ist keine geschäftliche Mitteilung
im Sinne des EHUG.</font></tt>
<br>