feat: Preprovisioned Sample #93
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR makes two changes which I believe would be helpful to others as they cover issues and questions I ran into when testing out the SoftSIM library (at v5.1.0 with SDK v2.9.1).
Additions
Add
nonsecure_storage/nvs_storage
to the static partition list.When using the SoftSIM library with custom boards, this can help make it explicitly clear what additional partitions are required.
Add a sample which demonstrates how to preserve existing profile data when re-flashing a device.
This might help in situations where during production first a test / provisioning firmware image is loaded which is later replaced by an application image. (I had a similar question as the one raised in Provisioning SoftSIM (and staying provisioned) in production #92.)
Issues
Instructions for the new sample have been included in README.md in the sample folder. This is inconsistent with the existing samples which lack a README.md.
The new sample will fault if the device is not already provisioned (a warning about this has been added to the instructions). I tried disabling
CONFIG_SOFTSIM_AUTO_INIT
and then checking the provisioning usingnrf_softsim_check_provisioned()
. This worked however, if already provisioned there seems to be some issue with callingnrf_softsim_init()
explicitly from main, this was resulting in a fault.