Examples

From Xenomai

Jump to: navigation, search

[edit] Xenomai Example Repository

A set of small examples for programs and driver writers is maintained in the source code repository. To obtain it, check out directly from SVN:

svn co http://svn.gna.org/svn/xenomai/trunk/examples xenomai-examples

Then cd to the examples folder and invoke

make XENO=<xenomai-installation-path> KSRC=<xenomai-kernel-source>

If you are cross-compiling, invoke

make XENO=<xenomai-installation-path> ARCH=<kernel-architecture> KSRC=<xenomai-kernel-source>

This will build all examples in the subfolders. Alternatively, you can change to a specific subdir and start make directly there. The XENO variable sets the path for the Xenomai user space installation you want to build the examples against. You can omit this if the xeno-config script is in the current search path. KSRC specifies the Xenomai-enhanced Linux kernel you want to build the kernel space examples against. If you do not specify a path, the currently running kernel is used.

Each subdir in the repository that contains code also comes with a generic Makefile to build applications or drivers. It can be used as a starting point for own developments. All that has to be adopted in the common case is the Makefile head, specifically the APPLICATIONS and MODULES variables.

[edit] Example Contributions

If you feel some topic is not yet covered by existing demos or if you want to contribute a helpful example code, please post your runnable source code to any of the mailing lists. Alternatively, examples can be uploaded to this wiki, e.g. to a new article, and linked with this page.

Personal tools