xenomai

Periodic thread fails real-time in Xenomai

我与影子孤独终老i 提交于 2019-12-22 18:01:40
问题 I'm creating a periodic thread which outputs a square signal on an analogic output. I'm using Posix Skin and Analogy from the Xenomai API. I tested the real-time performance of my code using an oscilloscope and looking at the latency on the square signal (whose frequency is 1kHz). I am supposed to achieve <100us latency. However, the signal is strongly (>250us latency) perturbated by common interruption signals, like moving the mouse, starting a new program, etc. The flags in my makefile are

Installation steps for xenomai 3 on Ubuntu 16.04

爱⌒轻易说出口 提交于 2019-12-22 17:49:09
问题 I would like to install Xenomai 3 on Ubuntu 16.04 LTS. I wan unable to find any proper installation guide/procedure for the same. Request help. 回答1: Notes on Installing the Cobalt core 1) Download Ubuntu 16.04.1 (v4.4 kernel) from: http://old-releases.ubuntu.com/releases/16.04.1/ Install on USB drive using: Universal USB Installer 2) Download: linux-4.4.43.tar.gz from: https://www.kernel.org/pub/linux/kernel/v4.x/ 3) Download: xenomai-3.0.3.tar.bz2 from: https://xenomai.org/downloads/xenomai

Xenomai clock_nanosleep in POSIX skin jumps to Linux Kernel

自作多情 提交于 2019-12-13 01:26:34
问题 I'm testing POSIX skin in Xenomai. I'm trying to read and write from some GPIOs on a Raspberry Pi, and when I execute the program, there is an increasing number of context switching (in /proc/xenomai/stat/). The main of the program maps the GPIOs to memory and starts the pthreads. The pthread that makes trouble is this: void *productive_thread(void *arg) { struct timespec delay, sleep; unsigned long over; delay.tv_sec = 0; delay.tv_nsec = 10000; // 10 usec sleep.tv_sec = 0; sleep.tv_nsec = *

xenomai xddp with std::thread

放肆的年华 提交于 2019-12-12 03:33:53
问题 I need to perform RT to NRT communication on a Xenomai machine. I'm actually able to compile and run the example proposed here But if try to replace the pthreads with std::thread , as follows: #include <sys/mman.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <string.h> #include <malloc.h> #include <pthread.h> #include <fcntl.h> #include <errno.h> #include <rtdk.h> #include <rtdm/rtipc.h> #include <iostream> #include <thread> #define XDDP_PORT_LABEL

Function which takes a pthread as input and suspends it

ⅰ亾dé卋堺 提交于 2019-12-07 12:12:46
问题 I'm trying to port the real time Thread_Metric from ExpressLogic in POSIX, in order to benchmark PREEMPT_RT patches for Linux, Xenomai and RTAI for my thesis. They provide a C source file with the following functions, which you have to implement in order for the benchmark to work: void tm_initialize(void (*test_initialization_function)(void)); int tm_thread_create(int thread_id, int priority, void (*entry_function)(void)); int tm_thread_resume(int thread_id); int tm_thread_suspend(int thread

Periodic thread fails real-time in Xenomai

故事扮演 提交于 2019-12-06 12:28:48
I'm creating a periodic thread which outputs a square signal on an analogic output. I'm using Posix Skin and Analogy from the Xenomai API. I tested the real-time performance of my code using an oscilloscope and looking at the latency on the square signal (whose frequency is 1kHz). I am supposed to achieve <100us latency. However, the signal is strongly (>250us latency) perturbated by common interruption signals, like moving the mouse, starting a new program, etc. The flags in my makefile are set up as such: gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -I/usr/xenomai/include

Installation steps for xenomai 3 on Ubuntu 16.04

故事扮演 提交于 2019-12-06 08:55:31
I would like to install Xenomai 3 on Ubuntu 16.04 LTS. I wan unable to find any proper installation guide/procedure for the same. Request help. Notes on Installing the Cobalt core 1) Download Ubuntu 16.04.1 (v4.4 kernel) from: http://old-releases.ubuntu.com/releases/16.04.1/ Install on USB drive using: Universal USB Installer 2) Download: linux-4.4.43.tar.gz from: https://www.kernel.org/pub/linux/kernel/v4.x/ 3) Download: xenomai-3.0.3.tar.bz2 from: https://xenomai.org/downloads/xenomai/stable/latest/ Unzip to /usr/src 4) Download: ipipe-core-4.4.43-x86-6.patch from: https://xenomai.org

Function which takes a pthread as input and suspends it

大城市里の小女人 提交于 2019-12-05 19:23:38
I'm trying to port the real time Thread_Metric from ExpressLogic in POSIX, in order to benchmark PREEMPT_RT patches for Linux, Xenomai and RTAI for my thesis. They provide a C source file with the following functions, which you have to implement in order for the benchmark to work: void tm_initialize(void (*test_initialization_function)(void)); int tm_thread_create(int thread_id, int priority, void (*entry_function)(void)); int tm_thread_resume(int thread_id); int tm_thread_suspend(int thread_id); void tm_thread_relinquish(void); void tm_thread_sleep(int seconds); int tm_queue_create(int queue

Error Invalid use of void expression

£可爱£侵袭症+ 提交于 2019-11-30 19:18:57
I have a function int rt_task_start (RT_TASK *task, void(*task_func)(void *arg), void *arg) where in second argument i am passing a function with argument. When i only pass a function name at that time there is no problem.(as expected it's working). rt_task_start(&demo_task1, demo, 1); But when i pass rt_task_start(&demo_task1, demo(&val), 1); it's giving me error error: invalid use of void expression . Variable val is defined before. int val = 0; When i call with this rt_task_start(&demo_task1, demo(val), 1); this is showing error Warning passing argument 1 of 'demo' makes pointer from

Error Invalid use of void expression

我与影子孤独终老i 提交于 2019-11-30 03:47:10
问题 I have a function int rt_task_start (RT_TASK *task, void(*task_func)(void *arg), void *arg) where in second argument i am passing a function with argument. When i only pass a function name at that time there is no problem.(as expected it's working). rt_task_start(&demo_task1, demo, 1); But when i pass rt_task_start(&demo_task1, demo(&val), 1); it's giving me error error: invalid use of void expression . Variable val is defined before. int val = 0; When i call with this rt_task_start(&demo