You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/02/18 10:22:56 UTC

[mynewt-core] 03/03: Added serial load option to da1469x download script.

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

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

commit 8b90a1ba471381864406dd1c7ae8539535bdbef2
Author: Miguel Azevedo <mi...@gmail.com>
AuthorDate: Wed Apr 15 19:38:34 2020 +0100

    Added serial load option to da1469x download script.
---
 .../da1469x/scripts/dialog_da1469x-download_jlink.sh     | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/hw/mcu/dialog/da1469x/scripts/dialog_da1469x-download_jlink.sh b/hw/mcu/dialog/da1469x/scripts/dialog_da1469x-download_jlink.sh
index 572465e..4feea80 100755
--- a/hw/mcu/dialog/da1469x/scripts/dialog_da1469x-download_jlink.sh
+++ b/hw/mcu/dialog/da1469x/scripts/dialog_da1469x-download_jlink.sh
@@ -109,13 +109,27 @@ if [ -z $JLINK_TARGET_HOST ]; then
     JLINK_SERVER_CMD="shell sh -c \"trap '' 2; $JLINK_GDB_SERVER -device cortex-m33 -speed 4000 -if SWD -port $PORT -singlerun $EXTRA_JTAG_CMD > $JLINK_LOG_FILE 2>&1 &\""
 fi
 
+if [ -n "$UART_PROTO_DEV" ]; then
+    ${CORE_PATH}/hw/mcu/dialog/da1469x/scripts/da1469x_serial.py load ${FLASH_LOADER}.bin \
+                -u ${UART_PROTO_DEV} -r ${CORE_PATH}/hw/mcu/dialog/da1469x/scripts/reset.sh
+    if [ $? != 0 ]; then
+        exit 1
+    fi
+fi
+
 cat > $GDB_CMD_FILE <<EOF
 set pagination off
 $JLINK_SERVER_CMD
 $JLINK_TARGET_CMD
 mon reset
 mon halt
-restore $FLASH_LOADER.bin binary 0x20000000
+EOF
+
+if [ ! -n "$UART_PROTO_DEV" ]; then
+    echo "restore $FLASH_LOADER.bin binary 0x20000000" >> $GDB_CMD_FILE
+fi
+
+cat >> $GDB_CMD_FILE <<EOF
 symbol-file $FLASH_LOADER
 
 # Configure QSPI controller so it can read flash in automode (values