RFS on the Flash device
Chris Johns
chrisj at rtems.org
Wed Sep 21 06:39:18 UTC 2011
On 21/09/11 4:29 PM, ali nasir wrote:
> Hi RTEMS users,
> We plan to use the RFS on the flash device which we have on board. I got hold of a sample initialization code from http://www.rtems.org/ftp/pub/rtems/people/chrisj/file-system/rfs-20100603.tar.gz
>
> I noticed that the initialization code only does the registration of the rtems_flashdisk_io_ops via the rtems_io_register_driver. It does mount or format the flash disk.
>
> Questions:
> 1. Is the rtems_fsmount() required to be done? I guess yes.
In the case of the test code it used the shell to mount. Check the
shell-init code. I did this because it was easier to edit the shell
script file than change code. I was using 3 architectures to test on.
> 2. When we run the RFS for the first time on flash device, i guess we will also have to format the same using the rtems_rfs_format() function call. Am i right? If yes, how do i prevent the format at every start up? Since format would erase all the data and we need the data in the flash device persistent.
You need to format the the disk only when it is needed. This depends on
the application you are developing, ie a command a user issues, or you
could attempt to mount it and if it fails format it then attempt to
mount it.
Chris
More information about the users
mailing list