There is a bug in fds.c file, Please go through the below code snippet.
ret_code = fds_record_update(&desc, record_id); if (ret_code == FDS_ERR_NO_SPACE_IN_FLASH) { ret_code = fds_gc(); ERROR_CHECK(ret_code); ret_code = fds_record_update(&desc, record_id); }
I do not return from fds_gc(), execution stays there for infinite.
More information:
1) #define FDS_VIRTUAL_PAGES 30
2) #define FDS_VIRTUAL_PAGE_SIZE (1024)
3) Initialization is successful and able to write, update and read several records.
4) SDK version: nRF_SDK_15.2.0
The problem occurs when record_update is failed with FDS_ERR_NO_SPACE_IN_FLASH and followed by garbage collection function fds_gc().
According to me, a library function has to return an error code if something is wrong, but not locked in an infinite loop. This is a serious bug.
Please help me as I am stuck in the crucial phase of our development.
Regards,
Jagadeep