You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/03/13 18:25:34 UTC

[GitHub] [mynewt-core] utzig commented on a change in pull request #2239: dialog_da1469x: enhance otp and serial loader tools.

utzig commented on a change in pull request #2239: dialog_da1469x: enhance otp and serial loader tools.
URL: https://github.com/apache/mynewt-core/pull/2239#discussion_r392398345
 
 

 ##########
 File path: hw/bsp/dialog_da1469x-dk-pro/reset.sh
 ##########
 @@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# 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
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+ip=${1:-"localhost"}
+freq=${2:-"1000"}
+
+if [ -z $(which arm-none-eabi-gdb) ]; then
+  GDB=gdb
+else
+  GDB=arm-none-eabi-gdb
+fi
+
+GDB_CMD_FILE=${GDB_CMD_FILE:-".gdb_load"}
+OPENOCD_LOG_FILE=${OPENOCD_LOG_FILE:-".openocd_log"}
+CFG_FILE_DIR=${CFG_FILE_DIR:-"/srv/juul-test/jtest/openocd"}
+
+cat > ${GDB_CMD_FILE} << EOF
+set pagination off
+EOF
+if [ "$ip" == "localhost" ]; then
+cat >> ${GDB_CMD_FILE} << EOF
+shell sh -c "trap '' 2; openocd -f ${CFG_FILE_DIR}/ft4232h.cfg -f ${CFG_FILE_DIR}/steam.cfg -d > ${OPENOCD_LOG_FILE} 2>&1 &"
+EOF
+else
+cat >> ${GDB_CMD_FILE} << EOF
+shell sh -c "trap '' 2; ssh -tt osf@$ip docker-compose exec jtest \
+openocd -f ${CFG_FILE_DIR}/ft4232h.cfg -f ${CFG_FILE_DIR}/steam.cfg -f ${CFG_FILE_DIR}/bindto.cfg -d > .openocd_log 2>&1 &"
+EOF
+fi
 
 Review comment:
   Adding an empty line should make it easier to read.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services