Commit Graph

10 Commits

Author SHA1 Message Date
Jamie McCrae bfb4794c36 retention: Increase read size variables to 16-bit
Increases 2 variables to be 16-bits instead of 8-bits to allow
for target read sizes, this would only be an issue if someone
changed the default retention block size from the default value
of 16 to a value over 256

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-14 19:05:22 +00:00
Jamie McCrae 65bb96f37c retention: blinfo: Fix issue with crash writing to keys
Fixes an issue which would cause a fault if someone attempted
to write to the (non-writable) blinfo keys

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-12 11:53:21 +01:00
Jamie McCrae db4febc584 retention: Add bootloader configuration interface
Adds a bootloader configuration interface which allows for a
bootloader (e.g. MCUboot) to set configuration in a shared data
area which is then read by the application.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-27 20:18:31 -04:00
Jamie McCrae 497b6eb44e retention: Drop prefix/checksum code if not used
Will exclude the code for prefix and checksum functionality if none
of the entries on a device make use of these features, saves ~816
bytes when both features are excluded.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-08-24 20:44:02 +02:00
Anas Nashif 65e97fb03a retention: do noy rely on CRC being enable, imply CRC in Kconfig
CRC is now disable by default, so we need to enable it for retention
subsys.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-18 08:52:16 +03:00
Jamie McCrae 566fd8cb7c retention: Allow disabling mutex support
Changes the Kconfig option to allow disabling mutex support, this
is to allow other Kconfig options to disable the feature.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-12 11:51:30 +02:00
Jamie McCrae 4cdfa7bdd5 retention: Add optional mutex disablement
Adds an optional Kconfig to disable use of mutexes in the
retention subsystem.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Jamie McCrae 5e8b067364 dfu: mcuboot_shell: Add command to enter serial recovery
Adds a command which can be used to enter mcuboot's serial recovery
mode when the retention subsystem is enabled.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Jamie McCrae 7e11b6392b retention: Add boot mode system
Adds a boot mode system which allows for redirecting the boot
target of a device depending upon the state of a retained value.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Jamie McCrae 64f4404481 retention: Add retention system
Adds a retention system which builds on top of retained_mem
drivers to allow partitioning of areas and data integrity with
magic header prefixes and checksum of stored data.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00