Here are the installation commands for a few Linux distributions.
NOTE
gdb-multiarchis the GDB command you'll use to debug your ARM Cortex-M programs
$ sudo apt-get install \
gdb-multiarch \
minicomNOTE
gdbis the GDB command you'll use to debug your ARM Cortex-M programs
$ sudo dnf install \
gdb \
minicomNOTE
arm-none-eabi-gdbis the GDB command you'll use to debug your ARM Cortex-M programs
$ sudo pacman -S \
arm-none-eabi-gdb \
minicomNOTE
arm-none-eabi-gdbis the GDB command you'll use to debug your ARM Cortex-M programs
For distros that don't have packages for ARM's pre-built
toolchain,
download the "Linux 64-bit" file and put its bin directory on your path.
Here's one way to do it:
$ mkdir -p ~/local && cd ~/local
$ tar xjf /path/to/downloaded/file/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2Then, use your editor of choice to append to your PATH in the appropriate
shell init file (e.g. ~/.zshrc or ~/.bashrc):
PATH=$PATH:$HOME/local/gcc-arm-none-eabi-9-2020-q2-update/bin
These rules let you use USB devices like the micro:bit without root privilege, i.e. sudo.
Create this file in /etc/udev/rules.d with the content shown below.
$ cat /etc/udev/rules.d/99-microbit.rules# CMSIS-DAP for microbit
SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", ATTR{idProduct}=="0204", MODE:="664"
Then reload the udev rules with:
$ sudo udevadm control --reload-rulesIf you had any board plugged to your computer, unplug them and then plug them in again.
Now, go to the next section.