From cc451c403608f0caf7627c8897e6f2262f43ecb3 Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Wed, 29 May 2019 17:57:15 -0400 Subject: [PATCH] Updating scripts --- configs/MMDVM_HS_Dual_Hat-12mhz.h | 2 +- configs/MMDVM_HS_Dual_Hat.h | 2 +- configs/MMDVM_HS_Hat-12mhz.h | 2 +- configs/MMDVM_HS_Hat.h | 2 +- configs/NanoDV_NPI.h | 2 +- configs/NanoDV_USB.h | 2 +- configs/Nano_hotSPOT.h | 2 +- configs/ZUMspot_Libre.h | 2 +- configs/ZUMspot_RPi.h | 2 +- configs/ZUMspot_USB.h | 2 +- configs/ZUMspot_duplex.h | 2 +- configs/generic_duplex_gpio.h | 2 +- configs/generic_gpio.h | 2 +- scripts/build_fw.sh | 6 +++ scripts/install_fw_d2rg_mmdvmhs.sh | 77 +++++++++++++++++++++++++++ scripts/install_fw_duplex.sh | 2 +- scripts/install_fw_duplex_gpio.sh | 2 +- scripts/install_fw_gen_gpio.sh | 2 +- scripts/install_fw_hsdualhat-12mhz.sh | 2 +- scripts/install_fw_hsdualhat.sh | 2 +- scripts/install_fw_hshat-12mhz.sh | 2 +- scripts/install_fw_hshat.sh | 2 +- scripts/install_fw_librekit.sh | 2 +- scripts/install_fw_nanodv_npi.sh | 2 +- scripts/install_fw_nanodv_usb.sh | 2 +- scripts/install_fw_nanohs.sh | 2 +- scripts/install_fw_rpi.sh | 2 +- scripts/install_fw_usb.sh | 2 +- 28 files changed, 109 insertions(+), 26 deletions(-) create mode 100755 scripts/install_fw_d2rg_mmdvmhs.sh diff --git a/configs/MMDVM_HS_Dual_Hat-12mhz.h b/configs/MMDVM_HS_Dual_Hat-12mhz.h index 2f738c5..df6d0d9 100644 --- a/configs/MMDVM_HS_Dual_Hat-12mhz.h +++ b/configs/MMDVM_HS_Dual_Hat-12mhz.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/MMDVM_HS_Dual_Hat.h b/configs/MMDVM_HS_Dual_Hat.h index 9b4b696..64e600d 100644 --- a/configs/MMDVM_HS_Dual_Hat.h +++ b/configs/MMDVM_HS_Dual_Hat.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/MMDVM_HS_Hat-12mhz.h b/configs/MMDVM_HS_Hat-12mhz.h index a130ff6..56ad528 100644 --- a/configs/MMDVM_HS_Hat-12mhz.h +++ b/configs/MMDVM_HS_Hat-12mhz.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/MMDVM_HS_Hat.h b/configs/MMDVM_HS_Hat.h index e70362f..a847690 100644 --- a/configs/MMDVM_HS_Hat.h +++ b/configs/MMDVM_HS_Hat.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/NanoDV_NPI.h b/configs/NanoDV_NPI.h index 65e1e3f..50bb008 100644 --- a/configs/NanoDV_NPI.h +++ b/configs/NanoDV_NPI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 by Andy Uribe CA6JAU + * Copyright (C) 2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/NanoDV_USB.h b/configs/NanoDV_USB.h index 73e2699..eab6287 100644 --- a/configs/NanoDV_USB.h +++ b/configs/NanoDV_USB.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 by Andy Uribe CA6JAU + * Copyright (C) 2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/Nano_hotSPOT.h b/configs/Nano_hotSPOT.h index e000ac3..55d93e2 100644 --- a/configs/Nano_hotSPOT.h +++ b/configs/Nano_hotSPOT.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 by Andy Uribe CA6JAU + * Copyright (C) 2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/ZUMspot_Libre.h b/configs/ZUMspot_Libre.h index 64521ad..2f41693 100644 --- a/configs/ZUMspot_Libre.h +++ b/configs/ZUMspot_Libre.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/ZUMspot_RPi.h b/configs/ZUMspot_RPi.h index 974c57c..653a0e5 100644 --- a/configs/ZUMspot_RPi.h +++ b/configs/ZUMspot_RPi.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/ZUMspot_USB.h b/configs/ZUMspot_USB.h index f6cdb7e..59b926c 100644 --- a/configs/ZUMspot_USB.h +++ b/configs/ZUMspot_USB.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/ZUMspot_duplex.h b/configs/ZUMspot_duplex.h index f7283d7..1a5a05d 100644 --- a/configs/ZUMspot_duplex.h +++ b/configs/ZUMspot_duplex.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/generic_duplex_gpio.h b/configs/generic_duplex_gpio.h index 1d6eddc..172ec76 100644 --- a/configs/generic_duplex_gpio.h +++ b/configs/generic_duplex_gpio.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/configs/generic_gpio.h b/configs/generic_gpio.h index 60c387c..9d95d06 100644 --- a/configs/generic_gpio.h +++ b/configs/generic_gpio.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017,2018 by Andy Uribe CA6JAU + * Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/scripts/build_fw.sh b/scripts/build_fw.sh index 1bae995..a70ea1b 100755 --- a/scripts/build_fw.sh +++ b/scripts/build_fw.sh @@ -86,6 +86,12 @@ make bl mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/nanodv_usb_fw.bin make clean +# Building D2RG MMDVM_HS +cp ~/MMDVM_HS/configs/D2RG_MMDVM_HS.h ~/MMDVM_HS/Config.h +make +mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/d2rg_mmdvm_hs.bin +make clean + # Building Generic Simplex GPIO cp ~/MMDVM_HS/configs/generic_gpio.h ~/MMDVM_HS/Config.h make diff --git a/scripts/install_fw_d2rg_mmdvmhs.sh b/scripts/install_fw_d2rg_mmdvmhs.sh new file mode 100755 index 0000000..fbfecdd --- /dev/null +++ b/scripts/install_fw_d2rg_mmdvmhs.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Configure latest version +FW_VERSION="v1.4.17" + +# Change USB-serial port name ONLY in macOS +MAC_DEV_USB_SER="/dev/cu.usbmodem14401" + +# Download latest firmware for MMDVM_HS_Hat +curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/d2rg_mmdvm_hs.bin + +# Download STM32F10X_Lib (only for binary tools) +if [ ! -d "./STM32F10X_Lib/utils" ]; then + git clone https://github.com/juribeparada/STM32F10X_Lib +fi + +# Configure vars depending on OS +if [ $(uname -s) == "Linux" ]; then + DEV_USB_SER="/dev/ttyACM0" + if [ $(uname -m) == "x86_64" ]; then + echo "Linux 64-bit detected" + DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash" + elif [ $(uname -m) == "armv7l" ]; then + echo "Raspberry Pi 3 detected" + DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash" + elif [ $(uname -m) == "armv6l" ]; then + echo "Raspberry Pi 2 or Pi Zero W detected" + DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash" + else + echo "Linux 32-bit detected" + DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash" + fi +fi + +if [ $(uname -s) == "Darwin" ]; then + echo "macOS detected" + DEV_USB_SER=$MAC_DEV_USB_SER + DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash" +fi + +# Stop MMDVMHost process to free serial port +sudo killall MMDVMHost >/dev/null 2>&1 + +# Upload the firmware +eval sudo $STM32FLASH -v -w d2rg_mmdvm_hs.bin -g 0x0 -R -i 23,-22,22:-23,22 /dev/ttySC0 + diff --git a/scripts/install_fw_duplex.sh b/scripts/install_fw_duplex.sh index f15b213..bd42a4a 100755 --- a/scripts/install_fw_duplex.sh +++ b/scripts/install_fw_duplex.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_duplex_gpio.sh b/scripts/install_fw_duplex_gpio.sh index a3301ed..04f7199 100755 --- a/scripts/install_fw_duplex_gpio.sh +++ b/scripts/install_fw_duplex_gpio.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_gen_gpio.sh b/scripts/install_fw_gen_gpio.sh index 6d5a839..023e97b 100755 --- a/scripts/install_fw_gen_gpio.sh +++ b/scripts/install_fw_gen_gpio.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_hsdualhat-12mhz.sh b/scripts/install_fw_hsdualhat-12mhz.sh index 05dd5c1..0a4f2fd 100755 --- a/scripts/install_fw_hsdualhat-12mhz.sh +++ b/scripts/install_fw_hsdualhat-12mhz.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_hsdualhat.sh b/scripts/install_fw_hsdualhat.sh index 26e7497..9090aca 100755 --- a/scripts/install_fw_hsdualhat.sh +++ b/scripts/install_fw_hsdualhat.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_hshat-12mhz.sh b/scripts/install_fw_hshat-12mhz.sh index 6840e4a..735d08d 100755 --- a/scripts/install_fw_hshat-12mhz.sh +++ b/scripts/install_fw_hshat-12mhz.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_hshat.sh b/scripts/install_fw_hshat.sh index e4b544b..c8f2b61 100755 --- a/scripts/install_fw_hshat.sh +++ b/scripts/install_fw_hshat.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_librekit.sh b/scripts/install_fw_librekit.sh index 655b403..fdce89b 100755 --- a/scripts/install_fw_librekit.sh +++ b/scripts/install_fw_librekit.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_nanodv_npi.sh b/scripts/install_fw_nanodv_npi.sh index 88a1382..2c4ac23 100755 --- a/scripts/install_fw_nanodv_npi.sh +++ b/scripts/install_fw_nanodv_npi.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_nanodv_usb.sh b/scripts/install_fw_nanodv_usb.sh index 09b6748..71f41bf 100755 --- a/scripts/install_fw_nanodv_usb.sh +++ b/scripts/install_fw_nanodv_usb.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_nanohs.sh b/scripts/install_fw_nanohs.sh index cf6bdb7..2168a03 100755 --- a/scripts/install_fw_nanohs.sh +++ b/scripts/install_fw_nanohs.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_rpi.sh b/scripts/install_fw_rpi.sh index fb09687..042f260 100755 --- a/scripts/install_fw_rpi.sh +++ b/scripts/install_fw_rpi.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401" diff --git a/scripts/install_fw_usb.sh b/scripts/install_fw_usb.sh index 12c0eda..fc06b4c 100755 --- a/scripts/install_fw_usb.sh +++ b/scripts/install_fw_usb.sh @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Configure latest version -FW_VERSION="v1.4.16" +FW_VERSION="v1.4.17" # Change USB-serial port name ONLY in macOS MAC_DEV_USB_SER="/dev/cu.usbmodem14401"