STM32-Discovery on Linux


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
cd ~/stlink
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="">this useful blog post</a>)
cd ~
git clone
cd stm32vl_blinky
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.