Is it possible to cross-compile OROCOS into for an ARM processor?
I currently have a Gumstix Verdex (http://www.gumstix.com) running Xenomai (latest, 2.4.6.1, IIRC), but when I try to cross-compile (after some changes in the makefiles for cross-compiling), I run into the following error:
| /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/build/src/os/../rtt-config.h:28:4: error: #error "Unknown Processor Architecture"
| /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/src/DataSourceBase.hpp:89: error: 'oro_atomic_t' does not name a type
| make[2]: *** [src/CMakeFiles/orocos-rtt-dynamic_xenomai.dir/ProgramInterface.o] Error 1
| make[1]: *** [src/CMakeFiles/orocos-rtt-dynamic_xenomai.dir/all] Error 2
| make: *** [all] Error 2
| FATAL: oe_runmake failed
It seems that the ARM processor is not defined in the file. Any ideias on how to solve this problem (i.e., what do I need to write in order to make this work?)
PS: I use an ARM XScale PXA270 Processor, along with a very custom Openembedded distribution.
OROCOS for ARM?
On Mon, Jan 12, 2009 at 7:52 PM, <cavalkaf [..] ...> wrote:
> Is it possible to cross-compile OROCOS into for an ARM processor?
> I currently have a Gumstix Verdex (http://www.gumstix.com) running Xenomai
> (latest, 2.4.6.1, IIRC), but when I try to cross-compile (after some changes
> in the makefiles for cross-compiling), I run into the following error:
>
> |
> /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/build/src/os/../rtt-config.h:28:4:
> error: #error "Unknown Processor Architecture"
> |
> /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/src/DataSourceBase.hpp:89:
> error: 'oro_atomic_t' does not name a type
> | make[2]: ***
> [src/CMakeFiles/orocos-rtt-dynamic_xenomai.dir/ProgramInterface.o] Error 1
> | make[1]: *** [src/CMakeFiles/orocos-rtt-dynamic_xenomai.dir/all] Error 2
> | make: *** [all] Error 2
> | FATAL: oe_runmake failed
>
> It seems that the ARM processor is not defined in the file. Any ideias on
> how to solve this problem (i.e., what do I need to write in order to make
> this work?)
You need to provide some assembly instructions that implement atomic
operations. See
os/oro_atomic.h and the respective implementation directories. You
can see what I copied from sources in the linux kernel in the
os/oro_powerpc/ directory for the powerpc
In brief,
- add some ifdef statements to os/oro_atomic.h and os/oro_system.h
- add a oro_arm directory and copy necessary stuff from linux kernel files.
- add some statements to src/rtt-config.h.in
Have a try and let us know if it works, and send a patch :-)
HTH
OROCOS for ARM?
OK, so I did copy the headers over from the kernel and did get them to compile, however, when I got to oro_system.h, I found out that my ARM processor doesn't have the cmpxchg instruction!
What I did then was to use a generic version I found in the kernel.
The thing is: it doesn't compile (yet). I get the following error:
| NOTE: make
| [ 1%] Building CXX object src/CMakeFiles/orocos-rtt-dynamic_xenomai.dir/signal_base.o
| /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/src/impl/../os/CAS.hpp: In function 'bool RTT::OS::CAS(volatile T*, const V&, const W&) [with T = RTT::ListLockFree<boost::intrusive_ptr<RTT::detail::connection_base> >::Item*, V = RTT::ListLockFree<boost::intrusive_ptr<RTT::detail::connection_base> >::Item*, W = RTT::ListLockFree<boost::intrusive_ptr<RTT::detail::connection_base> >::Item*]':
| /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/src/impl/../ListLockFree.hpp:335: instantiated from 'bool RTT::ListLockFree<T>::append(T) [with T = boost::intrusive_ptr<RTT::detail::connection_base>]'
| /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/src/signal_base.cpp:106: instantiated from here
| /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/src/impl/../os/CAS.hpp:55: error: 'oro_cmpxchg_local_generic' was not declared in this scope
| make[2]: *** [src/CMakeFiles/orocos-rtt-dynamic_xenomai.dir/signal_base.o] Error 1
| make[1]: *** [src/CMakeFiles/orocos-rtt-dynamic_xenomai.dir/all] Error 2
| make: *** [all] Error 2
| FATAL: oe_runmake failed
It seems like a libboost error, but my generic function (oro_cmpxchg_local_generic) is mentioned.
So, any ideas on how to get past this?
Thanks for the help,
-Felipe B Cavalcanti
Department of Electrical Engineering
UnB - University of Brasília, Brazil<span>
PS: My oro_system.h file: I do plan on sending my changes as patch as soon as I get it working.
#include "oro_atomic.h"
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
#define oro_cmpxchg(ptr, o, n) oro_cmpxchg_local_generic((ptr), (o), (n))
extern unsigned long wrong_size_cmpxchg(volatile void *ptr);
/*
* Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned
* long parameter, supporting various types of architectures.
*/
static inline unsigned long __oro_cmpxchg_local_generic(volatile void *ptr,
unsigned long old, unsigned long a, int size)
{
unsigned long flags, prev;
/*
* Sanity checking, compile-time.
*/
if (size == 8 && sizeof(unsigned long) != 8)
wrong_size_cmpxchg(ptr);
oro_localirq_save_hw(flags);
switch (size) {
case 1: prev = *(u8 *)ptr;
if (prev == old)
*(u8 *)ptr = (u8)a;
break;
case 2: prev = *(u16 *)ptr;
if (prev == old)
*(u16 *)ptr = (u16)a;
break;
case 4: prev = *(u32 *)ptr;
if (prev == old)
*(u32 *)ptr = (u32)a;
break;
case 8: prev = *(u64 *)ptr;
if (prev == old)
*(u64 *)ptr = (u64)a;
break;
default:
wrong_size_cmpxchg(ptr);
}
oro_localirq_restore_hw(flags);
return prev;
}
OROCOS for ARM?
On Wed, Jan 14, 2009 at 8:51 PM, Felipe Brandão Cavalcanti
<cavalkaf [..] ...> wrote:
> OK, so I did copy the headers over from the kernel and did get them to
> compile, however, when I got to oro_system.h, I found out that my ARM
> processor doesn't have the cmpxchg instruction!
> What I did then was to use a generic version I found in the kernel.
See important note below.
> The thing is: it doesn't compile (yet). I get the following error:
[...]
> /home/felipe/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/orocos-1.0-r0/rtt-1.6/src/impl/../os/CAS.hpp:55:
> error: 'oro_cmpxchg_local_generic' was not declared in this scope
[...]
>
> #define oro_cmpxchg(ptr, o, n) oro_cmpxchg_local_generic((ptr), (o), (n))
>
[...]
> static inline unsigned long __oro_cmpxchg_local_generic(volatile void *ptr,
> unsigned long old, unsigned long a, int size)
Could it be that you made a typo?
Your #define statement above defines the function, however note that
you prefix it with double underscore below?
However, Peter just told me that the functions of your "generic implementation"
> oro_localirq_save_hw(flags);
[...]
> oro_localirq_restore_hw(flags);
won't be available in user space, so you might run into other problems :-(
Klaas
OROCOS for ARM?
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<cavalkaf [..] ...> wrote:
[...]
Could it be that you made a typo?
Your #define statement above defines the function, however note that
you prefix it with double underscore below?
<blockquote>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
However, Peter just told me that the functions of your "generic implementation"
> oro_localirq_save_hw(flags);
[...]
won't be available in user space, so you might run into other problems :-(
<font color="#888888">
Klaas<font><blockquote>
-Felipe B Cavalcanti
Department of Electrical Engineering
UnB - University of Brasília, Brazil<span>
<span>
OROCOS for ARM?
Just a quick update: I did make a patch that compiled cleanly, and it seems to work so far - however, I will test it a bit more before sending in the patch.
Thanks for everyone that helped,
-Felipe B Cavalcanti
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<cavalkaf [..] ...> wrote:
[...]
Could it be that you made a typo?
Your #define statement above defines the function, however note that
you prefix it with double underscore below?
<blockquote>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
However, Peter just told me that the functions of your "generic implementation"
> oro_localirq_save_hw(flags);
[...]
won't be available in user space, so you might run into other problems :-(
<font color="#888888">
Klaas<font><blockquote>
-Felipe B Cavalcanti
Department of Electrical Engineering
UnB - University of Brasília, Brazil<span>
<span>
<blockquote>
--
*º¤., ¸¸,.¤º*¨*¤., ¸¸,.¤º*¨*
Cavalkaf (aka Felipe) <cavalkaf [..] ...>
AIM: Cavalkaf | MSN: cavalkaf2 [..] ...
Check out <http://www.flickr.com/photos/rbcav2003/>
OROCOS for ARM?
On Monday 19 January 2009 21:43:42 Felipe Brandão Cavalcanti wrote:
> Just a quick update: I did make a patch that compiled cleanly, and it seems
> to work so far - however, I will test it a bit more before sending in the
> patch.
Thanks for the update. I wanted to comment on your proposed approach of
disabling the irq's. Normally, it is very bad practice to lock irqs in user
space. It's messing with the OS, if your application crashes (during disabled
interrupts), your whole kernel may lock up as well. On the other hand, I've
seen doing it on embedded systems (without cmpxch) where the application and
kernel run in the same address space.
But you're running on Linux. We'd better think up of a way to allow (at
compile time) mutex based locking instead of the lock-free queues such that
processors without cmpxch have at least the option to run the safe version.
The lists and the data/buffer ports already have mutex based alternatives in
the code. Only AtomicQueue needs an (easy to implement) mutex based
alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
instantiating the correct object.
Peter
RE: OROCOS for ARM?
> The lists and the data/buffer ports already have mutex based
alternatives
> in
> the code. Only AtomicQueue needs an (easy to implement) mutex based
> alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
> instantiating the correct object.
>
My comment is slightly of topic regading to ARM but I'll go ahead
anyway.
I think a more fundamental refactoring should be done. I mean from an
academic point of view it might be interesting to have a BufferLockfree,
BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc. You
can write a program to prove witch is best and produce nice charts. But
in real life it isn't helping the end user. There should be one Buffer,
DataObject, Queue and List and they should be thread-safe. Behind the
scenes the most appropriate algorithm for the target will be chosen at
compile time, the user doesn't have to worry about it. This is one
advantage. A second advantage, if implemented wise, can improve compile
time. If the algorithm is hidden from the user (It is not visible in
rtt/Buffer.hpp for example), no lengthy templates have to be compiled
_every_ time rtt/Buffer.hpp is included somewhere.
But that is my opinion. :-)
Sander.
More fundamental refactoring (Was: OROCOS for ARM?)
On Wednesday 21 January 2009 17:27:11 Vandenbroucke Sander wrote:
> > The lists and the data/buffer ports already have mutex based
>
> alternatives
>
> > in
> > the code. Only AtomicQueue needs an (easy to implement) mutex based
> > alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
> > instantiating the correct object.
>
> My comment is slightly of topic regading to ARM but I'll go ahead
> anyway.
You're welcome :-)
>
> I think a more fundamental refactoring should be done. I mean from an
> academic point of view it might be interesting to have a BufferLockfree,
> BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc. You
> can write a program to prove witch is best and produce nice charts. But
> in real life it isn't helping the end user. There should be one Buffer,
> DataObject, Queue and List and they should be thread-safe.
I agree. Although the CORBA layer requires some of these (DataObject/Buffer) to
be defined with interfaces such that a 'remote' version can be used as well.
> Behind the
> scenes the most appropriate algorithm for the target will be chosen at
> compile time, the user doesn't have to worry about it. This is one
> advantage. A second advantage, if implemented wise, can improve compile
> time. If the algorithm is hidden from the user (It is not visible in
> rtt/Buffer.hpp for example), no lengthy templates have to be compiled
> _every_ time rtt/Buffer.hpp is included somewhere.
We can't really get rid of templates the way we work now. The only 'solution'
is to define stuff like 'extern template class Buffer<double>;' in a header and
'template class Buffer<double>;' in a .cpp file. (GCC only). This will avoid
emitting code for this case.
In any case we need a cleanup of DataObject*. There's to much junk in that
header. With the choice between lock-free or not, it's less obvious the
performance/memory trade-offs are complex. I'd say that lock-based queues,
buffers,... is sufficient in most cases unless your highest priority thread has a
very hard deadline to meet (or is executing ISR-like), than that thread should
share all data through lock-free primitives. In such scenario, choosing a
default at compiletime is ok, but should we leave open the option to
'configure' at run-time on a per-component basis ? Or is this a case of YAGNI ?
Peter
RE: More fundamental refactoring (Was: OROCOS for ARM?)
> > I think a more fundamental refactoring should be done. I mean from
an
> > academic point of view it might be interesting to have a
BufferLockfree,
> > BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc.
You
> > can write a program to prove witch is best and produce nice charts.
But
> > in real life it isn't helping the end user. There should be one
Buffer,
> > DataObject, Queue and List and they should be thread-safe.
>
> I agree. Although the CORBA layer requires some of these
> (DataObject/Buffer) to
> be defined with interfaces such that a 'remote' version can be used as
> well.
>
I'll take your word for it since I haven't used CORBA yet.
> > Behind the
> > scenes the most appropriate algorithm for the target will be chosen
at
> > compile time, the user doesn't have to worry about it. This is one
> > advantage. A second advantage, if implemented wise, can improve
compile
> > time. If the algorithm is hidden from the user (It is not visible in
> > rtt/Buffer.hpp for example), no lengthy templates have to be
compiled
> > _every_ time rtt/Buffer.hpp is included somewhere.
>
> We can't really get rid of templates the way we work now. The only
> 'solution'
> is to define stuff like 'extern template class Buffer<double>;' in a
> header and
> 'template class Buffer<double>;' in a .cpp file. (GCC only). This will
> avoid
> emitting code for this case.
>
I think that with a well designed strategy design pattern the actual
algorithm can be split off from the template Buffer<> class. The default
buffer strategy could be assigned in some startup code. This goes for
any TS-IPC object.
> In any case we need a cleanup of DataObject*. There's to much junk in
that
> header. With the choice between lock-free or not, it's less obvious
the
> performance/memory trade-offs are complex. I'd say that lock-based
queues,
> buffers,... is sufficient in most cases unless your highest priority
> thread has a
> very hard deadline to meet (or is executing ISR-like), than that
thread
> should
> share all data through lock-free primitives. In such scenario,
choosing a
> default at compiletime is ok, but should we leave open the option to
> 'configure' at run-time on a per-component basis ? Or is this a case
of
For your ISR stuff you could assign a lock-free strategy upon driver
construction?
> YAGNI ?
I don't get this...
Sander.
More fundamental refactoring (Was: OROCOS for ARM?)
On Thursday 22 January 2009 10:55:14 Vandenbroucke Sander wrote:
> >
> > We can't really get rid of templates the way we work now. The only
> > 'solution'
> > is to define stuff like 'extern template class Buffer<double>;' in a
> > header and
> > 'template class Buffer<double>;' in a .cpp file. (GCC only). This will
> > avoid
> > emitting code for this case.
>
> I think that with a well designed strategy design pattern the actual
> algorithm can be split off from the template Buffer<> class. The default
> buffer strategy could be assigned in some startup code. This goes for
> any TS-IPC object.
This is how the commands, methods, properties and events are implemented.
But this works only by defining a templated 'implementation' interface
The user code will still include #1 and #2. We will however require that some
kind of factory includes #3 and creates an object for it. This brings back up
the discussion if A) all types T should be registered to the Orocos type
system
Or B) that we (as we do now) include all #3-like implementations and let the
user pick the correct one at compile time (upon which the same code is
generated in each .o file).
B) allows the RTT to handle your types smartly and is even required for
transports, but puts a burden on the user for declaring each type A) works as
well and code is 'only' duplicated among .so libraries.
Maybe the plugin system could be handy for loading type construction
information and solving these kind of issues. It would simply the RTT and
improve compile times dramatically.
Peter
RE: More fundamental refactoring (Was: OROCOS for ARM?)
On Thu, 22 Jan 2009, Vandenbroucke Sander wrote:
[...]
>> YAGNI ?
> I don't get this...
<http://en.wikipedia.org/wiki/YAGNI>: "You Ain't Gonna Need It" :-)
Herman
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
RE: OROCOS for ARM?
On Wed, 21 Jan 2009, Vandenbroucke Sander wrote:
>> The lists and the data/buffer ports already have mutex based
> alternatives
>> in
>> the code. Only AtomicQueue needs an (easy to implement) mutex based
>> alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
>> instantiating the correct object.
>>
> My comment is slightly of topic regading to ARM but I'll go ahead
> anyway.
>
> I think a more fundamental refactoring should be done. I mean from an
> academic point of view it might be interesting to have a BufferLockfree,
> BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc. You
> can write a program to prove witch is best and produce nice charts. But
> in real life it isn't helping the end user.
I don't agree... We are targeting many possible end-users! From the deeply
embedded to the highly distributed... (Or rather, we are targeting
"application developers" and not users.)
The optimization of the code for different platforms should come from
tooling (which does not yet exist, but for which we are making manpower
available through PhD students and a new FP7 European project).
> There should be one Buffer,
> DataObject, Queue and List and they should be thread-safe. Behind the
> scenes the most appropriate algorithm for the target will be chosen at
> compile time, the user doesn't have to worry about it. This is one
> advantage. A second advantage, if implemented wise, can improve compile
> time. If the algorithm is hidden from the user (It is not visible in
> rtt/Buffer.hpp for example), no lengthy templates have to be compiled
> _every_ time rtt/Buffer.hpp is included somewhere.
> But that is my opinion. :-)
It is always good to have motivated opinions like this expressed explicitly
on the mailinglist!
Herman
>
> Sander.
OROCOS for ARM?
On Wed, Jan 21, 2009 at 05:40:36PM +0100, Herman Bruyninckx wrote:
> On Wed, 21 Jan 2009, Vandenbroucke Sander wrote:
>
>>> The lists and the data/buffer ports already have mutex based
>> alternatives
>>> in
>>> the code. Only AtomicQueue needs an (easy to implement) mutex based
>>> alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
>>> instantiating the correct object.
>>>
>> My comment is slightly of topic regading to ARM but I'll go ahead
>> anyway.
>>
>> I think a more fundamental refactoring should be done. I mean from an
>> academic point of view it might be interesting to have a BufferLockfree,
>> BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc. You
>> can write a program to prove witch is best and produce nice charts. But
>> in real life it isn't helping the end user.
>
> I don't agree... We are targeting many possible end-users! From the deeply
> embedded to the highly distributed... (Or rather, we are targeting
> "application developers" and not users.)
I think you're both right. What's missing (and Peter mentioned in his
mail) is a hierarchy that makes clear "If unsure use X which will
perform great in most cases, if you know you need to optimize,
low-level y or z might be beneficial". This would be useful for other
OROCOS types, e.g. for Properties and Attributes too.
Regards
Markus
OROCOS for ARM?
Regarding the ARM version of OROCOS, the version that I wrote seems to be working fine - the entire system and its dependencies compile and run without any issues. However, there is still the issue of the IRQs that I will leave up to you guys - I really don't have enough experience in this field to deal with such matters.
I am only sending in the files, as I am not sure on how to send in a proper patch...
I wrote/tested this patch with OROCOS 1.6.1 (as well as 1.6.0), Xenomai 2.4.6.1 and Linux 2.4.24 on an PXA-270 ARM platform running OpenEmbedded (the Gumstix Verdex).
Thanks for everyone that helped,
-Felipe Brandão Cavalcanti
LARA - Laboratory of Robotics and Automation
Department of Electrical Engineering
UnB - University of Brasília, Brazil
http://www.lara.unb.br/
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> On Wed, 21 Jan 2009, Vandenbroucke Sander wrote:
>
>>> The lists and the data/buffer ports already have mutex based
>> alternatives
>>> in
>>> the code. Only AtomicQueue needs an (easy to implement) mutex based
>>> alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
>>> instantiating the correct object.
>>>
>> My comment is slightly of topic regading to ARM but I'll go ahead
>> anyway.
>>
>> I think a more fundamental refactoring should be done. I mean from an
>> academic point of view it might be interesting to have a BufferLockfree,
>> BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc. You
>> can write a program to prove witch is best and produce nice charts. But
>> in real life it isn't helping the end user.
>
> I don't agree... We are targeting many possible end-users! From the deeply
> embedded to the highly distributed... (Or rather, we are targeting
> "application developers" and not users.)
I think you're both right. What's missing (and Peter mentioned in his
mail) is a hierarchy that makes clear "If unsure use X which will
perform great in most cases, if you know you need to optimize,
low-level y or z might be beneficial". This would be useful for other
OROCOS types, e.g. for Properties and Attributes too.
Regards
<font color="#888888">Markus
<font>
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
<blockquote>
--
*º¤., ¸¸,.¤º*¨*¤., ¸¸,.¤º*¨*
Cavalkaf (aka Felipe) <cavalkaf [..] ...>
AIM: Cavalkaf | MSN: cavalkaf2 [..] ...
Check out <http://www.flickr.com/photos/rbcav2003/>
OROCOS for ARM?
On Wednesday 11 February 2009 21:00:46 Felipe Brandão Cavalcanti wrote:
> Regarding the ARM version of OROCOS, the version that I wrote seems to be
> working fine - the entire system and its dependencies compile and run
> without any issues. However, there is still the issue of the IRQs that I
> will leave up to you guys - I really don't have enough experience in this
> field to deal with such matters.
>
> I am only sending in the files, as I am not sure on how to send in a proper
> patch...
>
> I wrote/tested this patch with OROCOS 1.6.1 (as well as 1.6.0), Xenomai
> 2.4.6.1 and Linux 2.4.24 on an PXA-270 ARM platform running OpenEmbedded
> (the Gumstix Verdex).
Thanks, I've imported into my local git tree. The IRQ thing is indeed tricky,
and is something we'll need to solve cleanly in order to support more
processor architectures.
My current view on this is that the RTT should provide plain lock-based lists,
queues etc for architectures that don't support lock-free or atomic
instructions (we require atomic even harder than lock-free, since our shared
pointers use atomic ref counting.) In this situation, the IRQ hacks only need
to be enabled for those users really wanting/needing it.
Peter
--
Peter Soetens -- FMTC -- <http://www.fmtc.be>
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
OROCOS for ARM?
> Thanks, I've imported into my local git tree. The IRQ thing is indeed
> tricky,
> and is something we'll need to solve cleanly in order to support more
> processor architectures.
>
> My current view on this is that the RTT should provide plain
lock-based
> lists,
> queues etc for architectures that don't support lock-free or atomic
> instructions (we require atomic even harder than lock-free, since our
> shared
> pointers use atomic ref counting.) In this situation, the IRQ hacks
only
> need
> to be enabled for those users really wanting/needing it.
>
The IRQ stuff is making subsequent instructions 'atomic' right? There
are some ARM instructions you can use to do atomic stuff in a spin-lock
manner: Load and store exclusive (LDSTREX) in combination with some kind
of compare. There are some application notes out there on how to
implement semaphores. I think these could be used to implement the
lock-free stuff.
I'm not sure they exist on all ARM's though.
Sander.
PS: This is also valid for PPC.
OROCOS for ARM?
Quick correction: the Linux version was 2.6.24.
Thanks again,
-Felipe
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Regarding the ARM version of OROCOS, the version that I wrote seems to be working fine - the entire system and its dependencies compile and run without any issues. However, there is still the issue of the IRQs that I will leave up to you guys - I really don't have enough experience in this field to deal with such matters.
I am only sending in the files, as I am not sure on how to send in a proper patch...
I wrote/tested this patch with OROCOS 1.6.1 (as well as 1.6.0), Xenomai 2.4.6.1 and Linux 2.4.24 on an PXA-270 ARM platform running OpenEmbedded (the Gumstix Verdex).
Thanks for everyone that helped,
-Felipe Brandão Cavalcanti
LARA - Laboratory of Robotics and Automation
Department of Electrical Engineering
UnB - University of Brasília, Brazil
http://www.lara.unb.br/
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> On Wed, 21 Jan 2009, Vandenbroucke Sander wrote:
>
>>> The lists and the data/buffer ports already have mutex based
>> alternatives
>>> in
>>> the code. Only AtomicQueue needs an (easy to implement) mutex based
>>> alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
>>> instantiating the correct object.
>>>
>> My comment is slightly of topic regading to ARM but I'll go ahead
>> anyway.
>>
>> I think a more fundamental refactoring should be done. I mean from an
>> academic point of view it might be interesting to have a BufferLockfree,
>> BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc. You
>> can write a program to prove witch is best and produce nice charts. But
>> in real life it isn't helping the end user.
>
> I don't agree... We are targeting many possible end-users! From the deeply
> embedded to the highly distributed... (Or rather, we are targeting
> "application developers" and not users.)
I think you're both right. What's missing (and Peter mentioned in his
mail) is a hierarchy that makes clear "If unsure use X which will
perform great in most cases, if you know you need to optimize,
low-level y or z might be beneficial". This would be useful for other
OROCOS types, e.g. for Properties and Attributes too.
Regards
<font color="#888888">Markus
<font>
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
<blockquote>
*º¤., ¸¸,.¤º*¨*¤., ¸¸,.¤º*¨*
Cavalkaf (aka Felipe) <cavalkaf [..] ...>
AIM: Cavalkaf | MSN: cavalkaf2 [..] ...
Check out <http://www.flickr.com/photos/rbcav2003/>
<blockquote>
--
*º¤., ¸¸,.¤º*¨*¤., ¸¸,.¤º*¨*
Cavalkaf (aka Felipe) <cavalkaf [..] ...>
AIM: Cavalkaf | MSN: cavalkaf2 [..] ...
Check out <http://www.flickr.com/photos/rbcav2003/>
Requirements for "Model-Driven Engineering" support in Orocos (W
Let me continue this (part of the) thread under a more appropriate
heading...
On Thu, 22 Jan 2009, Markus Klotzbücher wrote:
> On Wed, Jan 21, 2009 at 05:40:36PM +0100, Herman Bruyninckx wrote:
>> On Wed, 21 Jan 2009, Vandenbroucke Sander wrote:
>>
>>>> The lists and the data/buffer ports already have mutex based
>>> alternatives
>>>> in
>>>> the code. Only AtomicQueue needs an (easy to implement) mutex based
>>>> alternative. The rest is guarding with #ifdef ORO_HAS_LOCK_FREE... and
>>>> instantiating the correct object.
>>>>
>>> My comment is slightly of topic regading to ARM but I'll go ahead
>>> anyway.
>>>
>>> I think a more fundamental refactoring should be done. I mean from an
>>> academic point of view it might be interesting to have a BufferLockfree,
>>> BufferLocked, DataObjectPriorityGet/Set, DataObjectLockFree, etc. You
>>> can write a program to prove witch is best and produce nice charts. But
>>> in real life it isn't helping the end user.
>>
>> I don't agree... We are targeting many possible end-users! From the deeply
>> embedded to the highly distributed... (Or rather, we are targeting
>> "application developers" and not users.)
>
> I think you're both right. What's missing (and Peter mentioned in his
> mail) is a hierarchy that makes clear "If unsure use X which will
> perform great in most cases, if you know you need to optimize,
> low-level y or z might be beneficial". This would be useful for other
> OROCOS types, e.g. for Properties and Attributes too.
>
Yes... And the appropriate support for this kind of
"platform-(in)dependent" configuration is "Model-Driven Engineering", as
you undoubtedly know :-)
So, people on this list: what kind of "ideal" software support toolchain
are you dreaming of, in order to be able use Orocos in the most efficient
and optimized way, including (semi)automatic configuration decision making,
code generation, platform optimization and deployment,...?
First of all, I am most interested in knowing the "non-functional
requirements" of the _developers_ as our main "stakeholders" for the time
being.
I'm asking this question because I will have (at least) two people working
full time at preparing such MDE things in the very near future...
Herman
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm