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
-
Navigate to the
Microsoft .NET Micro Framework\Samples\ExtendedWeakReferences subfolder of your My Documents folder.
- Load
ExtendedWeakReferences.sln into Visual Studio. -
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.
-
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.
- 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.
|