Rtems_fsmount dosfs hanging

Andre Marques andre.lousa.marques at gmail.com
Mon May 5 09:52:59 UTC 2014


Hello,

Following the problem in

http://www.rtems.org/pipermail/rtems-devel/2014-April/006585.html

I am now trying to mount the SD card partitions on RTEMS.

Summarizing the process:

1. rtems_io_register_driver (by calling my driver with 
CONFIGURE_APPLICATION_EXTRA_DRIVERS on hello sample)

2. rtems_filesystem_make_dev_t (to get the device file)

3.  rtems_disk_io_initialize

4. rtems_disk_create_phys (to create the disk, at /dev/sdc0)

5. rtems_bdpart_register_from_disk (to read and register the partitions)

6. rtems_fsmount (to mount the partitions)

For rtems_fsmount I am providing the following fs_table:

rtems_fstab_entry fs_table [] = {
    {
      .source = "/dev/sdc0",
      .target = "/mnt/p1",
      .type = "dosfs",
      .options = RTEMS_FILESYSTEM_READ_WRITE,
      .report_reasons =  RTEMS_FSTAB_ANY,
      .abort_reasons = RTEMS_FSTAB_OK
    },{
      .source = "/dev/sdc01",
      .target = "/mnt/p2",
      .type = "dosfs",
      .options = RTEMS_FILESYSTEM_READ_WRITE,
      .report_reasons = RTEMS_FSTAB_ANY,
      .abort_reasons = RTEMS_FSTAB_NONE
    }
  };

The SD card has only one partition starting at block number 8192.

After I call rtems_fsmount it calls my driver to read block 8192 and 
8193 and then hangs.

I have tested the driver and It seems to have no problem reading single 
or multiple blocks.

Any tips?

Also I am using the following confdefs configuration (some values are 
exaggerated):

#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK

#define CONFIGURE_FILESYSTEM_DOSFS
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM

#define CONFIGURE_APPLICATION_EXTRA_DRIVERS SD_CARD_DRIVER_TABLE_ENTRY

#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20

#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_MAXIMUM_DRIVERS 10

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

  #define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)

#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION

#define CONFIGURE_INIT

--André Marques




More information about the devel mailing list