1 How to build Xenomai C sample codes {#xenomai}
3 @brief Tutorial to build the Xenomai C sample code.
9 Xenomai brings POSIX and traditional RTOS APIs for porting time-critical applications to Linux-based platforms. When the native Linux kernel cannot meet the response time requirements of the application, Xenomai supplements it with Cobalt, a small real-time infrastructure which schedules time-critical activities independently from the main kernel logic.
11 # To build the C sample code
13 ## Using native toolchain
15 1. Copy sample.tar.gz contained in the programing guide from your PC to ioThinx:\n
16 For example, if the IP address of the ioThinx is "192.168.127.254", use the following command:
18 user@Linux:~$ scp sample.tar.gz moxa@192.168.127.254:~
20 2. Extract the sample code
22 moxa@Moxa:~$ tar zxvf sample.tar.gz
24 3. Build Xenomai sample code
26 moxa@Moxa:~$ cd sample/iothinx/c
27 moxa@Moxa:~/sample/iothinx/c$ ln -s toolchain-config-native-xenomai config.mk
28 moxa@Moxa:~/sample/iothinx/c$ cd api/xenomai
29 moxa@Moxa:~/sample/iothinx/c/api/xenomai$ make
33 moxa@Moxa:~/sample/iothinx/c/api/xenomai$ sudo ./scheduling_jitter -h
36 ## Using cross toolchain
38 1. Copy sample.tar.gz contained in the programing guide to your PC
39 2. Extract the sample code
41 user@Linux:~$ tar zxvf sample.tar.gz
43 3. Build Xenomai sample code
45 user@Linux:~$ cd sample/iothinx/c
46 user@Linux:~/sample/iothinx/c$ ln -s toolchain-config-cross-xenomai config.mk
47 user@Linux:~/sample/iothinx/c$ cd api/xenomai
48 user@Linux:~/sample/iothinx/c/api/xenomai$ make
50 4. Copy the sample program to ioThinx:\n
51 For example, if the IP address of the ioThinx is "192.168.127.254", use the following command:
53 user@Linux:~/sample/iothinx/c/api/xenomai$ scp scheduling_jitter moxa@192.168.127.254:~
55 5. Run the program on ioThinx
57 moxa@Moxa:~$ sudo ./scheduling_jitter -h