stm32f103 - Toolchains for Ubuntu
ubuntu@ubuntu:~$ sudo apt-get install libusb-1.0-0-dev
There are two possible ways described how to install stlink, e.g.:
Download and install .deb package using Software Center. Another possible way to install stlink is described in section below.
Install stlink into folder /opt
ubuntu@ubuntu:~$ cd /opt
ubuntu@ubuntu:~$ git clone https://github.com/texane/stlink.git
ubuntu@ubuntu:~$ cd stlink
ubuntu@ubuntu:~$ make clean
ubuntu@ubuntu:~$ make release
ubuntu@ubuntu:~$ make install
// install udev rules
ubuntu@ubuntu:~$ sudo cp etc/udev/rules.d/49-stlinkv* /etc/udev/rules.d/
// restart sudo restart udev
ubuntu@ubuntu:~$ sudo udevadm control --reload
// using this command no need to disconnect and connect device
ubuntu@ubuntu:~$ sudo udevadm trigger
// error message
st-info: error while loading shared libraries: libstlink.so.1:
cannot open shared object file: No such file or directory.
// solving
ubuntu@ubuntu:~$ sudo ldconfig
The GNU Arm Embedded toolchain contains integrated and validated packages featuring the GCC compiler, libraries, and other tools necessary for bare-metal software development.
Download and extract GNU Toolchain. Then copy extracted files into folder /opt/gcc-arm
:
ubuntu@ubuntu:~$ sudo cp -a /home/<your name of home directory>/Downloads/<Extracted GNU Toolchain package> /opt/gcc-arm
Structure of folder /opt/gcc-arm
should look like:
ubuntu@ubuntu:~$ sudo ln -s /opt/gcc-arm/bin/arm-none-eabi-gcc /usr/bin/arm-none-eabi-gcc
ubuntu@ubuntu:~$ sudo ln -s /opt/gcc-arm/bin/arm-none-eabi-ar /usr/bin/arm-none-eabi-ar
ubuntu@ubuntu:~$ sudo ln -s /opt/gcc-arm/bin/arm-none-eabi-as /usr/bin/arm-none-eabi-as
ubuntu@ubuntu:~$ sudo ln -s /opt/gcc-arm/bin/arm-none-eabi-objcopy /usr/bin/arm-none-eabi-objcopy
ubuntu@ubuntu:~$ sudo ln -s /opt/gcc-arm/bin/arm-none-eabi-size /usr/bin/arm-none-eabi-size
// error message
arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5:
cannot open shared object file: No such file or directory
// solve
ubuntu@ubuntu:~$ sudo apt-get install libncurses5