<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Pete,<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for sending that. I read that document yesterday before I sent my plea for help that but I have to be honest, it left me more confused more than anything. I am using a SD Card, not ATA, NV, or RAM disk. The ATA, NV, & RAM disk sections all have different
 procedures and I do not know enough in order to extract certain information from each section to apply to my situation.<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
In addition to some other defines, I defined the following based on the "Using the RTEMS DOS File System" document:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>#define CONFIGURE_MAXIMUM_DRIVERS 10<br>
</span>
<div>#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
</div>
<div>#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK<br>
</div>
<div>#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM<br>
</div>
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
#define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS 32<br>
<div>#define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS      16<br>
</div>
<div>#define CONFIGURE_SWAPOUT_TASK_PRIORITY       10<br>
</div>
<div>#define CONFIGURE_SWAPOUT_SWAP_PERIOD         250<br>
</div>
<div>#define CONFIGURE_SWAPOUT_BLOCK_HOLD          1000</div>
<div><br>
</div>
<div>Beyond that I have no idea what to do.</div>
<div><br>
</div>
<div>The only devices listed in /dev is:</div>
<div>bpf</div>
<div>bpf0</div>
<div>console</div>
<div>ttyS0</div>
<div>ttyS1</div>
<div><br>
</div>
<div>I do not think any of these devices are what I am looking for.<br>
</div>
<div><br>
</div>
<div>Again, I have no idea what I am doing. This is my very first time using RTEMS. I have never written a driver before. I am not familiar with the particulars on the underlying mechanisms of different filesystems. I am willing to do the work in order to get
 this going but I need some guidance which I can understand. Any help pointing me to some nice overview / procedure / example / etc would be very helpful.</div>
