All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] hello xenomai world?
@ 2007-02-22 11:11 roland Tollenaar
  2007-02-22 11:26 ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: roland Tollenaar @ 2007-02-22 11:11 UTC (permalink / raw)
  To: xenomai

Hi,

I must be making a big mistake. I am browsing through latency in
testsuit trying to learn how to set up some tasks that will execute at
regular intervals. I kind of had RTAI examples in mind which seemed
rather simple to me. Looking at the code in latency is a horrible
shock.

Is it at all possible to explain in a couple of lines how a periodic
task can be run, lets say a hello world example that puts out the line
"hello xenomai world" exactly every 1ms?

Otherwise is there an example that will make this clear somewhere?

thanks in advance.

Roland.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] hello xenomai world?
  2007-02-22 11:11 [Xenomai-help] hello xenomai world? roland Tollenaar
@ 2007-02-22 11:26 ` Jan Kiszka
  2007-02-22 12:56   ` roland Tollenaar
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2007-02-22 11:26 UTC (permalink / raw)
  To: roland Tollenaar; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

roland Tollenaar wrote:
> Hi,
> 
> I must be making a big mistake. I am browsing through latency in
> testsuit trying to learn how to set up some tasks that will execute at
> regular intervals. I kind of had RTAI examples in mind which seemed
> rather simple to me. Looking at the code in latency is a horrible
> shock.
> 
> Is it at all possible to explain in a couple of lines how a periodic
> task can be run, lets say a hello world example that puts out the line
> "hello xenomai world" exactly every 1ms?

See examples/native/trivial-periodic.c

Also read the comments. :)

To overcome the latency issue of printf, there is some patch in sight:

https://mail.gna.org/public/xenomai-core/2007-02/msg00087.html

specifically

https://mail.gna.org/public/xenomai-core/2007-02/msg00089.html

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] hello xenomai world?
  2007-02-22 11:26 ` Jan Kiszka
@ 2007-02-22 12:56   ` roland Tollenaar
  2007-02-22 13:25     ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: roland Tollenaar @ 2007-02-22 12:56 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

Hi Jan,

Thanks that looks a lot more comprehensible. I cannot make it however
it seems to rely on a big heap of XENOCONFIG things. Due to my live
setup those must have got lost. Are they stored somewhere (I see a
xeno_config file mentioned somewhere) and can I load them in some easy
manner? Otherwise where would be the best place to learn what they are
and how I must get them into the shell environment?

I am also looking at your url to the xenomai CAN documentation. Strangely
when I read about it there is looks a lot more friendly than in the
code or the utils.

I will presume (and hope)  that what I have to do is just much simpler
than what Wolfgang is doing there :)

I won;t be using printf in my final application I hope. It will be in
C++ with Qt and I fear I am going to battle my bum off to get that
going......

Roland


Roland.


