Menu

Compile and run a small xenomai example application

root@raspberrypi:/opt/raspberrypi/xenomai-2.6.1/examples/native# make
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -DXENO -lnative -L/usr/xenomai/lib -lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib trivial-periodic.c -o trivial-periodic
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -DXENO -lnative -L/usr/xenomai/lib -lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib sigdebug.c -o sigdebug
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -DXENO rtprint.c -lnative -L/usr/xenomai/lib -lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib -o rtprint

  • Start task rtprint
    root@raspberrypi:/opt/raspberrypi/xenomai-2.6.1/examples/native# ./rtprint

  • View the realtime processe list on another terminal:

    root@raspberrypi:/usr/xenomai/sbin# ./rtps
    PID TIME THREAD CMD

0 000:50:11.049,342 ROOT -
4610 000:00:01.035,249 Task 1 ./rtprint
4613 000:00:01.597,719 Task 2 ./rtprint
0 000:00:14.275,205 IRQ3: [timer]

- Kill the task with Ctrl + C (it may take a long time to terminate)

Posted by Joscha Ihl 2012-10-20

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.