Update script to download gcc arm toolchain from private repo
-# This PS installs the ARM GNU GCC toolchain if it't not already available
+# This PS installs the ARM GNU GCC toolchain from out Bintray repository if it's not already available
# check if path already exists
$GnuGccPathExists = Test-Path $env:GNU_GCC_TOOLCHAIN_PATH -ErrorAction SilentlyContinue
If($GnuGccPathExists -eq $False)
{
+ Install-Module 7Zip4PowerShell -Force -Verbose
+
Write-Host "Downloading ARM GNU GCC toolchain..."
- $url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip?revision=d8809bf7-a431-49ee-98d5-0475d839f8f1?product=GNU Arm Embedded Toolchain,ZIP,,Windows,6-2017-q2-update"
- $output = "$PSScriptRoot\gcc-arm.zip"
- # download zip with toolchain
+ $url = "https://bintray.com/nfbot/internal-build-tools/download_file?file_path=gcc-arm-none-eabi-6-2017-q2-update-win32.7z"
+ $output = "$PSScriptRoot\gcc-arm.7z"
+
+ # download 7zip with toolchain
(New-Object Net.WebClient).DownloadFile($url, $output)
Write-Host "Installing ARM GNU GCC toolchain..."
# unzip toolchain
- Expand-Archive $output -DestinationPath $env:GNU_GCC_TOOLCHAIN_PATH
-
- # delete the samples and docs folder
- $toDelete = $env:GNU_GCC_TOOLCHAIN_PATH + '\share'
- Remove-Item -Recurse -Force $toDelete
+ Expand-7Zip -ArchiveFileName $output -TargetPath $env:GNU_GCC_TOOLCHAIN_PATH
}
