Last active
July 2, 2016 16:52
-
-
Save bliz937/32a801e2358e40237cff9c95a9adaeeb to your computer and use it in GitHub Desktop.
Testing contiki install script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function repo { | |
printf "Installing repo...\n" | |
sudo echo "deb http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu trusty main" > /etc/apt/sources.list.d/gcc-arm-embedded.list | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key FE324A81C208C89497EFC6246D1D8367A3421AFB | |
sudo apt-get update | |
printf "\nRepo installed\n" | |
} | |
function contiki { | |
printf "Installing Contiki...\n" | |
sudo apt-get -y install git | |
git clone --recursive https://github.com/contiki-os/contiki.git | |
printf "\nContiki installed\n" | |
} | |
function other { | |
printf "Installing tool chains...\n" | |
sudo apt-get -y install build-essential automake gettext | |
sudo apt-get -y install gcc-arm-none-eabi curl graphviz unzip wget | |
sudo apt-get -y install gcc gcc-msp430 | |
sudo apt-get -y install openjdk-7-jdk openjdk-7-jre ant | |
printf "\nTool chains installed\n" | |
} | |
function testGCC { | |
printf "Testing MSP430 toolchain version...\n" | |
msp430-gcc --version | |
if [ $? -ne 0 ]; then | |
printf "\nMSP430 toolchain not found." | |
fi | |
printf "Testing ARM Cortex-M3 toolchain version...\n" | |
arm-none-eabi-gcc --version | |
if [ $? -ne 0 ]; then | |
printf "\nARM Cortex-M3 toolchain not found." | |
fi | |
} | |
repo | |
contiki | |
other | |
testGCC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment