STM32-Discovery on Linux

stm32

The following instructions should work for the STM32-Discovery (STM32F101 based device) and STM32f4-discovery (STM32F4 based device). The support tools are the same, the code obviously needs to be different. The instructions assume Debian Jessie.

#get compilers, a other reqs.
sudo apt-get install gdb-arm-none-eabi gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi
sudo apt-get install autoconf pkg-config libusb-1.0 git

# get stlink, compile and install
git clone https://github.com/texane/stlink.git
cd ~/stlink
./autogen.sh
./configure
make
sudo make install
#install the modprobe exceptions
sudo cp stlink_v1.modprobe.conf /etc/modprobe.d
sudo modprobe -r usb-storage && modprobe usb-storage

# Grab the code example (originally from <a href="http://gostm32.blogspot.jp/2010/09/blinky-ii.html">this useful blog post</a>)
cd ~
git clone https://github.com/new299/stm32vl_blinky.git
cd stm32vl_blinky
make
sudo make burn

st-link seems a bit flakey, and I never get 100% of flashes to verify correctly. However it mostly seems to program correctly. Ocassionally it reports the incorrect amount of flash. I’ve found that hitting reset during a flash sometimes seems to kick it into functioning correctly again.

Comments are closed.