Hi @1209762583 .
Please refer below steps:
Host Side (Ubuntu)
- Sync the L4T source tree for the target Jetson release:
cd Linux_for_Tegra/source
./source_sync.sh -t jetson_36.4.3
- Apply the CoreSight kernel patch to enable trace support:
cd Linux_for_Tegra/source/kernel/kernel-jammy-src
git apply coresight.patch
- Apply the device-tree overlay patch for CoreSight nodes:
cd Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public
git apply overlay.patch
-
Drop in the CoreSight SoC device-tree include:
- Add
tegra234-soc-coresight.dtsiintoLinux_for_Tegra/source/hardware/nvidia/t23x/nv-public/nv-soc/.
- Add
-
Build the
Jetson Linux Kernel,NVIDIA Out-of-Tree Modules, andDTBsby following the Kernel Customization guide. -
Enable non-secure debug access in BCT (slot B) by editing
Linux_for_Tegra/bootloader/generic/BCT/tegra234-br-bct_b-p3767-0000-l4t.dts:
- SecureDebugControlNoneEcid = <0x0>;
+ SecureDebugControlNoneEcid = <0x10>;
- Apply the same BCT change to the primary slot in
Linux_for_Tegra/bootloader/generic/BCT/tegra234-br-bct-p3767-0000-l4t.dts:
- SecureDebugControlNoneEcid = <0x0>;
+ SecureDebugControlNoneEcid = <0x10>;
- Flash the device
Target Device (Jetson Orin Nano)
- Ensure the running kernel is built with CoreSight enabled. Verify options (example from a working build):
$ zgrep CORESIGHT /proc/config.gz
CONFIG_CORESIGHT=y
CONFIG_CORESIGHT_LINKS_AND_SINKS=y
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
# CONFIG_CORESIGHT_CATU is not set
# CONFIG_CORESIGHT_SINK_TPIU is not set
# CONFIG_CORESIGHT_SINK_ETBV10 is not set
CONFIG_CORESIGHT_SOURCE_ETM4X=y
CONFIG_CORESIGHT_STM=y
# CONFIG_CORESIGHT_CPU_DEBUG is not set
# CONFIG_CORESIGHT_CTI is not set
# CONFIG_CORESIGHT_TRBE is not set
- Confirm CoreSight devices are exposed under sysfs:
$ ls /sys/bus/coresight/devices
etm0 etm1 etm2 etm3 etm4 etm5 funnel0 funnel1 funnel2 funnel3 funnel4 stm0 tmc_etf0
- Follow the forum topic to build perf with the CoreSight Embedded Trace Extension.
- Run a minimal perf trace test (adjust CPU and sink name to match your system):
sudo perf record -m 32768 -o perf.data -e cs_etm/@tmc_etf0/ -C 0 -- taskset -c 0 sleep 1
sudo perf report -D -i perf.data
Thanks
coresight.patch (1.2 KB)
overlay.patch (1.1 KB)
tegra234-soc-coresight.dtsi (11.2 KB)