aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gdbc6x
diff options
context:
space:
mode:
authorJacob Stiffler <j-stiffler@ti.com>2015-05-19 18:51:22 +0000
committerDenys Dmytriyenko <denys@ti.com>2015-06-01 10:32:35 -0400
commitfb67ece977563192a42fb14ab9ae3311205e63a3 (patch)
tree0829ace60ed477273c920a2da7d304806a6f72a3 /recipes-devtools/gdbc6x
parentb4181e7346f9e4732f801740c22d9f4109254656 (diff)
downloadmeta-ti-fb67ece977563192a42fb14ab9ae3311205e63a3.tar.gz
meta-ti-fb67ece977563192a42fb14ab9ae3311205e63a3.tar.bz2
meta-ti-fb67ece977563192a42fb14ab9ae3311205e63a3.zip
gdbc6x: Add version 1.1.0
* The gdbc6x utility provides remote gdb capabilities for C6x DSP cores. Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-devtools/gdbc6x')
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/init48
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x_git.bb44
2 files changed, 92 insertions, 0 deletions
diff --git a/recipes-devtools/gdbc6x/gdbc6x/init b/recipes-devtools/gdbc6x/gdbc6x/init
new file mode 100644
index 00000000..90210b82
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/init
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+GDB_DEVICE_NAME='/dev/gdbtty$i'
+DSP_FIRMWARE_NAME='/lib/firmware/dra7-dsp$[$i+1]-fw.xe66'
+
+DSP_L2_GLOBAL_OFFSET="40000000"
+DSP_L2_GLOBAL_SHIFT="00800000"
+
+case "$1" in
+ start)
+
+ dsp_core_l2_offset=$DSP_L2_GLOBAL_OFFSET
+
+ i=0
+ while [ -c "`eval echo $GDB_DEVICE_NAME`" ]
+ do
+ dsp_firmware=`eval echo $DSP_FIRMWARE_NAME`
+
+ if [ -f "`eval echo $DSP_FIRMWARE_NAME`" ]
+ then
+ eval echo "Initializing $GDB_DEVICE_NAME based on $DSP_FIRMWARE_NAME ..."
+
+ gdb_data_local=`eval readelf -s "$DSP_FIRMWARE_NAME" | \
+ grep 'gdb_globalData' | \
+ awk '{print $2}'`
+
+ echo "gdb_globalData (local) = $gdb_data_local"
+ printf "gdb_globalData (global) = %X\n" \
+ $[0x$gdb_data_local + 0x$dsp_core_l2_offset]
+
+
+ printf "%X\n" $[0x$gdb_data_local + 0x$dsp_core_l2_offset] \
+ >> `eval echo $GDB_DEVICE_NAME`
+ fi
+ i=$[$i + 1]
+ dsp_core_l2_offset=`printf "%X" $[0x$dsp_core_l2_offset + 0x$DSP_L2_GLOBAL_SHIFT]`
+ done
+ ;;
+ stop)
+ # Nothing to be done.
+ ;;
+ *)
+ echo "Usage: $0 {start|stop}"
+ exit 1
+ ;;
+esac
+
+
diff --git a/recipes-devtools/gdbc6x/gdbc6x_git.bb b/recipes-devtools/gdbc6x/gdbc6x_git.bb
new file mode 100644
index 00000000..0e6a907c
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x_git.bb
@@ -0,0 +1,44 @@
+DESCRIPTION = "GNU debugger for TI C6X DSP."
+SECTION = "devel"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=bf0fe2872eb3dfeebb2cbe38206fe81f"
+
+DEPENDS = "ncurses bison texinfo flex gettext"
+
+PR = "${INC_PR}.0"
+
+SRC_URI_append = " \
+ file://init \
+"
+
+S = "${WORKDIR}/git/gdbc6x"
+
+inherit update-rc.d
+inherit gettext
+
+do_configure () {
+ cd ${S}
+ ./configure --program-suffix=c6x --target=tic6x-elf-tirtos --host=${HOST_SYS} --prefix=${S}/install_gdb
+}
+
+do_install () {
+ make install
+
+ # Custom install to prevent conflict with standard GDB.
+ install -d ${D}${bindir}
+ install -d ${D}${includedir}
+ install -m 755 ${S}/install_gdb/bin/gdbc6x ${D}${bindir}
+ cp -rf ${S}/install_gdb/include/* ${D}${includedir}
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/gdbserverproxy
+}
+
+RDEPENDS_${PN} = "gdbserverproxy-module-drv"
+
+include gdbc6x.inc
+
+INITSCRIPT_NAME = "gdbserverproxy"
+INITSCRIPT_PARAMS = "defaults 95"
+
+PARALLEL_MAKE = ""