![]() (Installing the C libraries is implied by installing GCC, but in case of trouble you can install the package libnewlib-arm-none-eabi explicitly.) $ sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi mercurial minicom geany geany-plugin-projectorganizer On Debian-based systems, all these can be installed by running as root the command Optionally, the programming environment geany.This can be installed on top of Python 2.7 with pip install -pre -U pyocd. A script called pyOCD that connects GDB with the debug interface of the micro:bit.The relevant C libraries – a package that Debian calls libnewlib-arm-none-eabi.We will also need the GNU assembler and binutils, but these should be dragged in with GCC. Note that the compiler is different from the one called gcc-arm-linux-gnueabihf that is needed to (cross)-compile for the Raspberry Pi. On Debian, the packages are called gcc-arm-none-eabi and gdb-arm-none-eabi – with the " none" indicating that there is no operating system on the board. ![]() The relevant ARM cross compiler versions of GCC and GDB.If you have a Raspberry Pi running the latest version of Raspbian ('Stretch'), then things should go smoothly, since Raspbian is a variant of Debian, and the required packages all exist.Alternatively, it should be possible to install the needed tools via Homebrew or MacPorts, noting that the ARM version of GCC that is needed is called gcc-arm-none-eabi, and is different from the gcc-arm-linux-gnueabihf that is needed for the compilers course. If you have a Mac, then the VirtualBox method is also available.There may be small problems if Windows and Debian decide to fight over the ownership of various USB devices. If you have a Windows machine, then the best way forward (apart from nuking Windows and installing Linux in its place) is probably to install VirtualBox, make a small Debian installation inside it, and install the toolchain in Debian.The instructions below are biased towards Debian, but should work without change on Debian derivatives such as Ubuntu. If you have a Linux machine, then all should go smoothly.You won't absolutely need to install the toolchain on your own machine to complete the course, but since you have a micro:bit to take away with you, it would be a shame not to do so. It's possible to install Geany on Windows and the Mac, but the Geany project files I've provided for the lab exercises may need adjustments, particularly for Windows, and I haven't investigated that. The notes below mostly refer to the basic toolchain – Make, the GNU C compiler and related utilities – and mostly omit installing the Geany programming environment that I've recommended for the course. The tools have been installed on the Fedora-based machines in the Software Lab, and should be easily installed on other flavours of Linux. These instructions will guide you through installing the relevant version of the GNU C compiler, binary file utilities, and other needed programs on a Linux machine, specifically one running Debian, or a Debian derivative such as Ubuntu.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |