===========================================================================
Nucleus Samples - Storage - File Usage
===========================================================================

Introduction
------------

The Nucleus Sample Application demonstrates the use of the Nucleus Storage component.

Purpose & Goals
---------------

The purpose behind this sample application is to show how to use the Nucleus 
Storage component.  This sample accomplishes the following:

 1) Opens a drive
 2) Creates a log file on the drive
 3) Writes test strings to the log file
 4) Closes the log file
 5) Creates a second log file on the drive
 6) Writes test strings to the log file
 7) Closes the log file
 8) Re-opens the first log file
 9) Appends updated test strings to the log file
10) Closes the log file
11) Opens the first log file
12) Reads the log file and prints the information
13) Closes the log file
14) Opens the second log file
15) Reads the log file and prints the information
16) Closes the log file
17) Closes the drive

What You Will Need
------------------

To run this demonstration you will need a Nucleus ReadyStart platform with 
a BSP that has a Storage device enabled.

Components Used
---------------

Please reference the sample *.config file for a minimal configuration.  This configuration is set to ramdisk
by default.  To run this sample with other storage media, changes to the *.config file are required to enable 
those devices.  Depending on the product these can be found within the \samples\ folder or at the base of the 
system project named <app_project_name>.<build_config>.config

Building the Application
------------------------

Open the provided development shell, e.g. Nucleus Dev Shell (CS GNU ARM).bat, and execute the following command for the desired platform. 

make PLATFORM=<platform> 

For example, <platform> can be "at91sam9263ek". For more information, please refer to Nucleus User Guide.

As a result of above command, one of the generated output images should be *.out.

Setting up Hardware
-------------------

Follow the instructions found in the appropriate BSP document (\bsp\<platform>\docs\<platform>.htm)
to open a serial terminal and view standard out from the target.

How To Run The Application
--------------------------

Load and run the file_usage.out file. Verify output on the console window on the PC. 