Hi!
We are currently in the process of migrating our nrf5 SDK code to NCS, on nrf52833-based hardware.
After being stuck for a while on the basic init process of MCUBoot, I was finally able to get MCUBoot to run our app (see previous ticket RE: MCUBoot, Zephyr, and static partition manager - Thanks Sigurd for all your help!).
My problem currently is that all the MCUBoot changes, most specifically the Static Partition Manager, have caused our app to consistently fail on boot with the following error:
"bt_settings: settings_subsys_init failed (err -45)".
Reading up on this, err 45 = EDEADLK (https://docs.zephyrproject.org/apidoc/latest/group__system__errno.html#ga55cc70ce0ba661298f3c412095dfeeb6), which is "Resource deadlock avoided".
Before all the changes leading to MCUBoot + PM, I had been able to init and use the NVS without issues, as well as the BT settings init.
Pre-MCUBoot and PM, I had defined our flash like so (in overlay):
With chosen as follows (same overlay file):
And our NVS init code is as follows:
Our new pm_static.yml file is:
I have tried to change the number of sectors to 7 to match the 7 sectors for storage_partition in the pm_static.yml, to no avail (same -45 error).
My questions are as follows:
- How do I go about replacing the "zephyr,settings-partition = &settings_partition;" once I remove the flash0 override from our overlay file?
- How do I go about pointing from my code (like the existing NVS_PARTITION define) to the PM partitions for nvs init, if possible?
- If not possible - how do I go about initing and using nvs?
Thanks!
Roi