Linux
Here are the installation commands for a few Linux distributions.
REQUIRED packages
Ubuntu 18.04 or newer / Debian stretch or newer
NOTE
gdb-multiarchis the GDB command you’ll use to debug your ARMCortex-M programs
1. $ sudo apt-get install \
2. gdb-multiarch \
3. minicom \
4. openocd
Ubuntu 14.04 and 16.04
NOTE
arm-none-eabi-gdbis the GDB command you’ll use to debug your ARMCortex-M programs
1. $ sudo apt-get install \
2. gdb-arm-none-eabi \
3. minicom \
4. openocd
Fedora 23 or newer
NOTE
arm-none-eabi-gdbis the GDB command you’ll use to debug your ARMCortex-M programs
1. $ sudo dnf install \
2. arm-none-eabi-gdb \
3. minicom \
4. openocd
Arch Linux
NOTE
arm-none-eabi-gdbis the GDB command you’ll use to debug your ARMCortex-M programs
1. $ sudo pacman -S \
2. arm-none-eabi-gdb \
3. minicom \
4. openocd
Other distros
NOTE
arm-none-eabi-gdbis the GDB command you’ll use to debug your ARMCortex-M programs
For distros that don’t have packages for ARM’s pre-builttoolchain,download the “Linux 64-bit” file and put its bin directory on your path.Here’s one way to do it:
1. $ mkdir -p ~/local && cd ~/local
2. $ tar xjf /path/to/downloaded/file/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2.tbz
Then, use your editor of choice to append to your PATH in the appropriateshell init file (e.g. ~/.zshrc or ~/.bashrc):
1. PATH=$PATH:$HOME/local/gcc-arm-none-eabi-7-2017-q4-major/bin
Optional packages
Ubuntu / Debian
1. $ sudo apt-get install \
2. bluez \
3. rfkill
Fedora
1. $ sudo dnf install \
2. bluez \
3. rfkill
Arch Linux
1. $ sudo pacman -S \
2. bluez \
3. bluez-utils \
4. rfkill
udev rules
These rules let you use USB devices like the F3 and the Serial module without root privilege, i.e.sudo.
Create these two files in /etc/udev/rules.d with the contents shown below.
1. $ cat /etc/udev/rules.d/99-ftdi.rules
1. # FT232 - USB <-> Serial Converter
2. ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE:="0666"
1. $ cat /etc/udev/rules.d/99-openocd.rules
1. # STM32F3DISCOVERY rev A/B - ST-LINK/V2
2. ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE:="0666"
4. # STM32F3DISCOVERY rev C+ - ST-LINK/V2-1
5. ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666"
Then reload the udev rules with:
1. $ sudo udevadm control --reload-rules
If you had any board plugged to your laptop, unplug them and then plug them in again.
Now, go to the next section.
