Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master 810036811 -> 251ea8f55


Use 'set -m' in debug script to get JTAG debugger to get it's own
process group.


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/251ea8f5
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/251ea8f5
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/251ea8f5

Branch: refs/heads/master
Commit: 251ea8f55e6f4b1229c731fd734fcbe7b923b3c3
Parents: 8100368
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri Feb 5 11:34:23 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri Feb 5 11:34:23 2016 -0800

----------------------------------------------------------------------
 hw/bsp/nrf51dk/nrf51dk_debug.sh                              | 7 +++++--
 hw/bsp/nrf52pdk/nrf52pdk_debug.sh                            | 8 ++++++--
 .../olimex_stm32-e407_devboard_debug.sh                      | 7 +++++--
 hw/bsp/stm32f3discovery/stm32f3discovery_debug.sh            | 7 +++++--
 4 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/251ea8f5/hw/bsp/nrf51dk/nrf51dk_debug.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/nrf51dk_debug.sh b/hw/bsp/nrf51dk/nrf51dk_debug.sh
index 11e3e44..f6b90ba 100755
--- a/hw/bsp/nrf51dk/nrf51dk_debug.sh
+++ b/hw/bsp/nrf51dk/nrf51dk_debug.sh
@@ -17,8 +17,11 @@ GDB_CMD_FILE=.gdb_cmds
 
 echo "Debugging" $FILE_NAME
 
-echo "shell /bin/sh -c 'trap \"\" 2;JLinkGDBServer -device nRF51422_xxAC 
-speed 4000 -if SWD $JLINK_SCRIPT -port 3333 -singlerun' & " > $GDB_CMD_FILE
-echo "target remote localhost:3333" >> $GDB_CMD_FILE
+set -m
+JLinkGDBServer -device nRF51422_xxAC -speed 4000 -if SWD -port 3333 -singlerun 
&
+set +m
+
+echo "target remote localhost:3333" > $GDB_CMD_FILE
 
 arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/251ea8f5/hw/bsp/nrf52pdk/nrf52pdk_debug.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52pdk/nrf52pdk_debug.sh 
b/hw/bsp/nrf52pdk/nrf52pdk_debug.sh
index beeef5e..f714ec3 100755
--- a/hw/bsp/nrf52pdk/nrf52pdk_debug.sh
+++ b/hw/bsp/nrf52pdk/nrf52pdk_debug.sh
@@ -17,8 +17,12 @@ GDB_CMD_FILE=.gdb_cmds
 
 echo "Debugging" $FILE_NAME
 
-echo "shell /bin/sh -c 'trap \"\" 2;JLinkGDBServer -device nRF52 -speed 4000 
-if SWD $JLINK_SCRIPT -port 3333 -singlerun' & " > $GDB_CMD_FILE
-echo "target remote localhost:3333" >> $GDB_CMD_FILE
+# Monitor mode. Background process gets it's own process group.
+set -m
+JLinkGDBServer -device nRF52 -speed 4000 -if SWD -port 3333 -singlerun &
+set +m
+
+echo "target remote localhost:3333" > $GDB_CMD_FILE
 
 arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/251ea8f5/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh
----------------------------------------------------------------------
diff --git 
a/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh 
b/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh
index 0a3f8e1..9726824 100755
--- a/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh
+++ b/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh
@@ -20,7 +20,10 @@ echo "Debugging" $FILE_NAME
 # Block Ctrl-C from getting passed to openocd.
 # Exit openocd when gdb detaches.
 #
-echo "shell /bin/sh -c 'trap \"\" 2; openocd -f 
interface/ftdi/olimex-arm-usb-tiny-h.cfg -s hw/bsp/olimex_stm32-e407_devboard 
-f f407.cfg -c \"gdb_port 3333; telnet_port 4444; stm32f4x.cpu configure -event 
gdb-detach {shutdown}\" -c init -c \"reset halt\"' & " > $GDB_CMD_FILE
-echo "target remote localhost:3333" >> $GDB_CMD_FILE
+set -m
+openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -s 
hw/bsp/olimex_stm32-e407_devboard -f f407.cfg -c "gdb_port 3333; telnet_port 
4444; stm32f4x.cpu configure -event gdb-detach {shutdown}" -c init -c "reset 
halt" &
+set +m
+
+echo "target remote localhost:3333" > $GDB_CMD_FILE
 arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME
 rm $GDB_CMD_FILE

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/251ea8f5/hw/bsp/stm32f3discovery/stm32f3discovery_debug.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f3discovery/stm32f3discovery_debug.sh 
b/hw/bsp/stm32f3discovery/stm32f3discovery_debug.sh
index 63ba061..30c2e3d 100755
--- a/hw/bsp/stm32f3discovery/stm32f3discovery_debug.sh
+++ b/hw/bsp/stm32f3discovery/stm32f3discovery_debug.sh
@@ -20,8 +20,11 @@ echo "Debugging" $FILE_NAME
 # Block Ctrl-C from getting passed to openocd.
 # Exit openocd when gdb detaches.
 #
-echo "shell /bin/sh -c 'trap \"\" 2; openocd -f board/stm32f3discovery.cfg -c 
\"gdb_port 3333; telnet_port 4444; stm32f3x.cpu configure -event gdb-detach 
{shutdown}\" -c init -c \"reset halt\"' & " > $GDB_CMD_FILE
-echo "target remote localhost:3333" >> $GDB_CMD_FILE
+set -m
+openocd -f board/stm32f3discovery.cfg -c "gdb_port 3333; telnet_port 4444; 
stm32f3x.cpu configure -event gdb-detach {shutdown}" -c init -c "reset halt" &
+set +m
+
+echo "target remote localhost:3333" > $GDB_CMD_FILE
 arm-none-eabi-gdb -x $GDB_CMD_FILE $FILE_NAME
 rm $GDB_CMD_FILE
 

Reply via email to