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

NRF52840 fds_record_write returning error: FDS_ERR_UNALIGNED_ADDR

Hi,

I am using FDS  for read and write the records with SDK17, My code is working fine but when I change the optimization level 2 for size   then I am getting FDS_ERR_UNALIGNED_ADDR error when trying to write record:

        rc = fds_record_write(&desc, &rec);

I search solution on Forum and by putting __ALIGN(4) with record variable declaration my problem solved.

So my questions are-

1- Is it necessary to use __ALIGN(4) with record variables or there is any other configuration setting need to set in SES or embproject file?

2- Using __ALIGN(4) should not problem with all Optimization level?

Related