On 2/22/07, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> roland Tollenaar wrote:
> > Hi,
> >
> > I must be making a big mistake. I am browsing through latency in
> > testsuit trying to learn how to set up some tasks that will execute at
> > regular intervals. I kind of had RTAI examples in mind which seemed
> > rather simple to me. Looking at the code in latency is a horrible
> > shock.
> >
> > Is it at all possible to explain in a couple of lines how a periodic
> > task can be run, lets say a hello world example that puts out the line
> > "hello xenomai world" exactly every 1ms?
>
> See examples/native/trivial-periodic.c
>
> Also read the comments. :)
>
> To overcome the latency issue of printf, there is some patch in sight:
>
> https://mail.gna.org/public/xenomai-core/2007-02/msg00087.html
>
> specifically
>
> https://mail.gna.org/public/xenomai-core/2007-02/msg00089.html
>
> Jan
>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] hello xenomai world?
  2007-02-22 12:56   ` roland Tollenaar
@ 2007-02-22 13:25     ` Jan Kiszka
  2007-02-22 14:41       ` roland Tollenaar
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2007-02-22 13:25 UTC (permalink / raw)
  To: roland Tollenaar; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]

roland Tollenaar wrote:
> Hi Jan,
> 
> Thanks that looks a lot more comprehensible. I cannot make it however
> it seems to rely on a big heap of XENOCONFIG things. Due to my live
> setup those must have got lost. Are they stored somewhere (I see a
> xeno_config file mentioned somewhere) and can I load them in some easy
> manner? Otherwise where would be the best place to learn what they are
> and how I must get them into the shell environment?

See, you seem to manage choosing the complicated, non-standard way of
doing things first. Now try to solve your issues one by one, not in
arbitrary order.

1. Make your kernel boot fine, including all desired modules, without
having it issue any kind of error messages. Bootlogs are under /var/log,
just look into those files.

2. Check where you have installed the user space part. Default is
/usr/xenomai, and for a first run it's probably wise to keep this.

3. Check if you can build the examples repository. If you installed the
user space part to default location, it must work with only providing
the "make KSRC=<path-to-kernel-src>" as described in the Makefile.
Inside examples/native, you even just need to type "make".

> 
> I am also looking at your url to the xenomai CAN documentation. Strangely
> when I read about it there is looks a lot more friendly than in the
> code or the utils.
> 
> I will presume (and hope)  that what I have to do is just much simpler
> than what Wolfgang is doing there :)
> 
> I won;t be using printf in my final application I hope. It will be in
> C++ with Qt and I fear I am going to battle my bum off to get that
> going......
> 

We can come back to this once the first part is working.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] hello xenomai world?
  2007-02-22 13:25     ` Jan Kiszka
@ 2007-02-22 14:41       ` roland Tollenaar
  2007-02-22 15:12         ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: roland Tollenaar @ 2007-02-22 14:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

Hi Jan,

> See, you seem to manage choosing the complicated, non-standard way of
> doing things first. Now try to solve your issues one by one, not in
> arbitrary order.
:)  Its not quite as arbitrary as it may seem.

> 1. Make your kernel boot fine, including all desired modules, without
> having it issue any kind of error messages. Bootlogs are under /var/log,
> just look into those files.
All sorted out! Remember that the kernel was fine.  I could only
realized that something was missing when I tried rtcanconfig and I
could not find the /rtcan0 and /rtcan1. For someone entirely new to
both xenomai and rt-can its not surprising this take place. I stuck as
closely as possible to the default suggestion in the kernel config.
AFAIK the virtual device was not selected.


> 2. Check where you have installed the user space part. Default is
> /usr/xenomai, and for a first run it's probably wise to keep this.
Sorted! Absolutely, this is where I have had it installed all the
time. It seems to be in perfect shape.

> 3. Check if you can build the examples repository. If you installed the
> user space part to default location, it must work with only providing
> the "make KSRC=<path-to-kernel-src>" as described in the Makefile.
> Inside examples/native, you even just need to type "make".
Well this is not quite the case. I install to the correct places
actually I have from the start used the directories exactly as they
are suggested int he documentation. I have jsut reinstalled and the
make procedure seems fine. My install directory works and the programs
therein are now all functioning. Even rtcongi rtcansend and rtcanrecv.
Running make in /examples/native says

Invoke make like this: make /path to xeno-config/. Which is why I was
going on about the config variables. I wil now try and find
xeno-config if it exists and see how that works. On the other hand I
don;t doubt that the application will compile. I need to find out what
libraries to include for this particular one for the next steps. See
later.

The point being that 1, 2 and 3 have been completed in that order. To
lay out the structure of what is planned next:

4-Get a task ala trivial-task compiled into a qt C++ project. (for
which I need to know what libraries are required)

5-Write this task to read CAN messages ever 1 ms and write them to console.

6-Get multiple tasks into the project running at different times

I do understand your consternation, I have been very verbose on this list today.

Thanks for the assistance, I really do appreciate it.

Kind regards,

Roland.




>
> >
> > I am also looking at your url to the xenomai CAN documentation. Strangely
> > when I read about it there is looks a lot more friendly than in the
> > code or the utils.
> >
> > I will presume (and hope)  that what I have to do is just much simpler
> > than what Wolfgang is doing there :)
> >
> > I won;t be using printf in my final application I hope. It will be in
> > C++ with Qt and I fear I am going to battle my bum off to get that
> > going......
> >
>
> We can come back to this once the first part is working.
>
> Jan
>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] hello xenomai world?
  2007-02-22 14:41       ` roland Tollenaar
