Skip to content

Howto: Create a VirtualBox Image for RIOT development

Hauke Petersen edited this page Apr 14, 2014 · 3 revisions

Howto setup a Linux image in VirtualBox for RIOT development

This guide will take you through the installation and configuration of a minimal Linux image for developing RIOT. This is useful in the following scenarios:

  • Windows users using this image can use all the scripts and tools that were made for Linux
  • Having a consistent environment for recursive testing
  • more?

1. Install VirtualBox

As first step you have to install VirtualBox on your host system. Just follow the instructions on the VirtualBox website for your system.

2. Download Linux

For creating the development image, you have to download a Linux image first.

For this howto, Mint Linux 16 "Petra" (32-bit) with Xfce is chosen, as it provides small footprint and easy to use foundation.

You can of course choose any other Linux distribution of your choice, but you may have to alter the following steps.

3. Create a new image

Once you started VirtualBox, you have to create a new image. VirtualBox provides a wizard dialog for this, use the following options:

  • Name: RIOT-dev (or whatever you want to name your image)

  • Type: Linux

  • Type: Ubuntu

  • Memory size: 512MB

  • Create a virtual hard drive now

  • Hard drive type: VDI

  • Dynamically allocated size

  • File location and size: 8GB, choose the location where you want your computer to store the image file

Thats it, your newly created image should show up on the left hand side of the VirtualBox UI. For better performance you should adjust the Display properties to use 64MB and enable 3D acceleration.

4. Install Linux

Now select the image on the left and press Start. A blank window will open together with a wizard window asking you to select a start-up disk. In this dialog select the Linux Mint image you downloaded in step 2, then press start.

Now Linux Mint will start. Once on the Desktop, double click Install Linux Mint and follow the instructions using the default options.

Username: riot password: riot

5. Installing installing some needed Software

For now you have a 'bare' working system. To make it usable, some basic and useful software needs to be installed. For this, open a terminal and install the following packages:

  • vim (useful but cryptic text editor)
  • build-essential (gcc, std-c-lib and other build tools)
  • git
  • valgrind

6. Installing ARM cross toolchain

GCC ARM Embedded (Launchpad) toolchain for ARM Cortex-Mx:

  • add repository: sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  • apt update: sudo apt-get update
  • install: sudo apt-get install gcc-arm-none-eabi

CodeSourcery 2013.11 toolchain for ARM7:

  • goto sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded and download the linux intaller for the codesourcery 2013.11 arm-none-eabi-gcc
  • execute binary and follow instructions of graphical installer

MSP430 toolchain, install following packages:

  • gcc-msp430
  • gdb-msp430
  • msp430-libc
  • mspdebug

7. Clone RIOT

Clone the RIOT github repository by typing git clone [email protected]:RIOT-OS/RIOT.git in the directory of your choice.

8. Happy hacking!

Clone this wiki locally