Actions

EmSys

Setting up Embedded ARM Lab

From EdWiki

This section shows how to setup ARM development and testing environment on your PC, using GNU Arm Embedded Toolchain, OpenOCD, Eclipse, Visual Studio Code and Qemu for Embedded software development.

1. Install Java Runtime Environment (JRE)

  • Please follow this link to Install Java Runtime Environment (JRE)

2. Install GNU Toolchain for ARM

The GNU tool chains are available from the GNU gcc source, as well as from a number of vendors providing precompiled ready-to-use tool chains. GNU tool chain contains a compiler, an assembler, a linker, and additional utilities.

Command Name of the CodeSourcery Tool Chain
Function
Command (EABI Version)
Assembler
arm-none-eabi-as
C-Compiler
arm-none-eabi-gcc
Linker
arm-none-eabi-ld
Debugger
arm-none-eabi-gdb
Binary image generator
arm-none-eabi-objcopy
Disassembler
arm-none-eabi-objdump
  • Please follow this link to install GNU Arm Embedded Toolchain

3. Install OpenOCD

$ sudo apt-get update
$ sudo apt-get install openocd
  • Accessing Devices without sudo
    Follow this link to Configure Ubuntu Linux to allow a particular user to run OpenOCD for a device without sudo.

4. Install Visual Studio Code

Visual Studio Code on Linux. The repository and key can be installed manually with the following script:

$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
$ sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
$ sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] \
  https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

Then update the package cache and install the package using:

$ sudo apt-get install apt-transport-https
$ sudo apt-get update
$ sudo apt-get install code

5. Install Eclipse

  1. Running Eclipse
    This link shows you how to run Eclipse
  2. Configure Network Preferences
    To update/Install new plug-ins, Eclipse has to access the Internet. This link shows you, how to configure Eclipse such that it can access the Internet.
  3. Install C/C++ Hardware Debugging
    The default Eclipse C++ IDE package doesn't include support for Hardware Debugging which is necessary for embedded project debugging. Install C/C++ Hardware Debugging by following this link

6. Optional Tools

The following tools are not really required, but you can try installing and using them.

Install Version Control System (git)

Open your terminal window and type the following command:

sudo apt-get install git-core

Install Qemu

Qemu is a machine emulator capable of emulating various machines including ARM based machines. Qemu is

  • Open source machine emulator - the processor and the peripherals
  • Architectures – i386, ARM, MIPS, SPARC ...
  • Used by various open source projects

You can write ARM programs, compile them using the GNU toolchain and execute and test them in Qemu.

Qemu is available via Ubuntu's Advanced Packaging Tool (APT). Ubuntu users can download and install Qemu using the apt-get command. Open a terminal window and type:

$ sudo apt-get update
$ sudo apt-get install qemu-system-arm