name=Simulated EEPROM version 1 Library

description=This library simulates an EEPROM within the internal flash of the chip to maximize the lifetime of flash pages and reduce write cycles.  The simulated EEPROM extends the lifetime of flash by wear leveling writes across the flash.  It is used for persistent storage of tokens for the network and application layers.  The network tokens are automatically managed by the network stack.  The application may add its own tokens.  SimEE1 and SimEE2 share the same fundamental limits on maximum number of tokens, maximum token or element size, and maximum number of elements in an indexed token. Maximum sum total of all token sizes is 2 kB in version 1 and 8 kB in version 2.  Version 1 uses less flash than Version 2, but version 1 is not optimized for writes during time critical operations.  Page erasure is under application control due to requiring the chip to disable interrupts during the erasure.  See Application note AN703 for more information.

category=HAL

qualityString=Production Ready
quality=Production

architecture=efr32~series[1],em346,em355,em3555,em357,em3581,em3582,em3585,em3586,em3587,em3588,em3591,em3592,em3595,em3596,em3597,em3598,simulation

includedByDefault=true

providedApis=sim-eeprom, token-storage

libraryFiles=$FRAMEWORK/../../build/sim-eeprom1-library-{platformDirectorySuffix}/sim-eeprom1-library.a
sourceFiles(~simulation)=$HAL/plugin/sim-eeprom1/sim-eeprom.c

options=destructiveSimee2To1Downgrade

destructiveSimee2To1Downgrade.name=Destructive SimEE version 2 to version 1 downgrade
destructiveSimee2To1Downgrade.description=Enabling this option will cause SimEE version 1 to not check for the existence of SimEE version 2 data in flash.  The consequence of enabling the destructive downgrade is any and all SimEE data from using version 2 will be ignored, eventually deleted, and all SimEE tokens will be instantiated with their default, compile time values.  Not enabling this option will cause SimEE version 1 to assert if SimEE version 2 is found in the flash.  Asserting if SimEE2 is found prevents any accidental token deletion by running version 1 on a device.  Destructive downgrade is the only downgrade option.
destructiveSimee2To1Downgrade.type=BOOLEAN
destructiveSimee2To1Downgrade.default=FALSE
destructiveSimee2To1Downgrade.define=DESTRUCTIVE_SIMEE2TO1_DOWNGRADE

setup(template) {
  simeepromSize=8192
}