<div><br>
</div>
<div>My development board is a microzed with a zynq processor.<br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Jim<br>
</div>
<div><br>
</div>
<div><br>
</div>
<span></span><br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> users <users-bounces@rtems.org> on behalf of Siddons, David <siddons@bnl.gov><br>
<b>Sent:</b> Thursday, July 18, 2019 4:07 PM<br>
<b>To:</b> users@rtems.org <users@rtems.org><br>
<b>Subject:</b> [SPAM] Re: RTEMS / Zynq (microZed) - Writing data to a file on removable media (SD card)</font>
<div> </div>
</div>
<div style="background-color:#FFFFFF">
<p style="margin-top: 0px; margin-bottom: 0px;"><font size="+1">Hi Jim,</font></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><font size="+1">   I suspect you need to look at this:</font></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><a class="x_moz-txt-link-freetext" href="https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevel.rtems.org%2Fwiki%2FTBR%2FUserManual%2FUsing_the_RTEMS_DOS_File_System&data=02%7C01%7C%7C228965b63ce346aa42d508d70bc3f4e2%7Ca031ec362ef248beab1ed59fe73ec959%7C0%7C0%7C636990808593422771&sdata=RUwaV0J2qJr%2BadqW8C4gKccwwPZxS4Jb2X9U1gbS%2FiY%3D&reserved=0" originalsrc="https://devel.rtems.org/wiki/TBR/UserManual/Using_the_RTEMS_DOS_File_System" shash="bl+fUAaz8yEHasK26fCRc21Fn92hgj6o5p4t83w+mYEwFGF6IcPgTXpHs5XfuY3nicmjj1Lfvy4mxCDmQMWAlGmIPODXS2FY7E1KVJrHT/ZGlt17hUSDFH8/GhRPzIZSumjsV+SQWQLFRAUHfJ1JY1WQ3WQ87u8Hki5kf3NB18Y=">https://devel.rtems.org/wiki/TBR/UserManual/Using_the_RTEMS_DOS_File_System</a></p>
<p style="margin-top: 0px; margin-bottom: 0px;">or similar.</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Pete.</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<div class="x_moz-cite-prefix">On 7/18/19 4:48 PM, Jim Elliott wrote:<br>
</div>
<blockquote type="cite">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Could someone please point me to a resource which explains in as simple terms as possible how to write data to a file on removable media?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I compiled a test application and installed it on a zynq processor (microZed). My BOOT.bin is located in the root directory of a SD card. How can I write files to that SD card?? My application runs fine, I just can't seem to write any data to a file...<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The process which I am following is simply:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
1) Open file     -> fopen( ... )<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
2) Write to file -> fprintf( ... )</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
3) Flush file    -> fflush( ... )</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
4) Close file    -> fclose( ... )</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
If I create my file on the root directory I can see it using the built in shell. However, when I take my SD card out and try to open it on my computer the file is gone.
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I saw the following mentioned at <a href="https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__devel.rtems.org_wiki_Developer_FileSystems%26d%3DDwMFAw%26c%3DaTOVZmpUfPKZuaG9NO7J7Mh6imZbfhL47t9CpZ-pCOw%26r%3DfGrfLoYyW57FVa-DUXJrrg%26m%3DFuO01lFAGNr49p5k_GtGk_BMrhZtN_V878pZrOkvEHM%26s%3DVP1cIsK6z9dgXzCnpvEXeZWh5v4z_ZfqKW-kLDIU8RA%26e%3D&data=02%7C01%7C%7C228965b63ce346aa42d508d70bc3f4e2%7Ca031ec362ef248beab1ed59fe73ec959%7C0%7C0%7C636990808593422771&sdata=xEP0FZvjf5sYT9mznPTFoGIQa2YAQVmhY9SGUcL13iM%3D&reserved=0" originalsrc="https://urldefense.proofpoint.com/v2/url?u=https-3A__devel.rtems.org_wiki_Developer_FileSystems&d=DwMFAw&c=aTOVZmpUfPKZuaG9NO7J7Mh6imZbfhL47t9CpZ-pCOw&r=fGrfLoYyW57FVa-DUXJrrg&m=FuO01lFAGNr49p5k_GtGk_BMrhZtN_V878pZrOkvEHM&s=VP1cIsK6z9dgXzCnpvEXeZWh5v4z_ZfqKW-kLDIU8RA&e=" shash="xrH/EXVLDdSduwTroddQGpE1u6iZx6Utk1VSiMTI13O9jhb/2sy5SyEiSw0/fHiLDQLoEz7E+1Xi96bIIs3ZRT6PPvpbLoBX7GlcFyQsFdmPLVZt5XHOw1BNZCLMKyAPa51dDI/9GJiFYBqee2/XY3CINLAv8hxiK2ti6KyKMyI=">https://devel.rtems.org/wiki/Developer/FileSystems</a></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="margin-top: 0px; margin-bottom: 0px;">"The In Memory File Systems is always the root file system and uses the standard C library heap for storage. The file system will only consume memory for the nodes and files it holds and releases memory back to
 the heap when no longer used. The design of this file systems is full standards support, small foot print and lower memory overhead. The file system is also fast for small sized files and directories. This suits small configuration files and device driver
 nodes. </p>
<p style="margin-top: 0px; margin-bottom: 0px;">This file system is volatile. After an application restart you will need to construct its contents. RTEMS provides some supporting calls for this plus there is the ability to tar files into it."</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">... so that explains why my file is gone when I try to check it out on my computer. BUT, using my computer, if I create a subdirectory under root, say "/logs" I am unable to see that directory using the RTEMS
 shell...</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Please forgive what might be a simple oversight here. Clearly I do not know what I am doing. Any help would be greatly appreciated.</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Thanks,</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Jim<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<br>
