Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
xenomai
xenomai
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • xenomai
  • xenomaixenomai
  • Wiki
  • Building_Applications_For_Xenomai_3

Last edited by Jan Kiszka Nov 22, 2018
Page history

Building_Applications_For_Xenomai_3

Building applications for Xenomai 3.x

Compiling a Xenomai 3 application

Please refer to this document for detailed explanations on the build and setup processes of a Xenomai application.

To sum it up, you should use the xeno-config script to get the proper compilation and linker flags related to Xenomai, in order to build your application for whichever Cobalt or Mercury core.

The complete usage of the xeno-config script can be found at this URL.

For the impatient, here is a trivial Makefile fragment retrieving the compiler and flags for building the single-file application vxapp.c, over the VxWorks emulation API:

XENO_CONFIG := /usr/xenomai/bin/xeno-config
CFLAGS := $(shell $(XENO_CONFIG) --vxworks --cflags)
LDFLAGS := $(shell $(XENO_CONFIG) --vxworks --ldflags)
CC := $(shell $(XENO_CONFIG) --cc)

EXECUTABLE := vxapp

all: $(EXECUTABLE)

%: %.c
	$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)

Compiling a RTDM-based module

The rules for building a regular kernel module/driver apply to RTDM-based drivers as well, with no additional requirement. For instance, the Makefile recipe for building some_driver.ko, composed of two files, namely foo.c and bar.c, based on the RTDM API, would be:

obj-y += some_driver.o
some_driver-y := foo.o bar.o

Building this module out of the kernel tree should be done from the directory containing the module sources, as follows:

$ make -C /path/to/kernel/tree M=$PWD modules
Before the driver module can be built for a dual kernel configuration, the target kernel tree must have been prepared and built as documented here.
Clone repository
  • Analogy_General_Presentation
  • Analogy_Practical_Presentation
  • App_Setup_And_Init
  • Archive
  • Benchmarking_With_Xeno_Test
  • Building_Applications_For_Xenomai_3
  • Building_Debian_Packages
  • CXP_RTDM
  • Common_Xenomai_Platform
  • Configuring_For_X86_Based_Dual_Kernels
  • Dealing_With_X86_IRQ_Sharing
  • Dealing_With_X86_SMI_Troubles
  • Dovetail
  • Driver_Serial_16550A
  • FAQ
View All Pages