Skip to content

Instantly share code, notes, and snippets.

@jkramarz
Last active December 22, 2015 16:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jkramarz/6502130 to your computer and use it in GitHub Desktop.
Save jkramarz/6502130 to your computer and use it in GitHub Desktop.
Install tools for Stellaris LM4F120 LaunchPad Evaluation Board on Fedora (and probably other RPM-based distros)
#!/bin/bash
# copyleft 2013 Jakub Kramarz http://hskrk.pl
# based on http://www.jann.cc/2012/12/11/getting_started_with_the_ti_stellaris_launchpad_on_linux.html
set -x
function install_gcc_arm_embedded() {
sudo yum install glibc.i686
wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
tar -xf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2 -C $HOME/.local
rm gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
cd $HOME/.local
cp gcc-arm-none-eabi-4_7-2013q2/* -Rf .
rm -Rf gcc-arm-none-eabi-4_7-2013q2
}
function install_lm4tools() {
sudo yum install libusbx-devel
git clone https://github.com/utzig/lm4tools.git
cd lm4tools/lm4flash/
make
mkdir -p $HOME/.local/bin
cp lm4flash $HOME/.local/bin
cd -
rm -Rf lm4tools
}
function install_openocd() {
sudo yum install libtool texinfo
git clone git://git.code.sf.net/p/openocd/code openocd.git
cd openocd.git
./bootstrap
./configure --prefix=$HOME/.local --enable-maintainer-mode --enable-stlink --enable-ti-icdi
make
make install
cd -
rm -Rf openocd.git
}
function set_permission() {
cat << EOF | sudo tee /etc/udev/rules.d/10-local.rules > /dev/null
ATTR{idVendor}=="15ba", ATTR{idProduct}=="0004", GROUP="plugdev", MODE="0660" # Olimex Ltd. OpenOCD JTAG TINY
ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", GROUP="plugdev", MODE="0660" # Prolific Technology, Inc. PL2303 Serial Port
ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", GROUP="plugdev", MODE="0660" # USB Serial
ATTR{idVendor}=="1cbe", ATTR{idProduct}=="00fd", GROUP="plugdev", MODE="0660" # TI Stellaris Launchpad
EOF
sudo usermod -a -G plugdev,dialout $USER
sudo udevadm control --reload-rules
}
function install_samples() {
git clone https://github.com/jkramarz/SW-EK-LM4F120XL.git $HOME/workspace-stellaris
cd $HOME/workspace-stellaris/driverlib/
make clean
make
cd ../boards/ek-lm4f120xl/project0/
make
lm4flash gcc/project0.bin
}
sudo yum install git wget
install_gcc_arm_embedded
install_lm4tools
install_openocd
set_permission
install_samples
echo "Please use 'newgrp plugdev' or log-out and log-in again"
@pbrewczynski
Copy link

Line 53 is not accessible anymore :

https://github.com/jkramarz/SW-EK-LM4F120XL.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment