7.2 Switching from PS Store to NVM3
Beginning with Bluetooth SDK v2.13.0, both PS Store and NVM3 are supported as non-volatile memory solutions on Series 1 devices.
Most sample applications are configured to use PS Store by default, but for some applications (where larger non-volatile memory is
needed) NVM3 may be a better solution.
Note: PS Store and NVM3 are not compatible with each other, therefore upgrading an already existing application from PS Store to
NVM3 will result in losing all data stored on the device. If you have an application running in the field, it may be wiser to stay with PS
Store. If you still want to upgrade, see AN1086: Using the Gecko Bootloader with the Silicon Labs Bluetooth® Application for details.
Note: PS Store uses only 2 flash pages (=4 kB on an EFR32BG1/12/13 device). Therefore, changing to NVM3 will affect the available
space in flash. You must be particularly careful when you upgrade the firmware not to overwrite the NVM3 area with the application.
With Simplicity Studio 5 and Bluetooth SDK v3.x
To change your project configuration from PS Store to NVM3, simply install the NVM3 Default Instance component in the Project Con-
figurator as discussed in section 3. NVM3 in the Simplicity Studio 5 Project Configurator. This will automatically uninstall the (otherwise
hidden) PS Store component.
With Simplicity Studio 4 and Bluetooth SDK v2.x
To change your project configuration from PS Store to NVM3, use the following procedure.
1. Copy the following folder with all of its content:
C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\<version>\platform\emdrv\nvm3
under the /platform/emdrv folder of your project.
2. Remove the following files from the project:
• /platform/emdrv/nvm3/src/nvm3_hal_extflash.c
• /platform/emdrv/nvm3/src/nvm3_default_extflash.c (NVM3 use with external flash is deprecated)
3. If you use Apploader in your project, also copy the NVM3 version of Apploader from
C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\<version>\protocol\bluetooth\lib\<device>
\<compiler>\binapploader_nvm3.o
into the /protocol/bluetooth/lib/<device>/<compiler> folder of your project.
4. If you use GCC as a compiler:
a. Go to Project > Properties > C/C++ Build > Settings > GNU ARM C Compiler > Includes.
b. Add ${workspace_loc:/${ProjName}/platform/emdrv/nvm3/inc} to the include directory.
c. Go to Project > Properties > C/C++ Build > Settings > GNU ARM C Linker > Miscellaneous.
d. Remove ${workspace_loc:/${ProjName}/protocol/bluetooth/lib/<device>/<compiler>/libpsstore.a}.
e. add ${workspace_loc:/${ProjName}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a}
If you use IAR as a compiler:
a. Go to Project > Properties > C/C++ Build > Settings > IAR C/C++ Compiler for ARM > Preprocessor.
b. Add ${workspace_loc:/${ProjName}/platform/emdrv/nvm3/inc} to the include directory.
c. Go to Project > Properties > C/C++ Build > Settings > IAR Linker for ARM > Library.
d. Remove ${workspace_loc:/${ProjName}/protocol/bluetooth/lib/<device>/<compiler>/libpsstore.a}.
e. Add ${workspace_loc:/${ProjName}/platform/emdrv/nvm3/lib/libnvm3_CM4_iar.a}.
5. If you use Apploader, also modify
${workspace_loc:/${ProjName}/protocol/bluetooth/lib/<device>/<compiler>/binapploader.o}
to ${workspace_loc:/${ProjName}/protocol/bluetooth/lib/<device>/<compiler>/binapploader_nvm3.o}.
6. Configure NVM3 as described in section 7.1 Configuring NVM3 in the Bluetooth SDK.
AN1135: Using Third Generation Non-Volatile Memory (NVM3) Data Storage
Using NVM3 with Silicon Labs Bluetooth Applications
silabs.com | Building a more connected world. Rev. 1.4 | 9