Start the RIOT ‐ Getting started with RIOT
Requirements
TODO: Collect the requirements.
Get the source code
You can obtain RIOT either by cloning the git repositories or download the latest tarballs.
Using the git repository
In order to obtain RIOT from the official GitHub
repositories, please perform the following commands:
The kernel
git clone git://github.com/RIOT-OS/RIOT.git
The platform configurations
git clone git://github.com/RIOT-OS/boards.git
or
git clone git://github.com/RIOT-OS/thirdparty_boards.git
git clone git://github.com/RIOT-OS/thirdparty_cpu.git
Optional (recommended): Examplary projects
git clone git://github.com/RIOT-OS/projects.git
Download the tarballs
TODO: Build tarballs!
You can either build RIOT for one of the supported hardware platforms (check
our website) or try the native port. As a special platform,
you will find a CPU and board called native in the repository. This
target allows you to run RIOT as a process on Linux on most supported hardware
platforms. Just set CPU and BOARD to native in your
project's Makefile, call make, and execute the resulting elf-file.
For ARM
Download and install GNU Tools for ARM Embedded Processors according
to the information provided on the website.
TODO: Check if this is working with all supported ARM
architectures
For MSP430
Download and install GCC toolchain for MSP430 according
to the information provided on the website.
For the native port
In order to build RIOT for the native port, you just need the GNU
Compiler Collection.
Setup a flashing tool
For MSB-A2
- Enter the boards directory and change to msba2-common/tools.
- Call make.
- Either run make install (you will need probably superuser
rights to do this, i.e. you could run sudo make install) or add
boards/msba2-common/tools/bin/ to your PATH variable.
- Install the driver for the FTDI chip from
FTDI homepage.
For MSB-430H
TODO
For redbee-econotag
TODO
For STM32F4DISCOVERY
TODO
Optional: Hello World!
If you have obtained a copy of the projects repository, you can build the
famous Hello World application for RIOT.
- Enter the projects directory and change to hello-world.
- Edit the Makefile to set the variables RIOTBASE and
RIOTBOARD according to where your copies of the RIOT repositories are located.
- Dependent on your target platform set the BOARD environment
variable and call make, e.g. BOARD=msb-430h make.
- Now you program the resulting hex file on your target platform by calling
make flash.
- Finally see the output of the application by running make term.
Write your first application
To write your own RIOT application, you just need a Makefile and C file(s)
containing your source code. A template Makefile is available in the dist
folder of the RIOT repository.
One of the C files has to provide a main function according to this
prototype:
void main(void);
Within your project's Makefile, you can define the modules you want to use.
Unless specified otherwise, make will create an
elf-file as well as an Intel hex file in the bin folder of your project
directory.