<div dir="ltr">You can try to use SD Card in <span lang="en"><span>opposite</span></span> direction:<br><div>0) fill SD Card with zeroes;<br>
</div>1) format partition under RTEMS with msdos_format() function;<br>2) check that PC can read/write this SD Card;<br>3) if PC fails to mount this partition - dump SD Card and check that all data is on right sectors.<br>
<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-05 22:28 GMT+04:00 Andrey Mozzhuhin <span dir="ltr"><<a href="mailto:nopscmn@gmail.com" target="_blank">nopscmn@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi, Andre<br><br></div><div></div>You can try to use SD Card in <span lang="en"><span>opposite</span></span> direction:<br>
</div><div>0) fill SD Card with zeroes;<br>
</div>1) format partition under RTEMS with msdos_format() function;<br></div>2) check that PC can read/write this SD Card;<br></div>3) if PC fails to mount this partition - dump SD Card and check that all data is on right sectors.<br>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-05 13:52 GMT+04:00 Andre Marques <span dir="ltr"><<a href="mailto:andre.lousa.marques@gmail.com" target="_blank">andre.lousa.marques@gmail.com</a>></span>:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Following the problem in<br>
<br>
<a href="http://www.rtems.org/pipermail/rtems-devel/2014-April/006585.html" target="_blank">http://www.rtems.org/<u></u>pipermail/rtems-devel/2014-<u></u>April/006585.html</a><br>
<br>
I am now trying to mount the SD card partitions on RTEMS.<br>
<br>
Summarizing the process:<br>
<br>
1. rtems_io_register_driver (by calling my driver with CONFIGURE_APPLICATION_EXTRA_<u></u>DRIVERS on hello sample)<br>
<br>
2. rtems_filesystem_make_dev_t (to get the device file)<br>
<br>
3. rtems_disk_io_initialize<br>
<br>
4. rtems_disk_create_phys (to create the disk, at /dev/sdc0)<br>
<br>
5. rtems_bdpart_register_from_<u></u>disk (to read and register the partitions)<br>
<br>
6. rtems_fsmount (to mount the partitions)<br>
<br>
For rtems_fsmount I am providing the following fs_table:<br>
<br>
rtems_fstab_entry fs_table [] = {<br>
{<br>
.source = "/dev/sdc0",<br>
.target = "/mnt/p1",<br>
.type = "dosfs",<br>
.options = RTEMS_FILESYSTEM_READ_WRITE,<br>
.report_reasons = RTEMS_FSTAB_ANY,<br>
.abort_reasons = RTEMS_FSTAB_OK<br>
},{<br>
.source = "/dev/sdc01",<br>
.target = "/mnt/p2",<br>
.type = "dosfs",<br>
.options = RTEMS_FILESYSTEM_READ_WRITE,<br>
.report_reasons = RTEMS_FSTAB_ANY,<br>
.abort_reasons = RTEMS_FSTAB_NONE<br>
}<br>
};<br>
<br>
The SD card has only one partition starting at block number 8192.<br>
<br>
After I call rtems_fsmount it calls my driver to read block 8192 and 8193 and then hangs.<br>
<br>
I have tested the driver and It seems to have no problem reading single or multiple blocks.<br>
<br>
Any tips?<br>
<br>
Also I am using the following confdefs configuration (some values are exaggerated):<br>
<br>
#define CONFIGURE_APPLICATION_NEEDS_<u></u>CLOCK_DRIVER<br>
#define CONFIGURE_APPLICATION_NEEDS_<u></u>CONSOLE_DRIVER<br>
#define CONFIGURE_APPLICATION_NEEDS_<u></u>LIBBLOCK<br>
<br>
#define CONFIGURE_FILESYSTEM_DOSFS<br>
#define CONFIGURE_USE_IMFS_AS_BASE_<u></u>FILESYSTEM<br>
<br>
#define CONFIGURE_APPLICATION_EXTRA_<u></u>DRIVERS SD_CARD_DRIVER_TABLE_ENTRY<br>
<br>
#define CONFIGURE_LIBIO_MAXIMUM_FILE_<u></u>DESCRIPTORS 20<br>
<br>
#define CONFIGURE_MAXIMUM_TASKS 2<br>
#define CONFIGURE_MAXIMUM_DRIVERS 10<br>
<br>
#define CONFIGURE_RTEMS_INIT_TASKS_<u></u>TABLE<br>
<br>
#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)<br>
<br>
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION<br>
<br>
#define CONFIGURE_INIT<br>
<br>
--André Marques<br>
<br>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div></div>