diff options
author | Jacob Stiffler <j-stiffler@ti.com> | 2015-05-19 18:51:22 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2015-06-01 10:32:35 -0400 |
commit | fb67ece977563192a42fb14ab9ae3311205e63a3 (patch) | |
tree | 0829ace60ed477273c920a2da7d304806a6f72a3 | |
parent | b4181e7346f9e4732f801740c22d9f4109254656 (diff) | |
download | meta-ti-fb67ece977563192a42fb14ab9ae3311205e63a3.tar.gz |
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>
-rw-r--r-- | recipes-devtools/gdbc6x/gdbc6x/init | 48 | ||||
-rw-r--r-- | recipes-devtools/gdbc6x/gdbc6x_git.bb | 44 |
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 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | GDB_DEVICE_NAME='/dev/gdbtty$i' | ||
4 | DSP_FIRMWARE_NAME='/lib/firmware/dra7-dsp$[$i+1]-fw.xe66' | ||
5 | |||
6 | DSP_L2_GLOBAL_OFFSET="40000000" | ||
7 | DSP_L2_GLOBAL_SHIFT="00800000" | ||
8 | |||
9 | case "$1" in | ||
10 | start) | ||
11 | |||
12 | dsp_core_l2_offset=$DSP_L2_GLOBAL_OFFSET | ||
13 | |||
14 | i=0 | ||
15 | while [ -c "`eval echo $GDB_DEVICE_NAME`" ] | ||
16 | do | ||
17 | dsp_firmware=`eval echo $DSP_FIRMWARE_NAME` | ||
18 | |||
19 | if [ -f "`eval echo $DSP_FIRMWARE_NAME`" ] | ||
20 | then | ||
21 | eval echo "Initializing $GDB_DEVICE_NAME based on $DSP_FIRMWARE_NAME ..." | ||
22 | |||
23 | gdb_data_local=`eval readelf -s "$DSP_FIRMWARE_NAME" | \ | ||
24 | grep 'gdb_globalData' | \ | ||
25 | awk '{print $2}'` | ||
26 | |||
27 | echo "gdb_globalData (local) = $gdb_data_local" | ||
28 | printf "gdb_globalData (global) = %X\n" \ | ||
29 | $[0x$gdb_data_local + 0x$dsp_core_l2_offset] | ||
30 | |||
31 | |||
32 | printf "%X\n" $[0x$gdb_data_local + 0x$dsp_core_l2_offset] \ | ||
33 | >> `eval echo $GDB_DEVICE_NAME` | ||
34 | fi | ||
35 | i=$[$i + 1] | ||
36 | dsp_core_l2_offset=`printf "%X" $[0x$dsp_core_l2_offset + 0x$DSP_L2_GLOBAL_SHIFT]` | ||
37 | done | ||
38 | ;; | ||
39 | stop) | ||
40 | # Nothing to be done. | ||
41 | ;; | ||
42 | *) | ||
43 | echo "Usage: $0 {start|stop}" | ||
44 | exit 1 | ||
45 | ;; | ||
46 | esac | ||
47 | |||
48 | |||
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 @@ | |||
1 | DESCRIPTION = "GNU debugger for TI C6X DSP." | ||
2 | SECTION = "devel" | ||
3 | LICENSE = "GPLv3+" | ||
4 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=bf0fe2872eb3dfeebb2cbe38206fe81f" | ||
5 | |||
6 | DEPENDS = "ncurses bison texinfo flex gettext" | ||
7 | |||
8 | PR = "${INC_PR}.0" | ||
9 | |||
10 | SRC_URI_append = " \ | ||
11 | file://init \ | ||
12 | " | ||
13 | |||
14 | S = "${WORKDIR}/git/gdbc6x" | ||
15 | |||
16 | inherit update-rc.d | ||
17 | inherit gettext | ||
18 | |||
19 | do_configure () { | ||
20 | cd ${S} | ||
21 | ./configure --program-suffix=c6x --target=tic6x-elf-tirtos --host=${HOST_SYS} --prefix=${S}/install_gdb | ||
22 | } | ||
23 | |||
24 | do_install () { | ||
25 | make install | ||
26 | |||
27 | # Custom install to prevent conflict with standard GDB. | ||
28 | install -d ${D}${bindir} | ||
29 | install -d ${D}${includedir} | ||
30 | install -m 755 ${S}/install_gdb/bin/gdbc6x ${D}${bindir} | ||
31 | cp -rf ${S}/install_gdb/include/* ${D}${includedir} | ||
32 | |||
33 | install -d ${D}${sysconfdir}/init.d | ||
34 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/gdbserverproxy | ||
35 | } | ||
36 | |||
37 | RDEPENDS_${PN} = "gdbserverproxy-module-drv" | ||
38 | |||
39 | include gdbc6x.inc | ||
40 | |||
41 | INITSCRIPT_NAME = "gdbserverproxy" | ||
42 | INITSCRIPT_PARAMS = "defaults 95" | ||
43 | |||
44 | PARALLEL_MAKE = "" | ||