Last active
February 24, 2016 15:22
-
-
Save rummanwaqar/740d1292e3f914a5927e to your computer and use it in GitHub Desktop.
STM32 Setup
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
sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded | |
sudo apt-get update -q | |
sudo apt-cache policy gcc-arm-none-eabi | |
# Remove the offical packages | |
apt-get purge -y binutils-arm-none-eabi gcc-arm-none-eabi gdb-arm-none-eabi libnewlib-arm-none-eabi | |
#install GNU ARM Embedded Toolchain | |
apt-get update -q && apt-get install -y build-essential unzip \ | |
git binutils-arm-none-eabi \ | |
gcc-arm-none-eabi libnewlib-arm-none-eabi \ | |
openocd qemu-system-arm symlinks expect | |
#OpenOCD build dependancies | |
apt-get install -y libtool libftdi-dev libusb-1.0-0-dev automake pkg-config texinfo | |
# Build and install openocd | |
git clone --depth 1 https://github.com/ntfreak/openocd.git | |
pushd openocd/ > /dev/null | |
git pull | |
git submodule update | |
./bootstrap | |
./configure --enable-maintainer-mode --disable-option-checking --disable-werror --prefix=/opt/openocd --enable-dummy --enable-usb_blaster_libftdi --enable-ep93xx --enable-at91rm9200 --enable-presto_libftdi --enable-usbprog --enable-jlink --enable-vsllink --enable-rlink --enable-stlink --enable-arm-jtag-ew | |
make | |
sudo make install | |
popd > /dev/null | |
rm -rf openocd | |
# clone the firmware repo | |
# Download stsw-stm32068 file | |
wget http://bit.ly/1ryC8Tp -O stsw-stm32068.zip | |
unzip stsw-stm32068.zip | |
rm stsw-stm32068.zip | |
# Download template | |
git clone https://github.com/rummanwaqar/STM32F4_Template.git | |
echo "Your system is ready for some STM32 fun :)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment