Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: allow storing log history in flash #20167

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Damian-Nordic
Copy link
Contributor

  • When CONFIG_LOG_BACKEND_RPC_HISTORY_STORAGE_FCB option is set, define the "log_history" flash partition and enable storing the log history using Flash Circular Buffer.
  • samples: nrf_rpc: ps_server: enable partition manager

@Damian-Nordic Damian-Nordic requested review from a team as code owners February 3, 2025 18:12
@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 Feb 3, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Feb 3, 2025

CI Information

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

Inputs:

Sources:

sdk-nrf: PR head: 562b8ac2d64e9475cce38972a971edb0331ad71a

more details

sdk-nrf:

PR head: 562b8ac2d64e9475cce38972a971edb0331ad71a
merge base: 5561499561f6b0a1a03790155ece7b7c65dce003
target head (main): 5561499561f6b0a1a03790155ece7b7c65dce003
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 (10)
samples
│  ├── nrf_rpc
│  │  ├── protocols_serialization
│  │  │  ├── server
│  │  │  │  ├── Kconfig
│  │  │  │  ├── boards
│  │  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp.conf
│  │  │  │  ├── prj.conf
│  │  │  │  ├── snippets
│  │  │  │  │  ├── ble
│  │  │  │  │  │  │ ble.conf
│  │  │  │  │ sysbuild.conf
subsys
│  ├── logging
│  │  ├── CMakeLists.txt
│  │  ├── Kconfig
│  │  │ log_backend_rpc_history_fcb.c
│  ├── partition_manager
│  │  ├── CMakeLists.txt
│  │  │ pm.yml.log_history

Outputs:

Toolchain

Version: 342151af73
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:342151af73_912848a074

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-boot
    • ❌ 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_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
    • ✅ test-fw-nrfconnect-zigbee
    • ✅ test-sdk-find-my
    • ✅ test-fw-nrfconnect-nrf-iot_mosh
    • ✅ test-fw-nrfconnect-nrf-iot_positioning
    • ✅ test-sdk-sidewalk
    • ✅ test-sdk-wifi
    • ✅ test-low-level
    • ✅ test-sdk-pmic-samples
    • ✅ test-sdk-mcuboot
    • ✅ test-sdk-dfu
    • ✅ test-fw-nrfconnect-ps
    • ✅ test-secdom-samples-public
    • ⚠️ test-fw-nrfconnect-fw-update
    • ⚠️ test-fw-nrfconnect-nrf-iot_cloud

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

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

zephyr_library_sources_ifdef(CONFIG_LOG_BACKEND_RPC_HISTORY_STORAGE_FCB log_backend_rpc_history_fcb.c)
endif()

if (CONFIG_PARTITION_MANAGER_ENABLED AND CONFIG_LOG_BACKEND_RPC_HISTORY_STORAGE_FCB)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (CONFIG_PARTITION_MANAGER_ENABLED AND CONFIG_LOG_BACKEND_RPC_HISTORY_STORAGE_FCB)
if(CONFIG_PARTITION_MANAGER_ENABLED AND CONFIG_LOG_BACKEND_RPC_HISTORY_STORAGE_FCB)

Copy link
Contributor

Choose a reason for hiding this comment

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

and this should not be here, it should be in the subsys/partition_manager folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,7 @@
#include <zephyr/autoconf.h>

log_history:
Copy link
Contributor

Choose a reason for hiding this comment

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

move file to other folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

We need partition manager to easily add a partition for
storing the log history on demand.

Signed-off-by: Damian Krolik <[email protected]>
When CONFIG_LOG_BACKEND_RPC_HISTORY_STORAGE_FCB option
is set, define the "log_history" flash partition and enable
storing the log history using Flash Circular Buffer.

Signed-off-by: Damian Krolik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants