Added script to make sure required tools are installed/downloaded
This commit is contained in:
commit
62c73bb540
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
dfu-util
|
||||||
|
arm-none-eabi-gcc
|
25
setup.sh
Executable file
25
setup.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
command -v make >/dev/null 2>&1 || echo >&2 "Please install make"
|
||||||
|
command -v zasm >/dev/null 2>&1 || echo >&2 "Please install zasm"
|
||||||
|
command -v grep >/dev/null 2>&1 || echo >&2 "Please install grep"
|
||||||
|
command -v wget >/dev/null 2>&1 || echo >&2 "Please install wget"
|
||||||
|
command -v unzip >/dev/null 2>&1 || echo >&2 "Please install unzip"
|
||||||
|
command -v tar >/dev/null 2>&1 || echo >&2 "Please install tar"
|
||||||
|
|
||||||
|
# @todo Check if pyserial is installed
|
||||||
|
# @todo Check if a serial terminal is installed
|
||||||
|
if [ "$(uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/p')" == "Microsoft" ]; then
|
||||||
|
wget http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip -O dfu-util.zip
|
||||||
|
unzip dfu-util.zip
|
||||||
|
mv dfu-util-0.9-win64 dfu-util
|
||||||
|
rm dfu-util.zip
|
||||||
|
# todo Check python3
|
||||||
|
else
|
||||||
|
command -v python3 >/dev/null 2>&1 || echo >&2 "Please install python3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
wget https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v9.2.1-1.1/xpack-arm-none-eabi-gcc-9.2.1-1.1-linux-x64.tar.gz -O arm-none-eabi-gcc.tar.gz
|
||||||
|
tar xvf arm-none-eabi-gcc.tar.gz
|
||||||
|
mv xpack-arm-none-eabi-gcc-9.2.1-1.1 arm-none-eabi-gcc
|
||||||
|
rm arm-none-eabi-gcc.tar.gz
|
||||||
|
|
Loading…
Reference in New Issue
Block a user