I'm trying to install a tool (ST-Link) to write programs to a STM32 micro controller.
Could you give me a hint how to do it?


To install stlink in elementary OS, you will have to build it from source code. Please follow the instructions,

At first please install these required packages for stlink by executing,

sudo apt install build-essential && sudo apt install cmake && sudo apt install libusb-1.0-dev && sudo apt install libgtk-3-dev && sudo apt install clang && sudo apt install gcc

Then please download stlink and extract it to stlink(you can choose any name, but we will use it in the process.

Go to the stlink folder and execute the following commands,

make release make debug

The debug target should only be necessary for people who want to modify the sources and run under a debugger. The top level Makefile is just a handy wrapper for:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..

You could install to a user folder e.g $HOME: cd build/Release; make install DESTDIR=$HOME
Or system wide: cd build/Release; sudo make install

Fixing cannot open shared object file
When installing system-wide (sudo make install) the dynamic library cache needs to be updated with the command ldconfig.

The above information is grabbed from stlink's github repo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.