[DotGNU]Re: [Mono-list] Mono / C# on PDAs
Gopal V
gopalv82@symonds.net
Sun, 24 Nov 2002 23:21:21 +0530
This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.
--=_jive-20811-1038160611-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
If memory serves me right, Adam Treat wrote:
> I've been told that DotGNU/Portable.NET has a working ARM port of
> ilrun, which also works with Qt#.
It did last July ... but dunno about now or current CVS .. See attached
chatlog I had with the guy who tested it on his embedded linux ARM palmtop.
Pnet ran a hello world 10k stack and 200k heap (for IL) with a full
build then .. should be a lot smaller for a trimmed down build ...
> I would love to see a Qt# application running on the zaurus!
If libffi does not work in ARM ... PInvoke is out of the way... Still
someone can write a new ilrun.c embedding QT as a set of internal calls.
And avoid the hassle of porting libffi ...
This is more relevant now that the ilinternal tool can generate the
correct marshalling code with C , rather than depend on libffi support.
And we can attach internal call tables to the engine at runtime as well..
> > especially if it would support jitted code.
Pnet has a JIT ... but not a native JIT ... pnet JITs IL into a simpler
non-polymorphic code called CVM ... Which is a lot faster to run than
the direct IL interpreters ...
> > special mobile .NET version (stripped down runtime libraries, don't
Hmm.... maybe someone should fix the pnetlib/profiles/tiny section
to actually work :-)
Gopal
--
The difference between insanity and genius is measured by success
--=_jive-20811-1038160611-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="fragglet.log"
05:20:19 <fragglet> i was going to crosscompile pnet to my palmtop
05:20:22 <fragglet> forgot about that
05:20:29 <t3rmin4t0r> if it works !!!!
05:20:39 <t3rmin4t0r> embedded heaven !
05:20:49 <t3rmin4t0r> afterall rhys is a thin client guru
05:20:53 <fragglet> heh
.........
05:25:19 <fragglet> i'm just wrestling with configure and stuff atm
05:25:25 <fragglet> crosscompiling is a pain
05:25:26 <t3rmin4t0r> oh the pnet stuff
05:25:28 <t3rmin4t0r> yes it is
05:25:31 <fragglet> yeah
05:26:00 <fragglet> i got the wrong compiler and its trying to compile treecc with the arm version
05:26:31 <t3rmin4t0r> arm ?
05:26:40 <t3rmin4t0r> what are you using ?
05:26:43 <fragglet> yeah
05:27:03 <fragglet> the gcc arm port
05:28:34 <t3rmin4t0r> ok
.............................
05:29:27 <fragglet> its choking on libffi
05:29:38 <t3rmin4t0r> ./configure --without-libffi
05:29:47 <t3rmin4t0r> you need libffi only for the PInvoke stuff
05:29:49 <fragglet> can i do that
05:29:58 <fragglet> hmm ok
05:30:01 <t3rmin4t0r> ie dlopening .so files from C#
05:30:18 <t3rmin4t0r> fragglet: try a profile option
05:30:31 <fragglet> profile?
05:30:43 <t3rmin4t0r> profiles/README
05:31:05 <t3rmin4t0r> if you want to go really tiny
05:31:13 <fragglet> oh
05:31:17 <t3rmin4t0r> it sets a lot of the #ifdefs in the code
05:31:20 <fragglet> you can specify sizes
05:31:21 <t3rmin4t0r> to reduce memory/code
05:31:21 <fragglet> thats neat
05:31:37 <fragglet> well i'll compile it with a standard compile to start off with
05:31:37 <t3rmin4t0r> I told ya, rhys is a thin client guy ...
05:31:50 <fragglet> to check that all of the code compile properly for arm
05:31:59 <t3rmin4t0r> libffi ?
05:32:08 <fragglet> and then i'll try a tiny compile and try running it
05:32:28 <t3rmin4t0r> fragglet: the tiny compile has no FS support
05:32:37 <fragglet> heh well
05:32:37 <t3rmin4t0r> and there is no tiny mscorlib.dll
05:32:41 <fragglet> something small then
05:33:00 <t3rmin4t0r> you might need to write your mscorlib.dll
05:33:07 <t3rmin4t0r> atleast a *small* implementation
05:33:10 <fragglet> i dont know if i'll have enough memory to even run this
05:33:22 <t3rmin4t0r> under 10 Mb
05:33:28 <t3rmin4t0r> with full mscorlib
05:33:41 <t3rmin4t0r> which is a feat par excellance
05:33:44 <fragglet> /home/fraggle/pnet/pnet/engine/cvm_compare.c:74: relocation truncated to fit: R_
05:33:50 <fragglet> ARM_PC24 isnan
................
05:34:44 <fragglet> its the c library
05:34:48 <fragglet> i'm using an embedded c library
05:34:58 <t3rmin4t0r> it does not have this facility ?
05:35:07 <fragglet> its cut down :)
05:35:25 <t3rmin4t0r> error or warning ?
05:35:31 <fragglet> infact it probably has it and i just didnt compile it in
05:35:31 <fragglet> error
05:35:42 <fragglet> uclibc doesnt have the isnan function
05:35:52 <t3rmin4t0r> ok #ifdef over
05:36:03 <fragglet> my version anyway
05:36:04 <t3rmin4t0r> how can you check nan ?
05:36:21 * t3rmin4t0r thinks you can comment it safely ...
05:36:42 <fragglet> static inline int isnan(double a)
05:36:43 <fragglet> {
05:36:43 <fragglet> return 0;
05:36:43 <fragglet> }
05:36:47 <fragglet> theres a cheap hack fix
05:36:49 <fragglet> heheh
05:36:52 <t3rmin4t0r> hehe
...............
05:42:01 <fragglet> ../ilasm/ilasm: ../ilasm/ilasm: cannot execute binary file
05:42:03 <fragglet> haha
05:42:16 <t3rmin4t0r> why ?
05:42:30 <fragglet> looks like the build system could need some fixing
05:42:37 <fragglet> ilasm is an arm executable
05:42:42 <fragglet> i'm on an intel machine
05:42:46 <t3rmin4t0r> hehe
05:43:10 <t3rmin4t0r> well try default ilasm
05:43:27 <fragglet> no make tried to run it
05:43:45 <t3rmin4t0r> well not much of a big deal
05:43:50 <fragglet> hmm can i make a small mscorlib.dll in cscc
05:43:56 <t3rmin4t0r> yes almost
05:44:12 <t3rmin4t0r> ask rhys for more details
05:47:48 <fragglet> -rwxr-xr-x 1 fraggle fraggle 229376 Mar 2 18:49 mscorlib.dll
05:47:24 <t3rmin4t0r> fragglet: so you might be able to compile a *basic* mscorlib
05:47:28 <t3rmin4t0r> and run helloworld
05:47:34 <fragglet> yeah maybe
05:48:05 <fragglet> and its not too big
05:48:06 <t3rmin4t0r> too large ?
05:48:16 <fragglet> only 200k
05:48:45 <t3rmin4t0r> so how much RAM does your system have
05:48:47 <t3rmin4t0r> 4 Mb ?
05:49:34 <t3rmin4t0r> you need memory to work it on ..
05:49:48 <fragglet> er
05:49:50 <fragglet> its 8meg total
05:49:54 <t3rmin4t0r> ok
05:50:11 <fragglet> thats including the kernel and the ramdisk with the root fs
05:50:22 <t3rmin4t0r> ok, so you might have about 2 Mb free
05:50:40 <t3rmin4t0r> try doing a memprof on pnet
05:50:45 <t3rmin4t0r> with a helloworld
.......................
05:52:36 <t3rmin4t0r> fragglet: ilrun runs on 10 kb stack,200 Kb heap for helloworld
05:52:43 <fragglet> oh wait
05:52:49 <t3rmin4t0r> ilrun -S 10 -H 200 hello.exe
05:53:18 <fragglet> -rwxr-xr-x 1 fraggle fraggle 598264 Jul 5 01:26 ilrun
05:54:14 <t3rmin4t0r> fragglet: try building with --profile=tiny
....
05:55:14 <fragglet> what
05:55:20 <t3rmin4t0r> well recompile from start
05:55:25 <fragglet> make clean?
05:55:27 <fragglet> heh
05:55:28 <t3rmin4t0r> the header files don't change well
05:55:34 <t3rmin4t0r> with new ./configure
05:55:48 <t3rmin4t0r> ./configure --with-profile=kernel
05:55:52 <t3rmin4t0r> and try sizing it
05:55:55 <t3rmin4t0r> if it doesnot work
05:55:58 <t3rmin4t0r> try tiny
05:56:15 <t3rmin4t0r> and mail rhys about issues in crosscompiling
.................
05:56:29 <fragglet> i have ilrun running
05:56:36 <fragglet> as in it shows the help text
05:56:36 <t3rmin4t0r> in your PDA ?
05:56:41 <fragglet> yeah
05:56:44 <t3rmin4t0r> ok !!
05:56:50 <fragglet> one sec i'll get a screenshot
.............
05:56:53 <t3rmin4t0r> now to proceed to load a new mscorlib.dll
05:56:57 <t3rmin4t0r> or write one
05:57:26 <fragglet> i'm not sure i need to
05:57:28 <t3rmin4t0r> in C# or IL
05:57:38 <t3rmin4t0r> if you don't have enough memory ie
05:58:32 <t3rmin4t0r> and if it works
05:58:36 <t3rmin4t0r> well .... !!
.....................
05:59:56 <t3rmin4t0r> now to see if it runs helloworld
06:00:03 <fragglet> yeah
**********************FRAGGLET TRIES HIS OWN MSCORLIB.DLL************
06:01:22 <fragglet> hmm
06:01:24 <fragglet> awww
06:01:38 <fragglet> Fatal error: System.Security.VerificationException is missing from the system library
06:01:42 <t3rmin4t0r> hehe
06:01:54 <fragglet> anyone have a recent corlib.dll
06:01:59 <t3rmin4t0r> get it from CVS
06:02:12 <t3rmin4t0r> rhys maintains updated versions in CVS
06:02:13 <fragglet> is there one in cvs
06:02:15 <t3rmin4t0r> yes
06:02:25 <fragglet> oh samples/
06:02:28 <t3rmin4t0r> yeah
06:02:52 * fragglet downloads
06:03:13 <fragglet> its on a 115.2k serial lines heh
06:03:27 <t3rmin4t0r> hehe
06:04:07 <fragglet> Out of Memory: killed process 546 (ilrun).
06:04:18 <t3rmin4t0r> hehe
06:04:29 <t3rmin4t0r> try working out a new mscorlib.dll
06:04:37 <t3rmin4t0r> or try the -S -H options
06:04:50 <t3rmin4t0r> or didja build with the full options ?
06:05:15 <fragglet> i just did a plain build
06:05:34 <t3rmin4t0r> do a kernel build
06:05:44 <t3rmin4t0r> this was bound to happen
06:05:47 <t3rmin4t0r> with a normal build
06:06:06 <t3rmin4t0r> if possible ask rhys on how to cut down mscorlib.dll
06:06:42 <fragglet> nice
06:06:52 <fragglet> i was thinking about working on that for a while
06:06:56 <fragglet> but never got round to it
..............
06:15:25 <t3rmin4t0r> and be sure to drop a line if pnet works on the PDA
06:15:33 <t3rmin4t0r> (or not works ... either way)
06:15:44 <fragglet> ok sure
06:15:50 <t3rmin4t0r> so bye for now
06:15:55 <fragglet> bye
--=_jive-20811-1038160611-0001-2--