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

Store data in flash with NRF52832 and MBED and GCC

Hi,

I'm trying to use an existing NRF51822 mbed codebase on a new NRF52832 product and am having some issues.

First of all, it seems that I can't use mbedlib, but need to update to mbed-os because BLE on NRF52832 isn't implemented for the old libraries. No problem.

I got things building with mbed-os with the rtos disabled using the .mbedignore file. However, my pstorage-based flash data storage isn't working. The callback never gets called.

From reading on forums and digging around in the source it seems that things have been switched internally to fstorage. Again, no problem. I didn't really want to update my code, but no big deal.

However, I can't get the FS_REGISTER_CFG macro to compile. I'm getting an error: "sorry, unimplemented: non-trivial designated initializers not supported".

I tried a number of ways to work around it but none of them have worked so far.

Is there some way to get this working with this toolchain? Or some way to continue to use pstorage? Would I be better off to just ditch mbed entirely?

Thanks!

Parents
  • I've gotten pstorage working again by #defining IS_LEGACY_DEVICE_MANAGER_ENABLED to 1 at the top of btle.cpp (the pre-existing code defined it to 1 for S110 and 0 for S130 or S132). So far BTLE seems to be working as well and it doesn't seem to be used in any obviously bad way from a quick search, but I don't know enough about the internal workings to know if this is dangerous. Any thoughts from someone more familiar? Thanks.

Reply
  • I've gotten pstorage working again by #defining IS_LEGACY_DEVICE_MANAGER_ENABLED to 1 at the top of btle.cpp (the pre-existing code defined it to 1 for S110 and 0 for S130 or S132). So far BTLE seems to be working as well and it doesn't seem to be used in any obviously bad way from a quick search, but I don't know enough about the internal workings to know if this is dangerous. Any thoughts from someone more familiar? Thanks.

Children
No Data
Related