All SBC66 Netcruzer boards have an external EEPROM and FLASH, which is normally used by the project to store application configuration data. The "nz_appConfig.h" file provides an interface for storing, retrieving and modifying application configuration data. It is recommended to implement it in a project if application configuration data is required.
For details how a projects stores it's configuration data, refer to the specific Project's documentation.
The application configuration is stored in the external EEPROM of the SBC board. It is stored in the CFG_STRUCT section of the EEPROM. The XEEMEM_USER_START_ADR and XEEMEM_USER_END_ADR defines should be used to get the address range available for user data.
The external EEPROM is devided into various sections, as defined by XEEMEM_xxx defines. For example, if the user wants to use the external EEPROM for project specific data, the XEEMEM_USER_START_ADR define should be used to located the "User EEPROM" space.
The following example shows the memory map for the "Webserver" project:
0x0000-0x001F (0-31) | CFG_INFO - Info, Magic Number, CRC... Used for checksum calculations, and to check if EEPROM contains valid data. |
0x0020-0x03FF (32-1023) | CFG_COPY - Copy of last written settings. Use write blocks of 32 bytes |
0x0400-0x0FFF (1024-4095) | CFG_STRUCT - Main Content. In code this address range is defined by the XEEMEM_CFG_STRUCT_START_ADR and XEEMEM_CFG_STRUCT_END_ADR defines. |
0x1000-0x1FFF (4096-8191) | User EEPROM space, can be used by user application to store non volatile data. In code this address range is defined by the XEEMEM_USER_START_ADR and XEEMEM_USER_END_ADR defines. |
The default configuration is stored in the cfgStructHexfile and cfgStruct structures in the project's appConfig.c file. Both these strucures should be kept identical! When making a change to one, do the same to the other!
When upgrading firmware, the old configuration data should be preserved. To do this, it is very important that if the config structures are changed in new firmware, changes are ONLY made to back of structure. The upgrade process will work as follows: