DM8168 DM8148 Debugging Techniques

From RidgeRun Developer Connection
Jump to: navigation, search
PAGE UNDER CONSTRUCTION

Introduction

This wiki describes different debugging techniques for the DM8168 and DM818 SoC. In general, it summarizes how to enable and access the different debug logging capabilities of the BSP. For this wiki, it is assumed that the boards are running RidgeRun's professional SDK.

For more information on RidgeRun's SDK and advanced debugging and troubleshooting contact support@ridgerun.com

VPSS kernel debug

The Video Processing Subsystem kernel module is equipped with debug prints which can provide further information about the state of the subsystem. You can enable it by:

1. Build module with debug support

Make sure its selected in the configuration menu

~# cd $DEVDIR
~# make config
   '-> Kernel Configuration
       '-> Device Drivers
           '-> Graphics Support
               '-> TI81XX Video Processing Subsystem (EXPERIMENTAL)
                   '-> [*] Debug Support

If the option was not selected, then you will need to build and install the kernel for the changes to apply.

2. Pass the debug option to the module parameters

The VPSS kernel module is inserted into the kernel by the coprocessors script. This script is located in the target's root file system at

/etc/init.d/coprocessors

Look for the line where the vpss module is loaded and change it to

--- a/coprocessors
+++ b/coprocessors
@@ -47,7 +47,7 @@ start)
        sleep 1
        if [ -f /lib/modules/@KERNELVERSION@/kernel/drivers/video/ti81xx/vpss/vpss.ko ] ; then
            rmmod vpss 2>/dev/null || true
-           modprobe vpss sbufaddr=0xBFB00000 i2c_mode=@I2C_MODE@
+           modprobe vpss sbufaddr=0xBFB00000 i2c_mode=@I2C_MODE@ debug=1
        fi
        if [ -f /lib/modules/@KERNELVERSION@/kernel/drivers/video/ti81xx/ti81xxfb/ti81xxfb.ko ] ; then
            rmmod ti81xxfb 2>/dev/null || true

The changes will apply the next time you reboot the board.

Note that this is a temporal change and will be reverted if you rebuild the ezsdk. To perform a permanent change, apply the previous change to the file in

$DEVDIR/proprietary/ezsdk-5_05_02_00/coprocessors.init.in

and rebuild and reinstall the ezsdk.

To verify that debug is enabled you can run on your target board

~# cat /sys/module/vpss/parameters/debug
   Y

3. Enable debug prints from the kernel

By now, the module will already print debug logging, but the kernel will hide it from you to avoid cluttering your monitor. You can always view these outputs by running

~# dmesg

If you want the debug logs to be printed append debug=8 to your bootargs. For a temporal test, you can add it to the file in

$DEVDIR/images/cmdline

and reinstall the SDK.

For a permanent change consider adding it to the option in

~# cd $DEVDIR
make config
'-> Kernel configuration
   '-> *** Extra parameters to pass to kernel boot args ***

SysLink kernel debug

SysLink kernel module is equipped with debug traces which can provide further information about the state of the subsystem. You can enable it by:

1. Build module with debug support

Make sure its selected in the configuration menu

~# cd $DEVDIR
~# make config
   '-> Proprietary software
       '-> [*] SysLink debug traces

If the option was not selected, then you will need to build and install the EZSDK for the changes to apply.

If you are not using RidgeRun's SDK, you can modify the Makefile directly as the following

ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/Makefile
--- a/Makefile	2013-11-15 14:25:45.817645487 -0600
+++ b/Makefile	2012-09-29 23:03:17.000000000 -0600
@@ -55,8 +55,8 @@
 SYSLINK_PLATFORM :=
 SYSLINK_LOADER :=
 SYSLINK_BUILDOS_LINUX :=
-SYSLINK_BUILD_DEBUG := 
-SYSLINK_TRACE_ENABLE := 
+SYSLINK_BUILD_DEBUG := 1
+SYSLINK_TRACE_ENABLE := 1
 
 MODULE := syslink
 $(MODULE)-objs := NameServerDrv.o


2. Pass the debug option to the module parameters

The SysLink kernel module is inserted into the kernel by the coprocessors script. This script is located in the target's root file system at

/etc/init.d/coprocessors

Look for the line where the vpss module is loaded and change it to

--- a/coprocessors
+++ b/coprocessors
@@ -31,7 +31,7 @@ start)
        fi
        if [ -f /lib/modules/2.6.37-ridgerun/kernel/drivers/dsp/syslink.ko ] ; then
            rmmod syslink 2>/dev/null || true
-           modprobe syslink
+           modprobe syslink TRACE=1 TRACEFAILURE=1 TRACECLASS=3
        fi
        if [ -f /lib/firmware/dm816x_hdvicp_mjpeg.xem3 ] ; then
            firmware_loader $HDVICP2_ID  /lib/firmware/dm816x_hdvicp_mjpeg.xem3 start -i2c 0

Note that this is a temporal change and will be reverted if you rebuild the ezsdk. To perform a permanent change, apply the previous change to the file in

$DEVDIR/proprietary/ezsdk-5_05_02_00/coprocessors.init.in

and rebuild and reinstall the ezsdk.

Visit TI's documentation for particular debug configurations

http://processors.wiki.ti.com/index.php/SysLink_UserGuide#Trace.2C_debug_and_build_configuration