Create a gist now

Instantly share code, notes, and snippets.

install Eclipse and GNU Tools for ARM Embedded Processors on Ubuntu
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d9", MODE="0666"
SUBSYSTEM=="usb", KERNEL=="ttyUSB*", MODE="0666"
SUBSYSTEM=="usb", KERNEL=="ttyACM*", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="3748", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374b", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="05a9", ATTR{idProduct}=="058a", MODE="0666"
#!/bin/bash
#Add udev-rules file
sudo cp 50-udev.rules /etc/udev/rules.d/
#Update JAVA
yes | sudo apt-get update
sudo apt-get -y install openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib icedtea-6-jre-cacao openjdk-6-jre-headless icedtea-6-jre-jamvm icedtea-6-plugin
sudo apt-get -y install openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib icedtea-7-jre-jamvm icedtea-7-plugin icedtea-netx-common icedtea-netx
sudo update-java-alternatives --jre -s `sudo update-java-alternatives -l | grep 1.7.0 | awk '{print $1}'`
sudo update-java-alternatives --jre-headless -s `sudo update-java-alternatives -l | grep 1.7.0 | awk '{print $1}'`
sudo update-java-alternatives -s `sudo update-java-alternatives -l | grep 1.7.0 | awk '{print $1}'`
sudo update-java-alternatives -l
#download Eclipse
cd /tmp
wget http://ftp.yz.yamagata-u.ac.jp/pub/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-cpp-kepler-SR2-linux-gtk-x86_64.tar.gz
wget -O "pleiades_1.5.0.zip" "http://sourceforge.jp/frs/redir.php?m=iij&f=%2Fmergedoc%2F61474%2Fpleiades_1.5.0.zip"
#decompress eclipse
sudo tar xvfz /tmp/eclipse-cpp-kepler-SR2-linux-gtk-x86_64.tar.gz -C /usr/local
#Setting Pleiades (Eclipse for Japanese)
sudo unzip -o /tmp/pleiades_1.5.0.zip -d /usr/local/eclipse/
sudo sh -c "echo "-javaagent:/usr/local/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar" >> /usr/local/eclipse/eclipse.ini"
#Add path
echo "PATH="/usr/local/eclipse:\$PATH"" >> ~/.bashrc
#GNU Tools for ARM Embedded Processors is 32bit application.
sudo apt-get -y install lib32z1
#Set up GNU Tools for ARM
cd /tmp
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q2-update/+download/gcc-arm-none-eabi-4_9-2015q2-20150609-linux.tar.bz2
sudo tar xvf /tmp//gcc-arm-none-eabi-4_9-2015q2-20150609-linux.tar.bz2 -C /usr/local
sudo ln -s /usr/local/gcc-arm-none-eabi-4_9-2015q2 /usr/local/arm-cs-tools
echo "export PATH="/usr/local/arm-cs-tools/bin:\$PATH"" >> ~/.bashrc
sudo apt-get -y install dh-autoreconf
sudo apt-get -y install libusb-1.0-0-dev
sudo apt-get -y install git-core
cd /tmp
git clone "https://github.com/texane/stlink.git"
cd /tmp/stlink
./autogen.sh
./configure
make
sudo make install
#Setup dfu-util
sudo apt-get -y install dfu-util
#End
echo "-----------------"
echo "-----------------"
echo "Install finished!"
echo "run source ~/.bashrc"
echo "then, run eclipse"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment