[Mono-dev] Regarding MONO on Embedded Device.

Paolo Molaro lupus at ximian.com
Mon Oct 3 05:17:18 EDT 2005

On 09/30/05 conn intel wrote:
> I am a computer science student. Our college is having embedded board on
> which there is 16 MB of flash. We have compress the kernel to 8 MB and our
> application is of 2 MB. So i Need help in using MONO on such a Environment.
> Its very hard or i say next to impossible for me to increase the flash.
> Can any one help me doing so.... First of all is it possible to reduce the
> size what i want. Second if is it possible than pls kindly suggest me the
> tips or the procedure to follow.

You can compile the mono JIT to 1.2 MB on x86 by compiling with
CFLAGS=-Os. Add mscorlib and you're at slightly more than 3 MB.
You can remove most of the locale info in the runtime by
reading the info in
mscorlib has lots of culture-related data that you may want to remove
(you can save at least 200KB there). Atsushi may want to provide details
for this.
You can also configure mono to remove features that are not likely
needed on your system, like aot and the profiler. Run:
	./configure --enable-minimal=aot,profiler
There are other things that can be removed, too, like most of
metadata/verifier.c as well as lots of classes in mscorlib and other
assemblies. You can do it easily with the powerful tool known as
preprocessor conditional directive:
#if 0
/* unneeded features */

You'll be able to get an almost full-featured mono runtime in 2.5 MBs.
Good luck with your homework!


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list