</div>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0">
<span style="font-size:12pt"></span></p>
<br>
<hr>
<p style="margin-top: 0px; margin-bottom: 0px;font-size:8pt; line-height:10pt; font-family:'Arial'; color:#FF0000">
CONFIDENTIALITY NOTICE: <span style="font-size:8pt; line-height:10pt; font-family:'Arial'; color:#666666">
<i>The contents of this e-mail message may be privileged, confidential, proprietary, Controlled Unclassified Information (CUI) or otherwise protected against disclosure or dissemination. This e-mail message and any files transmitted with it are intended solely
 for the use of the individual/individuals or entity/entities to whom they are addressed. If you are not the intended recipient of this message, any dissemination, distribution, printing or copying is strictly prohibited. If you have received this message in
 error, please e-mail or call the sender (<a class="x_moz-txt-link-abbreviated" href="mailto:jim.elliott@nta-inc.net">jim.elliott@nta-inc.net</a>, ) and destroy all copies.
<br>
<br>
</i></span></p>
<br>
<fieldset class="x_mimeAttachmentHeader"></fieldset>
<pre class="x_moz-quote-pre">_______________________________________________
users mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:users@rtems.org">users@rtems.org</a>
<a class="x_moz-txt-link-freetext" href="https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-3A__lists.rtems.org_mailman_listinfo_users%26d%3DDwICAg%26c%3DaTOVZmpUfPKZuaG9NO7J7Mh6imZbfhL47t9CpZ-pCOw%26r%3DfGrfLoYyW57FVa-DUXJrrg%26m%3DFuO01lFAGNr49p5k_GtGk_BMrhZtN_V878pZrOkvEHM%26s%3DmpxlTdLP1HCKw5ZX38daLLl5xbxfkn9QHg-HvbJrZzE%26e%3D&data=02%7C01%7C%7C228965b63ce346aa42d508d70bc3f4e2%7Ca031ec362ef248beab1ed59fe73ec959%7C0%7C0%7C636990808593432763&sdata=WJhjOjd2WiS61ElddoUQYotDO%2F1aJCe2JpEetFRYnHk%3D&reserved=0" originalsrc="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.rtems.org_mailman_listinfo_users&d=DwICAg&c=aTOVZmpUfPKZuaG9NO7J7Mh6imZbfhL47t9CpZ-pCOw&r=fGrfLoYyW57FVa-DUXJrrg&m=FuO01lFAGNr49p5k_GtGk_BMrhZtN_V878pZrOkvEHM&s=mpxlTdLP1HCKw5ZX38daLLl5xbxfkn9QHg-HvbJrZzE&e=" shash="KSltmkP8wtIA5OdiDMBjUpQHeeX0nVRP8NGxf2pfBdqMUwPdb+xK8fl04zMvKOPVPv0jmQt+NYatBW9SoVEoRK17MLmXXkXbku/lPu1dMh35HgMIVAUmNeaCebcdZIwPQH3B31kn8F/96zcpEGgI6eCwo1OejoDdsOb4yW2QPP8=">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.rtems.org_mailman_listinfo_users&d=DwICAg&c=aTOVZmpUfPKZuaG9NO7J7Mh6imZbfhL47t9CpZ-pCOw&r=fGrfLoYyW57FVa-DUXJrrg&m=FuO01lFAGNr49p5k_GtGk_BMrhZtN_V878pZrOkvEHM&s=mpxlTdLP1HCKw5ZX38daLLl5xbxfkn9QHg-HvbJrZzE&e=</a> </pre>
</blockquote>
</div>
</div>
<br>
<hr>
<p style="font-size:8pt; line-height:10pt; font-family:'Arial'; color:#FF0000">CONFIDENTIALITY NOTICE:
<span style="font-size:8pt; line-height:10pt; font-family:'Arial'; color:#666666">
<i>The contents of this e-mail message may be privileged, confidential, proprietary, Controlled Unclassified Information (CUI) or otherwise protected against disclosure or dissemination. This e-mail message and any files transmitted with it are intended solely
 for the use of the individual/individuals or entity/entities to whom they are addressed. If you are not the intended recipient of this message, any dissemination, distribution, printing or copying is strictly prohibited. If you have received this message in
 error, please e-mail or call the sender (jim.elliott@nta-inc.net, ) and destroy all copies.
<br>
<br>
</i></span></p>
</body>
</html>