@ 2007-02-22 15:12         ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2007-02-22 15:12 UTC (permalink / raw)
  To: roland Tollenaar; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 3313 bytes --]

roland Tollenaar wrote:
> Hi Jan,
> 
>> See, you seem to manage choosing the complicated, non-standard way of
>> doing things first. Now try to solve your issues one by one, not in
>> arbitrary order.
> :)  Its not quite as arbitrary as it may seem.
> 
>> 1. Make your kernel boot fine, including all desired modules, without
>> having it issue any kind of error messages. Bootlogs are under /var/log,
>> just look into those files.
> All sorted out! Remember that the kernel was fine.  I could only
> realized that something was missing when I tried rtcanconfig and I
> could not find the /rtcan0 and /rtcan1. For someone entirely new to
> both xenomai and rt-can its not surprising this take place. I stuck as
> closely as possible to the default suggestion in the kernel config.
> AFAIK the virtual device was not selected.
> 

Feel free to write down some "first steps with CAN under Xenomai" once
you are through (=>wiki)! The virtual devices are not explicitly
documented yet. But making them default on the other hand is overkill,
because they are special to most users (with real hardware).

> 
>> 2. Check where you have installed the user space part. Default is
>> /usr/xenomai, and for a first run it's probably wise to keep this.
> Sorted! Absolutely, this is where I have had it installed all the
> time. It seems to be in perfect shape.
> 
>> 3. Check if you can build the examples repository. If you installed the
>> user space part to default location, it must work with only providing
>> the "make KSRC=<path-to-kernel-src>" as described in the Makefile.
>> Inside examples/native, you even just need to type "make".
> Well this is not quite the case. I install to the correct places
> actually I have from the start used the directories exactly as they
> are suggested int he documentation. I have jsut reinstalled and the
> make procedure seems fine. My install directory works and the programs
> therein are now all functioning. Even rtcongi rtcansend and rtcanrecv.
> Running make in /examples/native says
> 
> Invoke make like this: make /path to xeno-config/. Which is why I was
> going on about the config variables. I wil now try and find
> xeno-config if it exists and see how that works. On the other hand I
> don;t doubt that the application will compile. I need to find out what
> libraries to include for this particular one for the next steps. See
> later.

Ack, my bad. The example makefiles do not assume /usr/xenomai (or,
alternatively, /usr/xenomai/bin/xeno-config) as default for XENO. Will fix.

Meanwhile try "make XENO=/usr/xenomai".

> 
> The point being that 1, 2 and 3 have been completed in that order. To
> lay out the structure of what is planned next:
> 
> 4-Get a task ala trivial-task compiled into a qt C++ project. (for
> which I need to know what libraries are required)
> 
> 5-Write this task to read CAN messages ever 1 ms and write them to console.
> 
> 6-Get multiple tasks into the project running at different times
> 
> I do understand your consternation, I have been very verbose on this
> list today.

Your feedback is appreciated and helps improving things. Just a certain
part of your verbosity might have been avoidable by digging a bit deeper
and checking twice, no? :)

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-22 15:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-22 11:11 [Xenomai-help] hello xenomai world? roland Tollenaar
2007-02-22 11:26 ` Jan Kiszka
2007-02-22 12:56   ` roland Tollenaar
2007-02-22 13:25     ` Jan Kiszka
2007-02-22 14:41       ` roland Tollenaar
2007-02-22 15:12         ` Jan Kiszka

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.