diff options
author | Vijay Dandiga <vijay.dandiga@linaro.org> | 2014-09-17 03:29:18 +0530 |
---|---|---|
committer | Vijay Dandiga <vijay.dandiga@linaro.org> | 2014-09-17 03:29:18 +0530 |
commit | 18d5035a75c3a065801cbe078f1478c2a8682432 (patch) | |
tree | bf64581584ee5b637e983c8b192bb82ef2dbff88 /common | |
parent | dc204539c30647750a76724e9040622839f088b7 (diff) |
Adding coresight-test.sh
Signed-off-by: Vijay Dandiga <vijay.dandiga@linaro.org>
Diffstat (limited to 'common')
-rwxr-xr-x | common/scripts/coresight-test.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/common/scripts/coresight-test.sh b/common/scripts/coresight-test.sh new file mode 100755 index 0000000..808e909 --- /dev/null +++ b/common/scripts/coresight-test.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Script to test coresight + +CORESIGHT_PATH="/sys/kernel/debug/coresight" + +ETM=`ls $CORESIGHT_PATH | grep -m 1 etm` +if [ $ETM ] +then +echo "ETM is $ETM" +else +echo "No ETM found" +exit +fi + +ETB=`ls $CORESIGHT_PATH | grep -m 1 etb` +if [ $ETB ] +then +echo "ETB is $ETB" +else +echo "No ETB found" +exit +fi + +wrt_ptr1=`cat $CORESIGHT_PATH/$ETB/status | grep wrt | awk '{print $NF}'` +echo 1 > $CORESIGHT_PATH/$ETM/enable +sleep 1 +echo 0 > $CORESIGHT_PATH/$ETM/enable +wrt_ptr2=`cat $CORESIGHT_PATH/$ETB/status | grep wrt | awk '{print $NF}'` + +#echo $wrt_ptr1 +#echo $wrt_ptr2 + +echo +if [ $wrt_ptr1 == $wrt_ptr2 ] +then +echo "coresight write FAIL" +else +echo "coresight write SUCCESS" +fi +echo + + + + |