Re: Embedded sable?

William Uther <[email protected]> Sun, 12 Jun 2005 12:27:11 +1000
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
>>    I'm want a java VM for the Sony AIBO robot.  I don't know of any,
>> so I was thinking of compiling an open source VM.  The AIBO has a
>> Sony proprietary OS.  There is a cross-compiling system based on GCC.
>>
>>    There are the rudiments of a posix library, but it is nowhere near
>> complete.  I am assuming that almost none of the standard java
>> classes will work.  That's fine - that API isn't really relevant for
>> video camera images or robot joints :).  Also, processes are not
>> standard unix-style processes.  Nor is there a standard threading  
>> model.
>
> It probably depends on how "non-standard" these processes and  
> threading
> model are.  For SableVM you should look into system.c (and possibly  
> into
> system.h, if the CPU it uses is not there yet) files.  Also, if you  
> need
> to use some other functions than standard ptherads have, look into
> thread.h and thread.c.  These files should pretty much cover what you
> might need to modify in SableVM.

Thanks for the pointers.  The processes are very non-standard. (You  
get one process for each binary.  They all start on boot.  There is  
no way to restart them once they terminate, although they can put  
themselves to sleep and another process can wake them up.)  The  
threading doesn't exist.  Is there any way to run Sable single threaded?

>>    What I can do is embed a C or C++ library into a shell process in
>> the Sony OS.  Is there any way to run SableVM in such a way?  I have
>> libffi and zlib compiled for the system.
>>
>
> I don't understand what is a shell process.  If you mean using C  
> library
> (SableVM does not use C++) as a convenience library and compiling it
> statically into SableVM, it should be doable, see the next paragraph.

Other way around.  I want sable to be the library and I'll embed it  
into my own executable.  Sable will also need to call out to my  
functions.  JNI would be fine for both types of embedding, but I need  
sable to be a static library.

>>    I've started playing with the standard sable build system, but
>> there are some issues.  e.g. The cross compiling system can compile
>> libraries, but can't compile "normal apps".  That means the configure
>> system needs some mods at least...
>>
>
> I don't know what a "normal app" would be in this context.  99% of
> SableVM is actually a shared library - libsablevm.so.  We don't  
> support
> static compilation ATM, if that's what you had in mind.

ahh.  That is what I had in mind.  Is that a fundamental limitation,  
or would I be able to make a libsablevm.a relatively easily?

Thanks,

Will         :-}