Skip to content

Conversation

@alxelax
Copy link
Contributor

@alxelax alxelax commented Jul 31, 2025

This PR replaces the legacy, single-partition EMDS with a production-ready, dual-partition snapshot scheme.

  • The configured flash area is split in two. Each store writes to the pre-selected partition; on boot EMDS scans both partitions and picks the freshest snapshot, giving atomic updates, rollback safety and lower worst-case erase latency.
  • Updated prepare -> store -> clear -> load flow. Old symbols have been removed.

Robustness fixes:

  • Guards against duplicate entry IDs or length mismatches
  • Corrected buffered-write sizing for RRAM targets
  • Internal timing of each store operation, with unit tests upgraded for more precision.

Other updates:

  • Bluetooth Mesh “Light Control” sample, all EMDS unit tests, CI tests, docs, and helper scripts are migrated and tests taken out of quarantine.

@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Jul 31, 2025
@alxelax alxelax marked this pull request as ready for review July 31, 2025 13:10
@alxelax alxelax requested review from a team, Balaklaka, nordicjm and tejlmand as code owners July 31, 2025 13:10
@alxelax alxelax added this to the 3.1.0 milestone Jul 31, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jul 31, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 11

Inputs:

Sources:

sdk-nrf: PR head: 37244c2788f90b02e121ae6b1ee65b8a7d0036d6

more details

sdk-nrf:

PR head: 37244c2788f90b02e121ae6b1ee65b8a7d0036d6
merge base: a1ed9f6e92c0626fa0b6951447fb2ecfa07b885e
target head (main): a1ed9f6e92c0626fa0b6951447fb2ecfa07b885e
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (14)
doc
│  ├── nrf
│  │  ├── libraries
│  │  │  ├── others
│  │  │  │  │ emds.rst
include
│  ├── emds
│  │  │ emds.h
samples
│  ├── bluetooth
│  │  ├── mesh
│  │  │  ├── light_ctrl
│  │  │  │  ├── overlay-emds.conf
│  │  │  │  ├── sample.yaml
│  │  │  │  ├── src
│  │  │  │  │  │ main.c
subsys
│  ├── emds
│  │  ├── Kconfig
│  │  ├── emds.c
│  │  ├── emds_flash.c
│  │  │ emds_flash.h
│  ├── partition_manager
│  │  │ pm.yml.emds
tests
│  ├── subsys
│  │  ├── emds
│  │  │  ├── emds_api
│  │  │  │  ├── prj.conf
│  │  │  │  ├── src
│  │  │  │  │  │ main.c
│  │  │  ├── emds_flash
│  │  │  │  ├── prj.conf
│  │  │  │  ├── src
│  │  │  │  │  │ main.c

Outputs:

Toolchain

Version: 11ad62c2a5
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:11ad62c2a5_bba2ea5f2e

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
  • ✅ Integration tests
    • ✅ test-sdk-audio
    • ✅ desktop52_verification
    • ✅ test-fw-nrfconnect-apps
    • ✅ test_ble_nrf_config
    • ✅ test-fw-nrfconnect-ble_mesh
    • ✅ test-fw-nrfconnect-ble_samples
    • ✅ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-nfc
    • ✅ test-fw-nrfconnect-nrf-iot_cloud
    • ✅ test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • ✅ test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • ✅ test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • ✅ test-fw-nrfconnect-nrf-iot_samples
    • ✅ test-fw-nrfconnect-nrf-iot_lwm2m
    • ✅ doc-internal
    • ✅ test-fw-nrfconnect-nrf-iot_thingy91
    • ✅ test-fw-nrfconnect-nrf_crypto
    • ✅ test-fw-nrfconnect-rpc
    • ✅ test-fw-nrfconnect-rs
    • ✅ test-fw-nrfconnect-fem
    • ✅ test-fw-nrfconnect-tfm
    • ✅ test-fw-nrfconnect-thread-main
    • ✅ test-sdk-find-my
    • ✅ test-fw-nrfconnect-nrf_lrcs_mosh
    • ✅ test-fw-nrfconnect-nrf_lrcs_positioning
    • ✅ test-sdk-wifi
    • ✅ test-low-level
    • ✅ test-sdk-pmic-samples
    • ✅ test-sdk-mcuboot
    • ✅ test-sdk-dfu
    • ✅ test-fw-nrfconnect-ps-main
    • ✅ test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@alxelax alxelax force-pushed the collab-emds-next-copy branch from 738510e to 610b95f Compare July 31, 2025 14:02
