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="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>OS Demos</TITLE> 9</HEAD> 10<BODY> 11<H1>OS Sample Demo</H1> 12<H2>Location</H2> 13<P><FONT face="Courier New">$REVOLUTION_SDK_ROOT/build/demos/osdemo</FONT></P> 14<H2>Compilation</H2> 15<P>Navigate to <code>$REVOLUTION_SDK_ROOT/build/demos/osdemo</code> and enter "<code>make</code>". The executable file (<code>elf</code> file) will be generated under <code>$REVOLUTION_SDK_ROOT/build/demos/osdemo/bin/RVL/</code>.</P> 16<H2>Execution</H2> 17<P>Go to <code>$REVOLUTION_SDK_ROOT/build/demos/osdemo/bin/RVL/</code> and perform one of the following:</P> 18<ul> 19<li>�uTo execute the program, run the <code>ndrun</code> script using a <code>.elf</code> file as an argument.</li> 20<li>�uRun <CODE>ide</CODE> with a <CODE>.elf</CODE> file as an argument (if you want to debug with CodeWarrior).</li> 21</ul> 22 23<H2>Description</H2> 24<TABLE width="720"> 25 <TBODY> 26 <TR> 27<TD width="187"><EM><STRONG><CODE>allocdemo1</CODE></STRONG></EM></TD> 28<TD width="525">Shows how to get memory from the arena.</TD> 29 </TR> 30 <TR> 31<TD width="187"><EM><STRONG><CODE>allocdemo2</CODE></STRONG></EM></TD> 32<TD width="525">Shows how to set up and use one heap.</TD> 33 </TR> 34 <TR> 35<TD width="187"><EM><STRONG><CODE>allocdemo3</CODE></STRONG></EM></TD> 36<TD width="525">Shows how to set up and use multiple heaps.</TD> 37 </TR> 38 <TR> 39<TD width="187"><EM><STRONG><CODE>cachedemo</CODE></STRONG></EM></TD> 40<TD width="525">Demonstrates the different ways in which memory can be viewed by cached and uncached access.</TD> 41 </TR> 42 <TR> 43<TD width="187"><EM><STRONG><CODE>errordemo</CODE></STRONG></EM></TD> 44<TD width="525">Shows how to set up and use the error handler.</TD> 45 </TR> 46 <TR> 47<TD width="187"><EM><STRONG><CODE>idlefunctiondemo</CODE></STRONG></EM></TD> 48<TD width="525">Shows a trivial example of a background task.</TD> 49 </TR> 50 <TR> 51<TD width="187"><EM><STRONG><CODE>lockedcachedemo1</CODE></STRONG></EM></TD> 52<TD width="525">High-level locked cache API demo.</TD> 53 </TR> 54 <TR> 55<TD width="187"><EM><STRONG><CODE>lockedcachedemo2</CODE></STRONG></EM></TD> 56<TD width="525">Low-level locked cache API demo.</TD> 57 </TR> 58 <TR> 59<TD width="187"><EM><STRONG><CODE>stopwatchdemo</CODE></STRONG></EM></TD> 60<TD width="525">Counts how long a matrix concatenation takes.</TD> 61 </TR> 62 <TR> 63<TD width="187"><EM><STRONG><CODE>threaddemo1</CODE></STRONG></EM></TD> 64<TD width="525">Shows how to create a new thread and how to resume it.</TD> 65 </TR> 66 <TR> 67<TD width="187"><EM><STRONG><CODE>threaddemo2</CODE></STRONG></EM></TD> 68<TD width="525">Shows how to create a new thread and how to join with it.</TD> 69 </TR> 70 <TR> 71<TD width="187"><EM><STRONG><CODE>threaddemo3</CODE></STRONG></EM></TD> 72<TD width="525">Shows how to use a message queue to synchronize threads.</TD> 73 </TR> 74 <TR> 75<TD width="187"><EM><STRONG><CODE>threaddemo4</CODE></STRONG></EM></TD> 76<TD width="525">Shows how to use a mutex to synchronize threads.</TD> 77 </TR> 78 <TR> 79<TD width="187"><EM><STRONG><CODE>threaddemo5</CODE></STRONG></EM></TD> 80<TD width="525">Shows how to use condition variables to synchronize threads.</TD> 81 </TR> 82 <TR> 83<TD width="187"><EM><STRONG><CODE>timerdemo</CODE></STRONG></EM></TD> 84<TD width="525">Shows how to set up and use an alarm.</TD> 85 </TR> 86 <TR> 87<TD width="187"><CODE><EM><STRONG>fontdemo1</STRONG></EM></CODE></TD> 88<TD width="525">Shows how to use IPL ROM font with GX API.</TD> 89 </TR> 90 <TR> 91<TD width="187"><CODE><EM><STRONG>fontdemo2</STRONG></EM></CODE></TD> 92<TD width="525">Shows how to use compressed IPL ROM font image.</TD> 93 </TR> 94 <TR> 95<TD width="187"><CODE><EM><STRONG>fpe</STRONG></EM></CODE></TD> 96<TD width="525">Shows how to use the <code><a href="../Error/OSSetErrorHandler.html">OS_ERROR_FPE</a></code> error hander.</TD> 97 </TR> 98 <TR> 99<TD width="187"><CODE><EM><STRONG>panic</STRONG></EM></CODE></TD> 100<TD width="525">Shows how to hook the SDK assertion message to show the assertion failure message on TV screen using the <code>OSFatal</code> function.</TD> 101 </TR> 102 <TR> 103<TD width="187"><CODE><EM><STRONG>report</STRONG></EM></CODE></TD> 104<TD width="525">Shows how to hook the <code>OSReport</code> function to show the output messages on TV screen.</TD> 105 </TR> 106 <TR> 107<TD width="187"><CODE><EM><STRONG><STRONG><EM><CODE>alarm</CODE></EM></STRONG></STRONG></EM></CODE></TD> 108<TD width="525">Sets user data for the alarm and indicates how to obtain data after the alarm goes off.</TD> 109 </TR> 110 </TBODY> 111</TABLE> 112<H2>See Also</H2> 113<P><A href="../toc.html"><CODE>OS APIs</CODE></A></P> 114<H2>Revision History</H2> 115<P> 11603/01/2006 Initial version. <BR>8/xx/2006 Added alarm demo.<br> 117</P> 118<hr> 119<P>CONFIDENTIAL</p> 120</BODY> 121</HTML>