Note: Attention: Work in progress - page under construction
Note: Important: use latest version of tool chain from web sites below. DO NOT use the ARM toolchain that comes with your Linux distribution
See https://gnu-mcu-eclipse.github.io/toolchain/arm/install/ for general explanations
$ mkdir -p ${HOME}/opt $ cd ${HOME}/opt $ tar xjf ~/Downloads/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 $ chmod -R -w /home/gerd/opt/gcc-arm-none-eabi-7-2017-q4-major/
$ /home/gerd/opt/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc-7.2.1 --version
arm-none-eabi-gcc-7.2.1 (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204] Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The complete toolchain documentation is available in the …/share/doc/pdf/ folder.
Check that GDB is installed in your Linux distribution by entering
$ gdb
The output should look like this:
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> [...]
If missing install with
apt-get install gdb
Installation:
$ cd ${HOME}/opt $ tar xvf ~/Downloads/gnu-mcu-eclipse-openocd-0.10.0-7-20180123-1217-centos64.tgz $ chmod -R -w gnu-mcu-eclipse/openocd/0.10.0-7-20180123-1217
Check OpenOCD installation:
$ ${HOME}/opt/gnu-mcu-eclipse/openocd/0.10.0-7-20180123-1217/bin/openocd --version
Output should be something like this:
GNU MCU Eclipse 64-bits Open On-Chip Debugger 0.10.0+dev-00404-g20463c28 (2018-01-23-12:24) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html
Install UDEV rules for USB OpenOCD probes:
# cp ${HOME}/opt/gnu-mcu-eclipse/openocd/0.10.0-7-20180123-1217/contrib/60-openocd.rules /etc/udev/rules.d/ # udevadm control --reload-rules # usermod -aG plugdev $USER
Install OpenOCD Debugging plugin, see here
Update OpenOCD path, see here
OpeOCD manual from sourceforge
eclipse & st-link/v2 tutorial
In Virtualbox make sure the STM-link/V2 adapter is connected through to virtual machine (check machine settings→USB)
In Eclipse hit green „Debug“ button.
$ cd /home/gerd/opt/ $ mkdir GnuMcuEclipse $ cd GnuMcuEclipse/ $ tar xvf /home/gerd/Downloads/20180125-1917-gnumcueclipse-4.3.2-oxygen-2-linux.gtk.x86_64.tar.gz
Make the GNU Arm toolchain location known to Eclipse in Project→Properties→C/C++ Build→Environment→PATH. add the path to GCC here (in this example we would add /home/gerd/opt/gcc-arm-none-eabi-7-2017-q4-major/bin ).
/home/gerd/opt/GnuMcuEclipse/eclipse/eclipse