mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject incubator-mynewt-larva git commit: String matching was wrong. Also report error for NRF platforms when JTAG software is not present.
Date Fri, 05 Feb 2016 02:06:57 GMT
Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master 5263d92a5 -> fde5aaf29


String matching was wrong. Also report error for NRF platforms when
JTAG software is not present.


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

Branch: refs/heads/master
Commit: fde5aaf2960a13b2f08fdb93da188f66fe1e2878
Parents: 5263d92
Author: Marko Kiiskila <marko@runtime.io>
Authored: Thu Feb 4 18:04:36 2016 -0800
Committer: Marko Kiiskila <marko@runtime.io>
Committed: Thu Feb 4 18:06:29 2016 -0800

----------------------------------------------------------------------
 hw/bsp/nrf51dk/nrf51dk_download.sh                      | 12 ++++++++++--
 hw/bsp/nrf52pdk/nrf52pdk_download.sh                    |  7 ++++++-
 .../olimex_stm32-e407_devboard_download.sh              |  2 +-
 hw/bsp/stm32f3discovery/stm32f3discovery_download.sh    |  2 +-
 4 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/fde5aaf2/hw/bsp/nrf51dk/nrf51dk_download.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/nrf51dk_download.sh b/hw/bsp/nrf51dk/nrf51dk_download.sh
index c860c0e..e151a59 100755
--- a/hw/bsp/nrf51dk/nrf51dk_download.sh
+++ b/hw/bsp/nrf51dk/nrf51dk_download.sh
@@ -22,8 +22,10 @@ GDB_CMD_FILE=.gdb_cmds
 # Look for 'bootloader' from 2nd arg onwards
 shift
 while [ $# -gt 0 ]; do
-    if [ $1 == "bootloader" ]; then
+    if [ $1 = "bootloader" ]; then
 	IS_BOOTLOADER=1
+    else
+	exit 1
     fi
     shift
 done
@@ -52,7 +54,8 @@ echo "target remote localhost:3333" >> $GDB_CMD_FILE
 echo "restore $FILE_NAME binary $FLASH_OFFSET" >> $GDB_CMD_FILE
 echo "quit" >> $GDB_CMD_FILE
 
-msgs=`arm-none-eabi-gdb -x $GDB_CMD_FILE`
+msgs=`arm-none-eabi-gdb -x $GDB_CMD_FILE 2>&1`
+echo $msgs > .gdb_out
 
 rm $GDB_CMD_FILE
 
@@ -83,4 +86,9 @@ if [ -n "$error" ]; then
     exit 1
 fi
 
+error=`echo $msgs | grep -i "not found"`
+if [ -n "$error" ]; then
+    exit 1
+fi
+
 exit 0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/fde5aaf2/hw/bsp/nrf52pdk/nrf52pdk_download.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52pdk/nrf52pdk_download.sh b/hw/bsp/nrf52pdk/nrf52pdk_download.sh
index 78ce539..014dd6c 100755
--- a/hw/bsp/nrf52pdk/nrf52pdk_download.sh
+++ b/hw/bsp/nrf52pdk/nrf52pdk_download.sh
@@ -24,7 +24,7 @@ loadbin $FILE_NAME $FLASH_OFFSET
 q
 EOF
 
-msgs=`JLinkExe -device nRF52 -speed 4000 -if SWD $JLINK_SCRIPT`
+msgs=`JLinkExe -device nRF52 -speed 4000 -if SWD $JLINK_SCRIPT 2>&1`
 
 # Echo output from script run, so newt can show it if things go wrong.
 echo $msgs
@@ -45,4 +45,9 @@ if [ -n "$error" ]; then
     exit 1
 fi
 
+error=`echo $msgs | grep -i "not found"`
+if [ -n "$error" ]; then
+    exit 1
+fi
+
 exit 0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/fde5aaf2/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh b/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh
index bfbc119..6c02180 100755
--- a/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh
+++ b/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh
@@ -21,7 +21,7 @@ VER_FILE=version.txt # or somewhere else
 # Look for 'bootloader' from 2nd arg onwards
 shift
 while [ $# -gt 0 ]; do
-    if [ $1 == "bootloader" ]; then
+    if [ $1 = "bootloader" ]; then
 	IS_BOOTLOADER=1
     fi
     shift

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/fde5aaf2/hw/bsp/stm32f3discovery/stm32f3discovery_download.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f3discovery/stm32f3discovery_download.sh b/hw/bsp/stm32f3discovery/stm32f3discovery_download.sh
index abfa9cc..d25d56f 100755
--- a/hw/bsp/stm32f3discovery/stm32f3discovery_download.sh
+++ b/hw/bsp/stm32f3discovery/stm32f3discovery_download.sh
@@ -21,7 +21,7 @@ VER_FILE=version.txt # or somewhere else
 # Look for 'bootloader' from 2nd arg onwards
 shift
 while [ $# -gt 0 ]; do
-    if [ $1 == "bootloader" ]; then
+    if [ $1 = "bootloader" ]; then
         IS_BOOTLOADER=1
     fi
     shift


Mime
View raw message