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 2017/05/09 00:42:06 UTC

incubator-mynewt-core git commit: Fix problems with starting debuggers on MSYS2/MINGW 1) Fixed launch hanging problem for openocd and jlink gdbserver when newt debug is run from mingw/bash (installed with msys2). openocd now starts in a new cmd prompt wi

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/master debf64f45 -> 1080d5c57


Fix problems with starting debuggers on MSYS2/MINGW
1) Fixed launch hanging problem for openocd and jlink gdbserver when
newt debug is run from mingw/bash (installed with msys2).
openocd now starts in a new cmd prompt window.
2) Fixed  to start gdb in a new cmd prompt when newt debug is run
from mingw/bash (installed with msys2). Before the fix, gdb did not
start in a new window and Control-C would cause gdb to exit.

Theses fixes should preserve the same behavior when running newt command
from git-bash, git-cmd, or cmd prompt.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/1080d5c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/1080d5c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/1080d5c5

Branch: refs/heads/master
Commit: 1080d5c57220de83cf2a60608c7bef42fecfe2ad
Parents: debf64f
Author: cwanda <wa...@happycity.com>
Authored: Mon May 8 16:19:21 2017 -0700
Committer: cwanda <wa...@happycity.com>
Committed: Mon May 8 16:54:35 2017 -0700

----------------------------------------------------------------------
 hw/scripts/jlink.sh   | 4 ++--
 hw/scripts/openocd.sh | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1080d5c5/hw/scripts/jlink.sh
----------------------------------------------------------------------
diff --git a/hw/scripts/jlink.sh b/hw/scripts/jlink.sh
index 5087ceb..88391b3 100644
--- a/hw/scripts/jlink.sh
+++ b/hw/scripts/jlink.sh
@@ -125,7 +125,7 @@ jlink_debug() {
             # Launch jlink server in a separate command interpreter, to make
             # sure it doesn't get killed by Ctrl-C signal from bash.
             #
-            $COMSPEC "/C start $COMSPEC /C $JLINK_GDB_SERVER -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun"
+            $COMSPEC /C "start $JLINK_GDB_SERVER -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun"
         else
             #
             # Block Ctrl-C from getting passed to jlink server.
@@ -145,7 +145,7 @@ jlink_debug() {
 
 	if [ $WINDOWS -eq 1 ]; then
 	    FILE_NAME=`echo $FILE_NAME | sed 's/\//\\\\/g'`
-	    $COMSPEC "/C start $COMSPEC /C arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME"
+	    $COMSPEC /C "start arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME"
 	else
             arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME
             rm $GDB_CMD_FILE

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1080d5c5/hw/scripts/openocd.sh
----------------------------------------------------------------------
diff --git a/hw/scripts/openocd.sh b/hw/scripts/openocd.sh
index 12e5e32..50ac6ab 100644
--- a/hw/scripts/openocd.sh
+++ b/hw/scripts/openocd.sh
@@ -83,8 +83,9 @@ openocd_debug () {
             # Launch openocd in a separate command interpreter, to make sure
             # it doesn't get killed by Ctrl-C signal from bash.
             #
+
             CFG=`echo $CFG | sed 's/\//\\\\/g'`
-            $COMSPEC "/C start $COMSPEC /C openocd -l openocd.log $CFG -f $OCD_CMD_FILE -c init -c halt"
+            $COMSPEC /C "start openocd -l openocd.log $CFG -f $OCD_CMD_FILE -c init -c halt"
         else
             #
             # Block Ctrl-C from getting passed to openocd.
@@ -100,9 +101,10 @@ openocd_debug () {
         if [ ! -z "$RESET" ]; then
             echo "mon reset halt" >> $GDB_CMD_FILE
         fi
+	echo "FILENAME" $FILE_NAME >>out
 	if [ $WINDOWS -eq 1 ]; then
 	    FILE_NAME=`echo $FILE_NAME | sed 's/\//\\\\/g'`
-            $COMSPEC "/C start $COMSPEC /C arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME"
+            $COMSPEC /C "start arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME"
 	else
             arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME
             rm $GDB_CMD_FILE