From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <823c2008-4b4b-9b0a-a84c-ee60b4304506@xenomai.org> References: <854aec2d-861e-f17e-e57c-d86e9f5e7a90@xenomai.org> <14040d9b-3b4b-9677-05d0-24773e309310@xenomai.org> <20bffd5c-9f11-3bb2-236a-11764a129059@xenomai.org> <49cd0e96-fde0-4d7a-17bc-5ae18d10baac@xenomai.org> <1dd59300-7763-e9f3-cda8-2f2548e9e96c@xenomai.org> <823c2008-4b4b-9b0a-a84c-ee60b4304506@xenomai.org> From: Pintu Kumar Date: Mon, 2 Apr 2018 19:18:36 +0530 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Xenomai] Simple application for invoking rtdm driver List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe Gerum Cc: "Xenomai@xenomai.org" Hi, I tried changing "native" skin to "alchemy" skin and replaced header from native/timer.h to alchemy/timer.h But when I build my rtdm application, I get below error: app_test.c: In function =E2=80=98main=E2=80=99: app_test.c:41:7: warning: implicit declaration of function =E2=80=98rt_dev_open=E2=80=99 [-Wimplicit-function-declaration] fd =3D rt_dev_open(DEVICE_NAME, O_RDWR); ^ app_test.c:50:8: warning: implicit declaration of function =E2=80=98rt_dev_write=E2=80=99 [-Wimplicit-function-declaration] ret =3D rt_dev_write(fd, msg, len); ^ app_test.c:65:8: warning: implicit declaration of function =E2=80=98rt_dev_read=E2=80=99 [-Wimplicit-function-declaration] ret =3D rt_dev_read(fd, buff, len); ^ app_test.c:76:2: warning: implicit declaration of function =E2=80=98rt_dev_close=E2=80=99 [-Wimplicit-function-declaration] rt_dev_close(fd); ^ /tmp/ccTcHyFz.o: In function `main': app_test.c:(.text.startup+0x45): undefined reference to `rt_dev_open' app_test.c:(.text.startup+0x85): undefined reference to `rt_dev_write' app_test.c:(.text.startup+0xf2): undefined reference to `rt_dev_read' app_test.c:(.text.startup+0x15e): undefined reference to `rt_dev_close' collect2: error: ld returned 1 exit status Makefile:11: recipe for target 'app_test' failed make: *** [app_test] Error 1 --------------------------------------- I even tried adding "-lrtdm" to the cflags but it did not work. skin =3D alchemy CC :=3D $(shell $(INSTALL_PATH)/xeno-config --cc) CFLAGS :=3D $(shell $(INSTALL_PATH)/xeno-config --skin=3D$(skin) --cflags) -O2 -lrtdm I am using Xenomai-3.0. Is there any specific library I need to include for alchemy with RTDM API? Thanks, Pintu On Tue, Mar 27, 2018 at 6:35 PM, Philippe Gerum wrote: > On 03/27/2018 02:09 PM, Pintu Kumar wrote: >> Hi, >> >> Thank you so much for all your explanation. >> But, before I dig deeper, I have some simple questions which is troublin= g me. >> >> 1) In Idle case, we see latency improvement (~2-3 micro-seconds on >> average) using Xenomai native task application, compared to normal >> posix thread application (with 100 us sleep). >> Then why not it is seen with RTDM driver and its application ? >> >> 2) In the idle case itself, we have seen read/write latency >> improvement using RTNET (loopback) and simple UDP client/server >> application using Xenomai posix skin >> Then why not same is visible with RTDM driver? >> > > All answers have already been given, or can be inferred fairly easy from > what was said earlier. > > On a general note, it is safer not to compare apples and oranges when it > comes to benchmarking: two different codes usually do things > differently, so you may simply not be measuring the same work load. If > you really want to figure out what happens, you may need to dive into > the implementation. > >> 3) How to choose, when to develop a Xenomai native application, and >> when to simply convert using posix skin ? >> > > Choose portability with POSIX. The so-called "native" - now Alchemy API > - was defined 14 years ago for a single purpose: make greybards coming > from the traditional RTOS world comfortable with API semantics close to > what they were used to with VxWorks, VRTX, pSOS and friends. > > Alchemy exists in Xenomai 3 only for the purpose of making the life of > people migrating from 2.x easier. > > -- > Philippe.