How can I test the System Trace Macrocell (STM) component?

Hi,

I would like to test the System Trace Macrocell component on the board, but probably I am overlooking something. I am trying out the steps mentioned at https://lists.linaro.org/pipermail/coresight/2018-August/001653.html.

I recompiled the kernel with the configuration flags for STM and FTRACE enabled. Also I patched the device tree file msm8916.dtsi to include STM.

The following commands from the steps in the post linked above work fine:

$ echo 1 > /sys/devices/platform/soc/825000.etf/tmc_etf0/enable_sink
$ echo 1 > /sys/devices/platform/soc/802000.stm/stm0/enable_source
$ echo function > /sys/kernel/debug/tracing/current_tracer
$ echo schedule > /sys/kernel/debug/tracing/set_ftrace_filter

However the following fails:

$ echo 802000.stm  > /sys/devices/virtual/stm_source/console/stm_source_link
bash: echo: write error: Invalid argument
$ echo stm  > /sys/devices/virtual/stm_source/console/stm_source_link
bash: echo: write error: Invalid argument
$ echo stm0  > /sys/devices/virtual/stm_source/console/stm_source_link
bash: echo: write error: Invalid argument

(Executed the commands as root user)

Does anyone have experience with STM on the board that can point me in the right direction?

Thank you,
Enes

By installing an older kernel version (4.14) used in Linaro Linux release 18.01 [1] I was able to execute all steps from [2] successfully.

[1] https://releases.linaro.org/96boards/dragonboard410c/linaro/debian/18.01/
[2] https://lists.linaro.org/pipermail/coresight/2018-August/001653.html

Hi Enes,

I have replied you on the CoreSight mailing list, so just give the link at here in case other developers have the same question: