* Application compile problem when use RTnet
@ 2019-03-17 7:35 李冰
0 siblings, 0 replies; 3+ messages in thread
From: 李冰 @ 2019-03-17 7:35 UTC (permalink / raw)
To: xenomai
Hi everyone:
I am new to RTnet. I am using xenomai + RTnet in Ubuntu,Xenomai version
3.0.5, Linux kernal version 4.9.38. And the ethernet card is Intel e1000.
I am going to program use RTnet to communicate with another device called
RTDS. And I can’t find any example in except demo in Xenomai 2. So I try to
compile the demo code in Xenomai 2.But I got an error when I compile the
demo code. The code in demo is as below:
#include <alchemy/task.h>
#include <rtdm/rtdm.h>
#include <trank/rtdm/rtdm.h>
// #include <rtdm/uapi/rtdm.h> The original code in the example, but there
is no rtdm.h file in uapi folder.
#include <linux/net.h> /* required for rt_task_wait_period() changes */
When I compile the code, It throw an error :
```
In file included from frag-ip.c:37:0:
/usr/xenomai/include/trank/rtdm/rtdm.h:21:28: fatal error: rtdm/rtdm.h: No
such file or directory
compilation terminated.
```
The error is from “/usr/xenomai/include/trank/rtdm/rtdm.h” , and I put the
code below in rtdm.h
#ifndef _XENOMAI_TRANK_RTDM_RTDM_H
#define _XENOMAI_TRANK_RTDM_RTDM_H
#include_next <rtdm/rtdm.h> //Error is form this statement
#ifdef __cplusplus
extern "C" {
#endif
I use the makefile as below:
XENO_CONFIG := /usr/xenomai/bin/xeno-config
CFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --cflags)
LDFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --ldflags)
CC := gcc
EXECUTABLE := frag-ip
all: $(EXECUTABLE)
%: %.c
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
I am so confused, and I can’t sovle the problem , so if there some one
understand where this problem is?
Thanks for everyone who spend time to give me some help!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Application compile problem when use RTnet
2019-03-18 1:13 李冰
@ 2019-03-18 6:18 ` Ashwin Narayan
0 siblings, 0 replies; 3+ messages in thread
From: Ashwin Narayan @ 2019-03-18 6:18 UTC (permalink / raw)
To: 李冰; +Cc: xenomai
On Mon, Mar 18, 2019 at 9:13 AM 李冰 via Xenomai <xenomai@xenomai.org> wrote:
> Hi everyone:
>
> I am new to RTnet. I am using xenomai + RTnet in Ubuntu,Xenomai version
> 3.0.5, Linux kernal version 4.9.38. And the ethernet card is Intel e1000.
>
> I am going to program use RTnet to communicate with another device called
> RTDS. And I can’t find any example in except demo in Xenomai 2. So I try to
> compile the demo code in Xenomai 2.But I got an error when I compile the
> demo code. The code in demo is as below:
>
>
>
> #include <alchemy/task.h>
>
> #include <rtdm/rtdm.h>
>
> #include <trank/rtdm/rtdm.h>
>
> // #include <rtdm/uapi/rtdm.h> The original code in the example, but
> there
> is no rtdm.h file in uapi folder.
>
> #include <linux/net.h> /* required for rt_task_wait_period() changes */
>
>
>
> When I compile the code, It throw an error :
>
> ```
>
> In file included from frag-ip.c:37:0:
>
> /usr/xenomai/include/trank/rtdm/rtdm.h:21:28: fatal error: rtdm/rtdm.h: No
> such file or directory
>
> compilation terminated.
>
> ```
>
> The error is from “/usr/xenomai/include/trank/rtdm/rtdm.h” , and I put the
> code below in rtdm.h
>
>
>
> #ifndef _XENOMAI_TRANK_RTDM_RTDM_H
>
> #define _XENOMAI_TRANK_RTDM_RTDM_H
>
> #include_next <rtdm/rtdm.h> //Error is form this statement
>
> #ifdef __cplusplus
>
> extern "C" {
>
> #endif
>
>
>
> I use the makefile as below:
>
>
>
> XENO_CONFIG := /usr/xenomai/bin/xeno-config
>
> CFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --cflags)
>
> LDFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --ldflags)
>
> CC := gcc
>
> EXECUTABLE := frag-ip
>
> all: $(EXECUTABLE)
>
> %: %.c
>
> $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
>
>
>
> I am so confused, and I can’t sovle the problem , so if there some one
> understand where this problem is?
>
> Thanks for everyone who spend time to give me some help!
>
>
> Hi,
I think that you might have to include the "--rtdm" in xeno-config. I've
had some issues with compiling code when I don't put in that flag. However,
I am using the alchemy api so things may be different. But you can try and
see anyway.
Best,
-Ashwin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Application compile problem when use RTnet
@ 2019-03-18 1:13 李冰
2019-03-18 6:18 ` Ashwin Narayan
0 siblings, 1 reply; 3+ messages in thread
From: 李冰 @ 2019-03-18 1:13 UTC (permalink / raw)
To: xenomai
Hi everyone:
I am new to RTnet. I am using xenomai + RTnet in Ubuntu,Xenomai version
3.0.5, Linux kernal version 4.9.38. And the ethernet card is Intel e1000.
I am going to program use RTnet to communicate with another device called
RTDS. And I can’t find any example in except demo in Xenomai 2. So I try to
compile the demo code in Xenomai 2.But I got an error when I compile the
demo code. The code in demo is as below:
#include <alchemy/task.h>
#include <rtdm/rtdm.h>
#include <trank/rtdm/rtdm.h>
// #include <rtdm/uapi/rtdm.h> The original code in the example, but there
is no rtdm.h file in uapi folder.
#include <linux/net.h> /* required for rt_task_wait_period() changes */
When I compile the code, It throw an error :
```
In file included from frag-ip.c:37:0:
/usr/xenomai/include/trank/rtdm/rtdm.h:21:28: fatal error: rtdm/rtdm.h: No
such file or directory
compilation terminated.
```
The error is from “/usr/xenomai/include/trank/rtdm/rtdm.h” , and I put the
code below in rtdm.h
#ifndef _XENOMAI_TRANK_RTDM_RTDM_H
#define _XENOMAI_TRANK_RTDM_RTDM_H
#include_next <rtdm/rtdm.h> //Error is form this statement
#ifdef __cplusplus
extern "C" {
#endif
I use the makefile as below:
XENO_CONFIG := /usr/xenomai/bin/xeno-config
CFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --cflags)
LDFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --ldflags)
CC := gcc
EXECUTABLE := frag-ip
all: $(EXECUTABLE)
%: %.c
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
I am so confused, and I can’t sovle the problem , so if there some one
understand where this problem is?
Thanks for everyone who spend time to give me some help!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-18 6:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17 7:35 Application compile problem when use RTnet 李冰
2019-03-18 1:13 李冰
2019-03-18 6:18 ` Ashwin Narayan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.