You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ludwig Ortmann 13bd2a2b3b native: increase rtc realism
Prevent rtc enabling when not initialized.
9 years ago
include native: cleanup 9 years ago
net native: enable reboot with tap 9 years ago
rtc native: increase rtc realism 9 years ago
Makefile native: override INCLUDES w/ NATIVEINCLUDES 9 years ago
Makefile.include Don't use INCLUDES for building any native at all. 10 years ago native: update README 10 years ago
atomic_cpu.c documentation: append my email to my name everywhere 10 years ago
crash.c native: add missing include 10 years ago
hwtimer_cpu.c core: removed duplicated hwtimer_arch.h 9 years ago
irq_cpu.c Fix a few cppcheck findings 9 years ago
lpm_cpu.c Fix all warnings for native and qemu-i386 9 years ago
native_cpu.c Fix a few cppcheck findings 9 years ago
startup.c native: cleanup 9 years ago
syscalls.c native: cleanup 9 years ago native: add 10 years ago native cc1100x_ng network 10 years ago allow for custom tap names 10 years ago
tramp.S documentation: append my email to my name everywhere 10 years ago

Valgrind Support

Rebuild your application using the all-valgrind target like this:

make -B clean all-valgrind

That way native will tell Valgrind about RIOT's stacks and prevent Valgrind from reporting lots of false positives. The debug information flag -g is not strictly necessary, but passing it allows Valgrind to tell you precisely which code triggered the error.

To run your application run:

make term-valgrind

All this does is run your application under Valgrind. Now Valgrind will print some information whenever it detects an invalid memory access.

In order to debug the program when this occurs you can pass the --db-attach parameter to Valgrind. E.g:

valgrind --db-attach=yes ./bin/native/default.elf tap0

Now, you will be asked whether you would like to attach the running process to gdb whenever a problem occurs.

In order for this to work under Linux 3.4 or newer, you might need to disable the ptrace access restrictions: As root call:

echo 0 > /proc/sys/kernel/yama/ptrace_scope

Network Support

If you compile RIOT for the native cpu and include the native_net module, you need to specify a network interface like this:

make term PORT=tap0

Setting Up A Tap Network

There is a shellscript in RIOT/cpu/native called which you can use to create a network of tap interfaces.

Usage: To create a bridge and two (or count at your option) tap interfaces:

./ create [count]

To delete the bridge and all tap interfaces:

./ delete

OSX Tap Networking

For tun/tap networking in OSX you will need:

For OSX there is a separate script called Run it, (it instructs you to start the RIOT instances). In contrast to Linux you will need to run delete after killing your instances and rerun create before restarting.

FreeBSD Tap Networking

For FreeBSD there is a separate script called


You can daemonize a riot process. This is useful for larger networks. Valgrind will fork along with the riot process and dump its output in the terminal.


./bin/native/default.elf -d

Use UART redirection if you want to use a shell or get stderr/stdout output with/from a daemonized process.

UART Redirection

You can redirect the processes' stdin/stdout/stderr by specifying one or more options from below.

UNIX socket

To redirect stdio to a UNIX socket run:

./bin/native/default.elf -u -d
RIOT pid: 18663

Attach this UNIX socket:

nc -U /tmp/riot.tty.18663

TCP socket

To redirect stdio to a TCP socket:

./bin/native/default.elf -t 4711 -d
RIOT pid: 18663

Attach this TCP socket:

nc localhost 4711

Stop the process:

kill 18663

File for stderr

To redirect stderr to a file:

./bin/native/default.elf -d -e
RIOT pid: 18663

Read from it:

tail -f /tmp/riot.stderr.18663

File for stdout

To redirect stdout to a file:

./bin/native/default.elf -d -o
RIOT pid: 18663

Read from it:

tail -f /tmp/riot.stdout.18663


The stdout redirection only writes to file while no socket connection is established.

Socket redirection is only available when the UART module has been compiled in.

Compile Time Options

Compile with


to exit the riot core after the last thread has exited.