Note: Attention: Work in progress - page under construction
UHSDR development - toolchain for Debian
Preconditions, Assumptions, Scope
- Using Debian version buster/sid
- Install on Win10 PC with Virtualbox
- ARM toolchain for Linux
- GDB
- Eclipse
- Check installation with test project
GNU ARM toolchain for Linux
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
Install Arm toolchain for Linux
- Download the latest Linux install tarball file from ARMDeveloper
- Link to download: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
- Assuming downloaded file is in /home/gerd/Downloads, open terminal with user gerd:
$ 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/
- Test if the compiler is functional; use the actual install path:
$ /home/gerd/opt/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc-7.2.1 --version
- Output should be like this:
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.
GDB - GNU Debugger & OpenOCD
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
- Latest GNU MCU OpenOCD binaries can be found here.
- This leads e.g. to these binary files
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.
GNU MCU Eclipse and CDT
- Install Eclipse and CDT
- Download GNU MCU Eclipse IDE for C/C++ Developers from GitHub Releases
- Releases are archived here: See https://github.com/gnu-mcu-eclipse/org.eclipse.epp.packages/releases/
- Download latest release. At time of writing this is https://github.com/gnu-mcu-eclipse/org.eclipse.epp.packages/releases/download/v4.3.2-20180125-o2/20180125-1917-gnumcueclipse-4.3.2-oxygen-2-linux.gtk.x86_64.tar.gz
- Release Notes for latest release here: https://gnu-mcu-eclipse.github.io/blog/2018/01/25/plugins-v4.3.2-201801250917-released/
$ 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 ).
Launch Eclipse to test installation
- Launch eclipse to test installation
/home/gerd/opt/GnuMcuEclipse/eclipse/eclipse
Build Test Project to check all is ok
- Build a test project to see if all ok https://gnu-mcu-eclipse.github.io/tutorials/blinky-arm/