Skip to content

Commit cdfe569

Browse files
committed
snippets: nordic-log-stm-tpiu-dict: Added
Added a new convience snippet to redirect logs to STM and then sink them to TPIU where they can be captured by a trace probe. Signed-off-by: Karsten Koenig <[email protected]>
1 parent 3fcf409 commit cdfe569

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

samples/boards/nordic/coresight_stm/sample.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ tests:
2222
- SB_CONFIG_APP_CPUPPR_RUN=y
2323
- SB_CONFIG_APP_CPUFLPR_RUN=y
2424

25+
sample.boards.nrf.coresight_stm.tpiu.dict:
26+
required_snippets:
27+
- nordic-log-stm-tpiu-dict
28+
extra_args:
29+
- SB_CONFIG_APP_CPUPPR_RUN=y
30+
- SB_CONFIG_APP_CPUFLPR_RUN=y
31+
2532
sample.boards.nrf.coresight_stm:
2633
harness: pytest
2734
harness_config:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _nordic-log-stm-tpiu-dict:
2+
3+
Nordic Dictionary-based STM to TPIU logging snippet (nordic-log-stm-tpiu-dict)
4+
##############################################################################
5+
6+
Overview
7+
********
8+
9+
This snippet allows users to build Zephyr with the dictionary-based logging to
10+
the Coresight STM stimulus ports. Data is written to the TPIU interface and can
11+
be captured with nrfutil trace to translate into a human-readable format.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&coresight {
7+
status = "okay";
8+
mode = "stm-tpiu";
9+
pinctrl-0 = <&tpiu_default>;
10+
pinctrl-names = "default";
11+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_LOG=y
2+
CONFIG_TEST_LOGGING_DEFAULTS=n
3+
CONFIG_LOG_FRONTEND=y
4+
CONFIG_LOG_FRONTEND_ONLY=y
5+
CONFIG_LOG_FRONTEND_STMESP=y
6+
CONFIG_DEBUG_DRIVER=y
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: nordic-log-stm-tpiu-dict
2+
append:
3+
EXTRA_CONF_FILE: log_stm_dict.conf
4+
boards:
5+
/.*/nrf54h20/cpuapp/:
6+
append:
7+
EXTRA_DTC_OVERLAY_FILE: boards/nrf54h20_cpuapp.overlay

0 commit comments

Comments
 (0)