Created
February 6, 2014 11:37
-
-
Save tomvdb/8842542 to your computer and use it in GitHub Desktop.
STM32 Toolchain on Ubuntu Instructions
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
* Install GCC toolchain | |
tar xjvf gcc-arm-none-eabi-4_7-2013q1-20130313-linux.tar.bz2 | |
sudo mv gcc-arm-none-eabi-4_7-2013q1-20130313-linux /opt/ARM | |
echo "PATH=$PATH:/opt/ARM/bin" >> ~/.bashrc | |
source ~/.bashrc | |
arm-none-eabi-gcc --version | |
* Build ST Link | |
sudo apt-get install autoconf libusb-1.0-0-dev | |
git clone git://github.com/texane/stlink.git | |
cd stlink | |
./autogen.sh | |
./configure | |
make | |
* Install ST Link | |
sudo mkdir /opt/stlink | |
cd /opt/stlink | |
sudo cp ~/src/stlink/st-flash . | |
sudo cp ~/src/stlink/st-util . | |
echo "PATH=$PATH:/opt/stlink" >> ~/.bashrc | |
source ~/.bashrc | |
* Grant Access to ST Link | |
sudo cp ~/src/stlink/49-stlinkv2.rules /etc/udev/rules.d | |
sudo udevadm control --reload-rules | |
* Build OpenOCD (For Debugging) | |
sudo apt-get install libtool texinfo | |
git clone git://git.code.sf.net/p/openocd/code openocd | |
./bootstrap | |
./configure --prefix=/usr --enable-maintainer-mode --enable-stlink | |
make | |
sudo make install | |
* (Optional) Get Template for STM32F0 Discovery Boards | |
git clone https://github.com/szczys/stm32f0-discovery-basic-template | |
make | |
make program |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment