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

garbage collection

I need to run gc because I get rc =FDS_ERR_NO_SPACE_IN_FLASH.

So I run gc simple as written in https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fds_functionality.html?cp=5_1_3_55_1_2#lib_fds_functionality_gc 

I just write this

rc = fds_record_update(&record_desc, &record);
if(rc == FDS_ERR_NO_SPACE_IN_FLASH) // no space in the FLASH
{
  ret_code_t rc = fds_gc();// try to do garbage collection
  if (rc != FDS_SUCCESS)
  {
   /* error handle */
}

}

But just when I do the fds_gc() I get hard fault.

What do I miss here?

Bar.

Parents
  • Hi Bar

    How exactly do you trigger the gc? Do you get any kind of error code so we can see what exactly goes wrong? The fds_gc() function is implemented in the ble_app_gatts_c example, so you could look at that and see if you understand more. You also have to make sure that fds.c and fds.h is included in your project.

    Best regards,

    Simon

  • Hello Simon.

    I trigger the gc when I get FDS_ERR_NO_SPACE_IN_FLASH.

    I don't get any error when go into the gc itself until I get to gc_execute(uint32_t prev_ret) and then with no ERROR it go to hardfault.

    Maybe it concern the size of the virtual FLASH I give? I read some issue about it and I see all use peer management also it must use for the ble. I take an example of using peer management, and I try to implement it in my work also I need to add a lot of files because I don't use it for ble purpose.  Do you see it will help use the peer or I can do it without this? I will look aty the example you take about and see if I can find something I forget.

    Bar.

Reply
  • Hello Simon.

    I trigger the gc when I get FDS_ERR_NO_SPACE_IN_FLASH.

    I don't get any error when go into the gc itself until I get to gc_execute(uint32_t prev_ret) and then with no ERROR it go to hardfault.

    Maybe it concern the size of the virtual FLASH I give? I read some issue about it and I see all use peer management also it must use for the ble. I take an example of using peer management, and I try to implement it in my work also I need to add a lot of files because I don't use it for ble purpose.  Do you see it will help use the peer or I can do it without this? I will look aty the example you take about and see if I can find something I forget.

    Bar.

Children
No Data
Related