This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK12 and FDS

Hello

We are about to move an old design based on the NRF51 to the more powerfull NRF52. In this context we would like to use some of the new API’s that has been introduced in the latest SDK’s. In the old design we used pstorage but would like to use fds in the new device.

Some questions regarding SDK12 and fstorage and fds. Are there any plans of supporting Segger embeded studio for SDK12 based examples ? Preferably out of the box, but a dedicated SDK12 tutorial could also be fine. I know that there is a GCC github example of FDS based on SDK11, any plans of creating an example based on SDK12 ?

I have tried to create an test application based on SDK12 GCC BLE_APP_UART where i take the code from the FDS github example add the necesary fds c and h files. Compiles fine but get some linker errors (undefined references to the interfaces used in fds).

  Linking target: _build/nrf52832_xxaa.out
_build/nrf52832_xxaa_main.c.o: In function `fds_test_init':
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:714: undefined reference to `fds_register'
_build/nrf52832_xxaa_main.c.o: In function `fds_test_find_and_delete':
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:698: undefined reference to `fds_record_delete'
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:696: undefined reference to `fds_record_find'
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:703: undefined reference to `fds_gc'
_build/nrf52832_xxaa_main.c.o: In function `fds_test_write':
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:631: undefined reference to `fds_record_write'
_build/nrf52832_xxaa_main.c.o: In function `fds_read':
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:654: undefined reference to `fds_record_find'
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:656: undefined reference to `fds_record_open'
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:676: undefined reference to `fds_record_close'
_build/nrf52832_xxaa_main.c.o: In function `fds_test_init':
C:\Users\soren\Documents\source\c-code\nordic\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc/../../../main.c:720: undefined reference to `fds_init'
collect2.exe: error: ld returned 1 exit status
make: *** [_build/nrf52832_xxaa.out] Fejl 1

Linkerscript used is the one included with the SDK12 BLE_APP_UART example. Only difference between this and the Nordic FDS SDK11 Github example is memory addresses (S132 SD 2 vs SD3)

Besides adding the paths for the fds/fstorage c and header files in the make file anything else I should add to the makefile (in relation to BLE_APP_UART).? BLE_APP_UART already supports fstorage (peer manager) to my understanding. [EDIT] Turned out to be the following define in sdk_config.h

// <e> FDS_ENABLED - fds - Flash data storage module
//==========================================================
#ifndef FDS_ENABLED
#define FDS_ENABLED 1 
#endif

In general it is better to use the GLS example for FDS in SDK12 [EDIT stop] Sorry for multiple quetions, but they all circle around the samme topic, how to get an easy start with SDK12 and FDS. Thanks in advance.

Related