NVIDIA Tegra Tegra Linux Driver Package
Development Guide
October 20, 2016 | 21.5 Release

 
Lauterbach Debugging Scripts
 
Setting Up the Lauterbach Debugging Scripts Environment
The following table describes the Lauterbach scripts supplied with this release.
Script
Description
adsp_attach.cmm
Configures to attach to aDSP but otherwise do not change the system state
adsp_kernel_attach.cmm
Attaches to aDSP with OS symbols loaded
adsp_menu_setup.cmm
Installs on start-up aDSP-side menu buttons
avp_attach.cmm
Attaches the AVP
avp_boot_attach.cmm
Attaches the AVP for Ethernet boot
avp_boot_ml.cmm
Attach to AVP for mini-loader debug
avp_boot_tb.cmm
Debugs TegraBoot binary loaded into IRAM by this script
avp_init_cpu.cmm
Powers the up the CPU from the AVP
avp_menu_setup.cmm
Installs AVP-side menu buttons
avp_power_cpu.cmm
Powers the up the CPU from the AVP
avp_uboot_attach.cmm
Boots AVP with U-BOOT loaded into SDRAM by this script without resetting the chip
config_avp.t32
Provides environment variable settings
config_cpu.t32
Provides environment variable settings
config_cpu_win.t32
Provides environment variable settings
cpu_attach.cmm
Attaches to CPU on Tegra <platform> BSP for kernel
cpu_boot_sdram_noload.cmm
Boots CPU with various configurations
cpu_boot_attach.cmm
Attaches to CPU on Tegra <platform> BSP for Ethernet boot
cpu_dcc_setup.cmm
cpu_dcc_swi_setup.cmm
Configures DCC for the CPU
cpu_disable_mmu.cmm
Disables the CPU MMU and caches
cpu_kernel_attach.cmm
Attaches to CPU with kernel symbols loaded
cpu_lk.cmm
Reconfigures for boot loader-to-kernel hand-off
cpu_menu_setup.cmm
Installs CPU-side menu buttons
cpu_mp_attach.cmm
Sets up CPU for complex core/multiprocessor settings
cpu_uboot-attach.cmm
Boots CPU on with U-Boot already present in SDRAM
csite_cpu.cmm
Dumps CoreSight CPU apertures
install_customer_scripts
Installs scripts to the $T32SYS (Android) C:\T32 (Windows) directory, and then prompts the user to customize the configuration script
physical_setup.cmm
Reconfigures for boot loader physical addressing mode
setup_customer_environment.cmm
Sets up paths and global environment variables used by other scripts
t32.cmm
Initializes TRACE32
t32_customer.cmm
Default startup program for TRACE32
t32adsp
Specifies TRACE32 instance is aDSP for start up
t32avp
Specifies TRACE32 instance is AVP for start up
t32cpu
Specifies TRACE32 instance is CPU for start up
toolbar_setup.cmm
Sets up common toolbar items
user_config_customer.cmm
Sets user-specific parameters, such as script variables
virtual_setup.cmm
Reconfigures virtual addressing mode for kernel
windows.cmm
Provides Windows settings
t21x/t21x_adsp_jtag_setup.cmm
Configures JTAG for the aDSP
Setting Up the Lauterbach Debugging Scripts Environment
Four sets of commands must be run to set up the environment to execute the Lauterbach scripts. These are detailed below.
To setup to run Lauterbach
1. Add these variables to ~/.bashrc:
$ export T32SYS=<directory you chose as your Trace32 install directory>
$ export T32TMP=/tmp
$ export T32ID=T32
$ export PATH=$PATH:$T32SYS/bin/pc_linux:$T32SYS
2. In your build directory, set the following:
$ export TEGRA_TOP=$(pwd)
$ export TARGET_BOARD=t210ref
$ export TARGET_OS_SUBTYPE=gnu_linux
3. Download the tar ball of Lauterbach scripts from the link to them under the "Downloads" button and extract them.
The correct paths for zImage and vmlinux are setup in the user_config_customer.cmm script.
4. Copy the required files to your t32 directory:
$ cd $TEGRA_TOP/lauterbachscripts
$ sudo -E ./install_customer_scripts
$ cp user_config_customer.cmm /opt/t32/user_config.cmm
$ cp ./setup_customer_environment.cmm ./setup_environment.cmm
5. Execute the following command on the host system:
$ t32cpu &
6. Execute the following commands on the device:
$ echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
$ echo 1 > /sys/kernel/debug/cpuidle_t210/fast_cluster_states_enable
$ echo 1 > /sys/kernel/debug/cpuidle_t210/slow_cluster_states_enable