Skip to content
Ludwig Ortmann edited this page Mar 1, 2014 · 32 revisions

There's currently only one cpu/board in this family: Board: native

Known Issues

Check the list of open issues labeled native in the github issue tracker

Toolchains

Working:

  • gnu libc 2.13
  • gcc 4.4.6

Host Systems

As a rule of thumb: native is developed primarily on Arch Linux, so this should always be the most reliable platform.

Working:

  • Arch Linux
  • Debian 7 Wheezy (Stable)
  • Ubuntu 12.04 Precise Pangloin (LTS)
  • Ubuntu 13.10 Saucy Salamander
  • OS X 10.8 Mountain Lion
  • OS X 10.9 Mavericks

Not Working:

  • Windows (any version)

Dependencies

Ubuntu 13.10 Saucy Salamander

Valgrind troubleshooting

You may encounter the following error message, even though libc6-dbg is installed:

==11361== Memcheck, a memory error detector
==11361== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==11361== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==11361== Command: ./bin/native/aodvv2_node.elf tap0
==11361== 

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:  
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld-linux.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux.so.2
valgrind:  
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind:  
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind:  
valgrind:  Cannot continue -- exiting now.  Sorry.

To enable the use of Valgrind, change the lines in /etc/apt/sources.list from something like

deb http://archive.ubuntu.com/ubuntu saucy main

to

deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu saucy main

and execute

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6-dbg:i386

Profiling

Valgrind/cachegrind

You can use the Valgrind tool cachegrind to profile native processes.

Usage:

make -B clean all-valgrind
valgrind --tool=cachegrind ./bin/native/default.elf tap0
cg_annotate cachegrind.out.18541

The cachegrind file name contains the process ID as a suffix, so you can create profiles for several instances at the same time. You can also use the kcachegrind GUI to investigate the cachegrind files.

Valgrind/callgrind

Profiling with callgrind is not working at the moment.

gprof

Profiling with gprof will be supported when https://github.com/RIOT-OS/RIOT/pull/789 is merged.

Clone this wiki locally