diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2017-07-11 17:18:24 +0300 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2017-07-11 17:18:24 +0300 |
commit | 76bd0d3e184f77ff89f9db2274574093f78e49ca (patch) | |
tree | 490f9e3e9bb4a2e588b71f58a1bd175b99b3edf8 /util/msys2_install.sh | |
parent | b8c363099b76db8b017333ffbbb7630f5c21b1dd (diff) | |
download | firmware-76bd0d3e184f77ff89f9db2274574093f78e49ca.tar.gz firmware-76bd0d3e184f77ff89f9db2274574093f78e49ca.tar.bz2 firmware-76bd0d3e184f77ff89f9db2274574093f78e49ca.zip |
Install arm toolchain
Diffstat (limited to 'util/msys2_install.sh')
-rw-r--r-- | util/msys2_install.sh | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/util/msys2_install.sh b/util/msys2_install.sh index 1b99806b5..0bb75f94c 100644 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -3,12 +3,11 @@ dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) download_dir=~/qmk_utils avrtools=avr8-gnu-toolchain +armtools=gcc-arm-none-eabi echo "Installing dependencies needed for the installation (quazip)" pacman --needed -S msys/unzip msys/p7zip - - source "$dir/win_shared_install.sh" function install_avr { @@ -18,8 +17,13 @@ function install_avr { rm avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe } -pushd "$download_dir" +function install_arm { + wget -O gcc-arm-none-eabi.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip?product=GNU%20ARM%20Embedded%20Toolchain,ZIP,,Windows,6-2017-q2-update" + unzip -d gcc-arm-none-eabi gcc-arm-none-eabi.zip + rm gcc-arm-none-eabi.zip +} +pushd "$download_dir" if [ ! -d "$avrtools" ]; then while true; do @@ -45,6 +49,31 @@ else esac done fi + +if [ ! -d "$armtools" ]; then + while true; do + echo + echo "The ARM toolchain is not installed." + echo "This is needed for building ARM based keboards." + read -p "Do you want to install it? (Y/N) " res + case $res in + [Yy]* ) install_arm; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac + done +else + while true; do + echo + echo "The ARM toolchain is already installed" + read -p "Do you want to reinstall? (Y/N) " res + case $res in + [Yy]* ) install_arm; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac + done +fi popd echo |