@alxelax alxelax requested a review from peknis July 31, 2025 14:03
@github-actions
Copy link

github-actions bot commented Jul 31, 2025

You can find the documentation preview for this PR here.

Preview links for modified nRF Connect SDK documents:

https://ncsdoc.z6.web.core.windows.net/PR-23602/nrf/libraries/others/emds.html

@alxelax alxelax force-pushed the collab-emds-next-copy branch 2 times, most recently from 94f9251 to 2f6b762 Compare July 31, 2025 16:27
@alxelax alxelax requested a review from nordicjm July 31, 2025 16:40
@alxelax alxelax force-pushed the collab-emds-next-copy branch from 2f6b762 to 70744ab Compare July 31, 2025 16:42
@omkar3141 omkar3141 self-requested a review July 31, 2025 17:47
@alxelax alxelax force-pushed the collab-emds-next-copy branch 2 times, most recently from 253244f to b690f8d Compare August 1, 2025 08:52
@alxelax alxelax requested a review from de-nordic August 1, 2025 08:53
@alxelax alxelax force-pushed the collab-emds-next-copy branch from b690f8d to d150947 Compare August 1, 2025 10:12
@alxelax
Copy link
Contributor Author

alxelax commented Aug 1, 2025

I removed support nrf52dk/nrf52832 for ble mesh light_ctrl sample with emds. emds doesn't support this platform since it does not have partial erase.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 1, 2025

Memory footprint analysis revealed the following potential issues

applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 9090[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 5846[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 12430[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 9178[B] - link (cc: @nrfconnect/ncs-ll-ursus)

Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-23602/11)

@alxelax
Copy link
Contributor Author

alxelax commented Aug 4, 2025

@nordicjm, please review it.

Comment on lines +43 to +46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a gcc extension and should not be used, use a memset instead

Copy link
Contributor Author

@alxelax alxelax Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as seems to be usable from clang

@alxelax alxelax requested a review from nordicjm August 4, 2025 07:28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this change is for the 3.1.0 release, please remove these changelog entries from this PR and add a comment on PR #23631 after this PR is merged.
Also, add the backport label.

@alxelax
Copy link
Contributor Author

alxelax commented Aug 4, 2025

Hi @Balaklaka and @PaalKastnes, seems this PR wasn't merged before RC 3.1.0 has been created.
Seems more changes requests are added. How important to add next emds in v3.1.0?

FYI @shanthanordic

@alxelax alxelax force-pushed the collab-emds-next-copy branch from d150947 to 00740fd Compare August 4, 2025 20:03
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Aug 4, 2025
@alxelax alxelax requested a review from divipillai August 4, 2025 20:03
@alxelax alxelax force-pushed the collab-emds-next-copy branch from 00740fd to 59dbc5b Compare August 4, 2025 21:38
alxelax added 3 commits August 5, 2025 09:14
Commit:

   - adds next emds implementation
   - adapts emds api test to the new emds
   - adapts emds flash test to the new emds
   - adapts ble mesh light_ctrl sample to the new emds

Signed-off-by: Aleksandr Khromykh <[email protected]>
Signed-off-by: Stine Åkredalen <[email protected]>
Commit removes experimental tag.

Signed-off-by: Aleksandr Khromykh <[email protected]>
Commit adapts emds documentation to the new emds.

Signed-off-by: Aleksandr Khromykh <[email protected]>
@alxelax alxelax force-pushed the collab-emds-next-copy branch from 59dbc5b to 37244c2 Compare August 5, 2025 07:14
@alxelax alxelax removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Aug 5, 2025
@carlescufi carlescufi merged commit df280f2 into nrfconnect:main Aug 5, 2025
16 checks passed
@alxelax alxelax mentioned this pull request Aug 5, 2025
3 tasks
@alxelax alxelax deleted the collab-emds-next-copy branch August 6, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport v3.1-branch doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants