All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Stiffler <j-stiffler@ti.com>
To: Denys Dmytriyenko <denys@ti.com>
Cc: meta-ti@yoctoproject.org
Subject: Re: [PATCH 3/3] gdbc6x: Add version 1.1.0
Date: Mon, 18 May 2015 14:59:14 -0400	[thread overview]
Message-ID: <555A3682.9080808@ti.com> (raw)
In-Reply-To: <20150518175406.GF31845@edge>



On 5/18/2015 1:54 PM, Denys Dmytriyenko wrote:
> On Mon, May 18, 2015 at 01:32:56PM -0400, Jacob Stiffler wrote:
>> * The gdbc6x utility provides remote gdb capabilities for C6x DSP
>>    cores.
>>
>> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
>> ---
>>   recipes-devtools/gdbc6x/gdbc6x/init   |   48 +++++++++++++++++++++++++++++++++
>>   recipes-devtools/gdbc6x/gdbc6x_git.bb |   48 +++++++++++++++++++++++++++++++++
>>   2 files changed, 96 insertions(+)
>>   create mode 100644 recipes-devtools/gdbc6x/gdbc6x/init
>>   create mode 100644 recipes-devtools/gdbc6x/gdbc6x_git.bb
>>
>> diff --git a/recipes-devtools/gdbc6x/gdbc6x/init b/recipes-devtools/gdbc6x/gdbc6x/init
>> new file mode 100644
>> index 0000000..90210b8
>> --- /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 0000000..9fc95fe
>> --- /dev/null
>> +++ b/recipes-devtools/gdbc6x/gdbc6x_git.bb
>> @@ -0,0 +1,48 @@
>> +DESCRIPTION="GNU debugger for TI C6X DSP."
>> +
>> +LICENSE = "GPLv3+"
> Have you run this GPLv3 instance by OSRB yet?
>

This has already gone through the OSRB when this was released for keystone.

>> +SECTION = "devel"
>> +DEPENDS = "expat ncurses readline"
>> +
>> +LIC_FILES_CHKSUM = "file://debian/copyright;md5=bf0fe2872eb3dfeebb2cbe38206fe81f"
> A bit of consistency with variable ordering, indentation etc. would be much
> appreciated. I don't require patches to be passed through oe-stylize script
> from meta-oe (yet), but please keep it neat. Thanks.
>

I'll take a look at the script and make the updates.

>> +include gdbc6x.inc
>> +
>> +PR = "${INC_PR}.0"
>> +
>> +DEPENDS = "ncurses bison texinfo flex gettext"
>> +
>> +RDEPENDS_${PN}  = "gdbserver-c6x gdbserverproxy-module-drv"
>> +
>> +S = "${WORKDIR}/git/gdbc6x"
>> +
>> +SRC_URI_append = " \
>> +    file://init \
>> +"
>> +
>> +inherit update-rc.d
>> +
>> +INITSCRIPT_NAME = "gdbserverproxy"
>> +INITSCRIPT_PARAMS = "defaults 95"
>> +
>> +inherit gettext
>> +
>> +PARALLEL_MAKE = ""
>> +
>> +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
>> +}
>> -- 
>> 1.7.9.5
>>
>> -- 
>> _______________________________________________
>> meta-ti mailing list
>> meta-ti@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-ti



      reply	other threads:[~2015-05-18 18:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 17:32 [PATCH 0/3] gdbc6x 1.1.0 Jacob Stiffler
2015-05-18 17:32 ` [PATCH 1/3] gdbserverproxy-module-drv: Add version 1.1.0 Jacob Stiffler
2015-05-18 17:40   ` Denys Dmytriyenko
2015-05-18 17:54     ` Jacob Stiffler
2015-05-18 18:23       ` Denys Dmytriyenko
2015-05-18 17:32 ` [PATCH 2/3] gdbserver-c6x: " Jacob Stiffler
2015-05-18 17:41   ` Denys Dmytriyenko
2015-05-18 19:00     ` Jacob Stiffler
2015-05-18 19:07       ` Denys Dmytriyenko
2015-05-19 12:12         ` Jacob Stiffler
2015-05-19 13:30           ` Denys Dmytriyenko
2015-05-18 17:32 ` [PATCH 3/3] gdbc6x: " Jacob Stiffler
2015-05-18 17:54   ` Denys Dmytriyenko
2015-05-18 18:59     ` Jacob Stiffler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555A3682.9080808@ti.com \
    --to=j-stiffler@ti.com \
    --cc=denys@ti.com \
    --cc=meta-ti@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.