Extended Weak References Sample

This sample shows how to use the Micro Framework’s ExtendedWeakReference class to persist data across a reboot of the hardware. In particular, this sample records how many times the hardware has been rebooted and displays the result in the debugger’s Output window. To demonstrate this feature, a sample emulator (EWR Sample Emulator) is also provided. This emulator knows to persist its flash memory to disk when terminating and also know to reload the flash memory from disk when initializing.

How To Build

  1. Navigate to the Microsoft .NET Micro Framework\Samples\ExtendedWeakReferences subfolder of your My Documents folder.
  2. Load ExtendedWeakReferences.sln into Visual Studio.
  3. Build the EWRSampleEmulator project first. Due to an MS Build step in the EWRSampleEmulator project, building the emulator registers it as a Micro Framework emulator.
  4. In Visual Studio, display the properties for the ExtendedWeakReferences project, select the “MicroFramework” tab and make sure that “EWR Sample Emulator” is selected for the “Device” option.
  5. Build the ExtendedWeakReferences project.

Note

This sample is designed to demonstrate a feature or functionality of the SDK within the Micro Framework Emulator. The sample may require modification to function properly on your hardware.