You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/01/26 19:19:26 UTC
incubator-mynewt-larva git commit: Make 'newt target debug' start gdb
on the binary with native bsp.
Repository: incubator-mynewt-larva
Updated Branches:
refs/heads/master 41991697b -> 4335332a4
Make 'newt target debug' start gdb on the binary with native bsp.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/4335332a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/4335332a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/4335332a
Branch: refs/heads/master
Commit: 4335332a4bc6a5e0ad597a9f859e54ed940552de
Parents: 4199169
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Jan 26 10:18:27 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Jan 26 10:18:27 2016 -0800
----------------------------------------------------------------------
hw/bsp/native/egg.yml | 1 +
hw/bsp/native/native_debug.sh | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/4335332a/hw/bsp/native/egg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/native/egg.yml b/hw/bsp/native/egg.yml
index efd33e5..ef6f356 100644
--- a/hw/bsp/native/egg.yml
+++ b/hw/bsp/native/egg.yml
@@ -3,3 +3,4 @@ egg.deps:
- hw/mcu/native
egg.deps.BLE_DEVICE:
- net/nimble/drivers/native
+egg.debugscript: "native_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/4335332a/hw/bsp/native/native_debug.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/native/native_debug.sh b/hw/bsp/native/native_debug.sh
new file mode 100755
index 0000000..59b390f
--- /dev/null
+++ b/hw/bsp/native/native_debug.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Called $0 <binary> [identities ...]
+# - binary is the path to prefix to target binary, .elf appended to name is
+# the ELF file
+# - identities is the project identities string.
+#
+#
+if [ $# -lt 1 ]; then
+ echo "Need binary to debug"
+ exit 1
+fi
+
+FILE_NAME=$1.elf
+
+echo "Debugging" $FILE_NAME
+
+gdb $FILE_NAME