How to enable ETM in VIM1

I have read the S905X spec, and it say that S905X support Coresight and ETMv4. And I want to try autodfo in linux,and I found that there isn’t any information related with ETM in DTS.

I beg someone could help me, and tell me how I can enable ETM in vim1.

The linux source code base I used is the linux mainline 6.3. Any comments are appreciated.

Hi @uulinux
VIM1 doesn’t possess any interface to debug the SoC like JTAG or other to interface with the ETM

@Electr1 , Thanks for your replay.

Actually, I want to enable autofdo on VIM1. So, I have enabled some configure of kernel.

CONFIG_CORESIGHT=y
CONFIG_CORESIGHT_LINKS_AND_SINKS=y
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
CONFIG_CORESIGHT_CATU=y
CONFIG_CORESIGHT_SINK_TPIU=y
CONFIG_CORESIGHT_SINK_ETBV10=y
CONFIG_CORESIGHT_SOURCE_ETM4X=y
CONFIG_CORESIGHT_STM=y
CONFIG_CORESIGHT_CPU_DEBUG=y
CONFIG_CORESIGHT_CPU_DEBUG_DEFAULT_ON=y
CONFIG_CORESIGHT_CTI=y
CONFIG_CORESIGHT_CTI_INTEGRATION_REGS=y

But there is nothing under “/sys/bus/coresight/devices/” for there isn’t ETM configure in DTS.

So, I want to etm configure of dts.

Hello @uulinux

Are you sure you have added this configs successfully? e.g. you can check with command below:

zcat /proc/config.gz | grep CONFIG_CORESIGHT

Hello @numbqq ,

Thanks for your reply. And I am sure that I have enabled CONFIG_CORESIGHT. And the follow is the result of zcat /proc/config.gz | grep CORESIGHT

CONFIG_CORESIGHT=y
CONFIG_CORESIGHT_LINKS_AND_SINKS=y
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
CONFIG_CORESIGHT_CATU=y
CONFIG_CORESIGHT_SINK_TPIU=y
CONFIG_CORESIGHT_SINK_ETBV10=y
CONFIG_CORESIGHT_SOURCE_ETM4X=y
CONFIG_CORESIGHT_STM=y
CONFIG_CORESIGHT_CPU_DEBUG=y
CONFIG_CORESIGHT_CPU_DEBUG_DEFAULT_ON=y
CONFIG_CORESIGHT_CTI=y
CONFIG_CORESIGHT_CTI_INTEGRATION_REGS=y

In my understanding, the reason of couldn’t is that the coresight driver have enabled, but there isn’t device in dtb.