1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../css/nitro.css"> 8<TITLE>FS Demos</TITLE> 9</HEAD> 10<BODY> 11<H1>ROM File System (FS) Sample Demos</H1> 12<H2>Location</H2> 13<P><CODE>$TwlSDK/build/demos/fs</CODE></P> 14<H2>Compilation</H2> 15<P>Move to the <CODE>$TwlSDK/build/demos/fs</CODE> directory and enter the following:</P> 16<BLOCKQUOTE><CODE>% make</CODE></BLOCKQUOTE> 17<P> The SRL executable file and the NEF or TEF files containing binary information are created in <CODE>$TwlSDK/build/demos/fs/(sample name)/bin/(platform)/(target)/</CODE>.</P> 18<BLOCKQUOTE><CODE></CODE></BLOCKQUOTE> 19<P> For example:</P> 20<BLOCKQUOTE><CODE>$TwlSDK/build/demos/fs/overlay/bin/ARM9-TS/Release/main.srl</CODE></BLOCKQUOTE> 21<P>will be the executable file for the <CODE>overlay</CODE> demo.</P> 22<P>Notice that FS differs from many other demos in that the <CODE>makerom</CODE> option is required, so it is not possible to build with <CODE>elftobin</CODE> (<CODE>make TWL_ELFTOBIN=TRUE</CODE>).</P> 23 24<H2>Execution</H2> 25<H3>For NITRO ROMs:</H3> 26 27<P>If using the Ensata emulator:</P> 28<UL> 29<LI>Execute NEF and SRL files with ensata. 30</UL> 31<P>If using IS-NITRO-DEBUGGER:</P> 32<UL> 33<LI>Load and execute an NLF file with IS-NITRO-DEBUGGER. 34<LI>Execute an SRL file with IS-NITRO-DEBUGGER 35<LI>Execute an SRL file with IS-NITRO-DEBUGGER using the <CODE>loadrun.exe</CODE> tool from a command line. 36</UL> 37<P>If using IS-TWL-DEBUGGER:</P> 38<UL> 39<LI>Load and execute an NLF file with IS-TWL-DEBUGGER. 40<LI>Execute an SRL file with IS-TWL-DEBUGGER. 41<LI>Execute an SRL file with IS-TWL-DEBUGGER using the <CODE>loadrun.TWL.exe</CODE> tool from a command line. 42</UL> 43<H3>For TWL/NITRO HYBRID ROMs:</H3> 44<P>If using IS-NITRO-DEBUGGER:</P> 45<UL> 46<LI>Execute an SRL file with IS-NITRO-DEBUGGER 47<LI>Execute an SRL file with IS-NITRO-DEBUGGER using the <CODE>loadrun.exe</CODE> tool from a command line 48</UL> 49<P>If using IS-TWL-DEBUGGER:</P> 50<UL> 51<LI>Load and execute a TLF file with IS-TWL-DEBUGGER. 52<LI>Execute an SRL file with IS-TWL-DEBUGGER 53<LI>Execute an SRL file with IS-TWL-DEBUGGER using the <CODE>loadrun.TWL.exe</CODE> tool from a command line. 54</UL> 55<H3>For TWL LIMITED ROMs:</H3> 56<P>If using IS-TWL-DEBUGGER:</P> 57<UL> 58<LI>Load and execute a TLF file with IS-TWL-DEBUGGER 59<LI>Execute an SRL file with IS-TWL-DEBUGGER 60<LI>Execute an SRL file with IS-TWL-DEBUGGER using the <CODE>loadrun.TWL.exe</CODE> tool from a command line. 61</UL> 62 63<H2>Description</H2> 64<TABLE width="720"> 65 <TBODY> 66 <TR> 67<TH>Name</TH> 68<TH>Directories</TH> 69<TH>Operation</TH> 70 </TR> 71 <TR> 72<TD width="187"><EM><STRONG><CODE>file-1</CODE></STRONG></EM></TD> 73<TD><CODE>demos</CODE></TD> 74<TD width="525">This is a very simple model of the program configuration that is required to use FS.</TD> 75 </TR> 76 <TR> 77<TD width="187"><EM><STRONG><CODE>file-2</CODE></STRONG></EM></TD> 78<TD><CODE>demos</CODE></TD> 79<TD width="525">This embeds directories and files and reads them inside the program.</TD> 80 </TR> 81 <TR> 82<TD width="187"><EM><STRONG><CODE>file-3</CODE></STRONG></EM></TD> 83<TD><CODE>demos</CODE></TD> 84<TD width="525">This tests the operation of the functions <A href="../../fs/file/FS_CreateFileFromMemory.html"><CODE>FS_CreateFileFromMemory</CODE></a> and <A href="../../fs/file/FS_CreateFileFromRom.html"><CODE>FS_CreateFileFromRom</CODE></a>.</TD> 85 </TR> 86 <TR> 87<TD width="187"><EM><STRONG><CODE>async</CODE></STRONG></EM></TD> 88<TD><CODE>demos</CODE></TD> 89<TD width="525">This sample repeats synchronous read inside each thread. If the run environment supports asynchronous operation, the thread will be put to sleep and switched only when it is blocked. Otherwise, it will continue to repeat reading a single thread. For details, refer to the description of the <a href="../../fs/file/FS_ReadFileAsync.html"><code>FS_ReadFileAsync</code></a> function.</TD> 90 </TR> 91 <TR> 92<TD width="187"><EM><STRONG><CODE>overlay</CODE></STRONG></EM></TD> 93<TD><CODE>demos</CODE></TD> 94<TD width="525">This is a simple overlay sample.</TD> 95 </TR> 96 <TR> 97<TD width="187"><EM><STRONG><CODE>overlay-compressed</CODE></STRONG></EM></TD> 98<TD><CODE>demos</CODE></TD> 99<TD width="525">Tests the operation of compressed overlay using the <code>TWL_COMPRESS</code> build switch. The program itself is the same as that in the "overlay" demo.</TD> 100 </TR> 101 <TR> 102<TD width="187"><EM><STRONG><CODE>Overlay-staticinit</CODE></STRONG></EM></TD> 103<TD><CODE>demos</CODE></TD> 104<TD width="525">This sample defines the sinit.h header and the NitroStaticInit function, and uses a static initializer from an overlay written in C.</TD> 105 </TR> 106 <TR> 107<TD width="187"><EM><STRONG><CODE>arc-1</CODE></STRONG></EM></TD> 108<TD><CODE>demos</CODE></TD> 109<TD width="525">This is a sample that loads these two archives independently. <br><br>-Archive that operates the same way as the default <A>ROM archive</A>. <br>-Archive that accesses the internal file system in the program binary file. 110 </TD> 111 </TR> 112 <TR> 113<TD width="187"><EM><STRONG><CODE>arc-2</CODE></STRONG></EM></TD> 114<TD><CODE>demos</CODE></TD> 115<TD width="525">This is a sample that loads a customized directory structure that is not compliant with the <CODE>TwlROM</CODE> format as an archive.<br> Unlike the <code>arc-1</code> sample, this sample contains examples that replace basic access commands with user procedures. 116 </TD> 117 </TR> 118 <TR> 119<TD width="187"><EM><STRONG><CODE>explorer</CODE></STRONG></EM></TD> 120<TD><CODE>demos</CODE></TD> 121<TD width="525">This is a sample that displays a directory structure within the file system. 122 </TD> 123 </TR> 124 </TBODY> 125</TABLE> 126<H2>Operation</H2> 127<P><CODE>Operates normally in all operating environments.</CODE></P> 128<H2>See Also</H2> 129<P><A href="../../fs/list_fs.html"><CODE>FS Function List</CODE></A></P> 130<H2>Revision History</H2> 131<P> 1322008/07/11 Changed the description corresponding to TWL.<BR> 2008/05/22 Added a description of the explorer demo.<br> 2005/06/28 Added a description of a file-3 demo.<br> 2005/05/10 Added a description of the overlay-compressed demo.<br> 2005/03/02 Made revisions to code listed so it meets the conditions of the currently supported environment.<BR> 2005/01/19 Added a description of the overlay-staticinit demo.<BR> 2004/10/06 Added missing descriptions for some demo.<BR> 2004/08/17 Standardized the written style for IS-NITRO-EMULATOR.<BR> 2004/07/10 Changed from BIN to SRL.<BR>2004/06/18 Revised the description of the execution method.<br /> 2004/05/20 Initial version.</P> 133<hr><p>CONFIDENTIAL</p></body> 134</HTML>