wiki:WikiStart/Toolchain/RTPlatforms

Version 1 (modified by sylvain.joyeux, 7 years ago) (diff)

--

For Linux with the RT patchset, nothing special is required

For Xenomai, you have to realize that:

  • gdb is not accessible to the Xenomai tasks
  • doing non-RT things in a Xenomai tasks leads to primary-to-secondary domains switches which is expensive, so avoid that.

Compilation

Nothing special for LinuxRT

In the case of Xenomai, one usually compiles RTT two times: one time for gnulinux and one time for xenomai, so that it is possible to use both. Autoproj currently does not support this, so you will have do to one of the two compilations manually. The second compilation should be installed in the same prefix as the overall autoproj prefix (i.e. install/)

Which target each task should be compiled on is defined by the #orocos_target attribute on the autobuild tasks. Pick the "default" target using the global autoproj configuration option (the "the target operating system for Orocos/RTT (gnulinux or xenomai)" question) and then override this for the packages that you want to deploy on the other target by adding

setup_package("my/orogen/package") do |pkg|
  pkg.orocos_target = "xenomai"
end

to autoproj/overrides.rb

Deployment

There is the need for two things to run as a RT-task:

  • to be compiled for the RT OS that you chose
  • to be deployed as a realtime task

The second point requires you to create a manual deployment (automatic deployments always deploy as non-RT). Each RT task needs to be deployed with a priority and on the realtime scheduler with

deployment "controller" do
  task("can0", "canbus::Task").
    priority(80).
    realtime
end