You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2019/01/04 14:08:10 UTC

[mynewt-core] branch master updated (a919d22 -> d6ffc9b)

This is an automated email from the ASF dual-hosted git repository.

utzig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.


    from a919d22  sys/log: Fix endianess in CBOR pretty-printing
     new 7ef601d  Avoid resetting target when debugging with st-util
     new d6ffc9b  Fix identation (tabs -> spaces)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 hw/scripts/common.sh | 42 +++++++++++++++++++++---------------------
 hw/scripts/stlink.sh | 12 +++++++-----
 2 files changed, 28 insertions(+), 26 deletions(-)


[mynewt-core] 02/02: Fix identation (tabs -> spaces)

Posted by ut...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit d6ffc9bf7d072b15685fdf7c4a0b865d14d6f6cf
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Fri Jan 4 07:07:13 2019 -0200

    Fix identation (tabs -> spaces)
---
 hw/scripts/common.sh | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/hw/scripts/common.sh b/hw/scripts/common.sh
index f64fc14..763c803 100755
--- a/hw/scripts/common.sh
+++ b/hw/scripts/common.sh
@@ -5,9 +5,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 #   http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -53,25 +53,25 @@ parse_extra_jtag_cmd() {
 
     NEW_EXTRA_JTAG_CMD=""
     while [ "$1" != "" ]; do
-	case $1 in
-	    -port)
-		shift
-		# Many BSP scripts append their own things additional
-		# parameters. This is done in a way where openocd delimeter is
-		# immediatelly adjacent to parameters passed via newt.
-		# The following is to filter out the delimeter from
-		# PORT, but keep it present within the string passed
-		# to openocd.
-		PORT=`echo $1 | tr -c -d 0-9`
-		ADDITIONAL_CHARS=`echo $1 | tr -d 0-9`
-		NEW_EXTRA_JTAG_CMD="$NEW_EXTRA_JTAG_CMD $ADDITIONAL_CHARS"
-		shift
-		;;
-	    *)
-		NEW_EXTRA_JTAG_CMD="$NEW_EXTRA_JTAG_CMD $1"
-		shift
-		;;
-	esac
+        case $1 in
+            -port)
+                shift
+                # Many BSP scripts append their own things additional
+                # parameters. This is done in a way where openocd delimeter is
+                # immediatelly adjacent to parameters passed via newt.
+                # The following is to filter out the delimeter from
+                # PORT, but keep it present within the string passed
+                # to openocd.
+                PORT=`echo $1 | tr -c -d 0-9`
+                ADDITIONAL_CHARS=`echo $1 | tr -d 0-9`
+                NEW_EXTRA_JTAG_CMD="$NEW_EXTRA_JTAG_CMD $ADDITIONAL_CHARS"
+                shift
+                ;;
+            *)
+                NEW_EXTRA_JTAG_CMD="$NEW_EXTRA_JTAG_CMD $1"
+                shift
+                ;;
+        esac
     done
     echo $NEW_EXTRA_JTAG_CMD
     EXTRA_JTAG_CMD=$NEW_EXTRA_JTAG_CMD


[mynewt-core] 01/02: Avoid resetting target when debugging with st-util

Posted by ut...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 7ef601d25a260b346ab4ef181e2654abd05f8c61
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Thu Jan 3 11:39:26 2019 -0200

    Avoid resetting target when debugging with st-util
    
    The default behaviour for st-util is to reset the target on startup,
    which should only be done when RESET shell variable is set.
    
    Signed-off-by: Fabio Utzig <ut...@apache.org>
---
 hw/scripts/stlink.sh | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/hw/scripts/stlink.sh b/hw/scripts/stlink.sh
index 29d97c8..708e048 100755
--- a/hw/scripts/stlink.sh
+++ b/hw/scripts/stlink.sh
@@ -41,7 +41,7 @@ stlink_load () {
 
     echo "Downloading" $FILE_NAME "to" $FLASH_OFFSET
 
-    st-flash --reset write $FILE_NAME $FLASH_OFFSET 
+    st-flash --reset write $FILE_NAME $FLASH_OFFSET
     if [ $? -ne 0 ]; then
         exit 1
     fi
@@ -56,6 +56,8 @@ stlink_debug () {
     windows_detect
     PORT=3333
 
+    parse_extra_jtag_cmd $EXTRA_JTAG_CMD
+
     if [ -z "$NO_GDB" ]; then
         if [ -z $FILE_NAME ]; then
             echo "Missing filename"
@@ -72,13 +74,13 @@ stlink_debug () {
             # it doesn't get killed by Ctrl-C signal from bash.
             #
 
-            $COMSPEC /C "start $COMSPEC /C st-util -p $PORT"
+            $COMSPEC /C "start $COMSPEC /C st-util --no-reset -p $PORT"
         else
             #
             # Block Ctrl-C from getting passed to openocd.
             #
             set -m
-            st-util -p $PORT >stlink.log 2>&1 & 
+            st-util --no-reset -p $PORT >stlink.log 2>&1 &
             stpid=$!
             set +m
         fi
@@ -106,8 +108,8 @@ stlink_debug () {
             fi
         fi
     else
-        # No GDB, wait for openocd to exit
-        st-util -p $PORT 
+        # No GDB, wait for st-util to exit
+        st-util --no-reset -p $PORT
         return $?
     fi