diff --git a/snippets/nordic-log-stm/README.rst b/snippets/nordic-log-stm/README.rst new file mode 100644 index 00000000000..9af46467b8b --- /dev/null +++ b/snippets/nordic-log-stm/README.rst @@ -0,0 +1,11 @@ +.. _nordic-log-stm: + +Nordic Standalone STM logging snippet (nordic-log-stm) +###################################################### + +Overview +******** + +This snippet allows users to build Zephyr with the logging to the Coresight STM +stimulus ports. Data is collected in ETR buffer. Data from ETR buffer is +decoded and human-readable data is output on the UART. diff --git a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.conf b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.conf new file mode 100644 index 00000000000..b4d9d63f77c --- /dev/null +++ b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.conf @@ -0,0 +1 @@ +CONFIG_UART_ASYNC_API=y diff --git a/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay new file mode 100644 index 00000000000..bedc93411c9 --- /dev/null +++ b/snippets/nordic-log-stm/boards/nrf54h20_cpuapp.overlay @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * SPDX-License-Identifier: Apache-2.0 + */ + +&tbm { + status = "okay"; +}; + +&tddconf { + status = "okay"; + stmsink = "etr"; + portconfig = <0>; +}; diff --git a/snippets/nordic-log-stm/log_stm.conf b/snippets/nordic-log-stm/log_stm.conf new file mode 100644 index 00000000000..1325c25b505 --- /dev/null +++ b/snippets/nordic-log-stm/log_stm.conf @@ -0,0 +1,6 @@ +CONFIG_LOG=y +CONFIG_TEST_LOGGING_DEFAULTS=n +CONFIG_LOG_FRONTEND=y +CONFIG_LOG_FRONTEND_ONLY=y +CONFIG_LOG_FRONTEND_STMESP=y +CONFIG_LOG_FRONTEND_STMESP_FSC=y diff --git a/snippets/nordic-log-stm/snippet.yml b/snippets/nordic-log-stm/snippet.yml new file mode 100644 index 00000000000..1cd65087bcc --- /dev/null +++ b/snippets/nordic-log-stm/snippet.yml @@ -0,0 +1,8 @@ +name: nordic-log-stm +append: + EXTRA_CONF_FILE: log_stm.conf +boards: + /.*/nrf54h20/cpuapp/: + append: + EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpuapp.overlay + EXTRA_CONF_FILE: boards/nrf54h20_cpuapp.conf