From Pigmeo - .NET/Mono/CLI (C#, VB.NET, C++/CLI, Nemerle...) for microcontrollers (PIC, dsPIC, AVR...)

This page contains a list of reasons to use Pigmeo instead of traditional C/BASIC compilers for microcontrollers, or other .NET CLRs.

Why is Pigmeo better than traditional C/BASIC/any_language compilers for MCUs?

  • Is hard to find compilers for languages other than C or BASIC
  • None of them has got a good framework. Some has a few libraries, usually poorly documented, inefficient, wrongly organized and hard to use
  • Most of them are propietary software
  • They don't follow the standards
  • Using Pigmeo you can choose from a huge list of programming languages
  • Almost none of them let you use an object-oriented programming language
  • They usually only work on Windows and x86/amd64
  • With Pigmeo you can reuse your code from your PC or web-based applications. For example if you write a library for doing anything, you can use that library in applications for Windows, Linux, BSD, websites and now for microcontrollers too

Why should I use Pigmeo instead of .NET Micro Framework?

About .NET Micro Framework:

  • It only supports ARM architecture (32 bits)
  • It requires a huge amount of resources (compared to other compilers for microcontrollers): at least 256KiB of RAM plus 512KiB of flash memory (program memory). Pigmeo fits anywhere, even on tiny microcontrollers with less than 24 bytes of RAM and 500 bytes of program memory.
  • It lacks support for very common microcontroller applications, such as LCDs and servomotors
  • It's impossible to port it to extremely resource-constrained architectures, such as PIC12, AVR and PIC14
  • It's propietary software
  • It doesn't support any .NET languages other than C#
  • Porting must be done by Microsoft or its partners, and requires licensing by Microsoft
  • It only works on Microsoft Windows
  • Distributing devices that use the .NET Micro Framework does require a license, with royalties based on volume
  • It doesn't support multiple low level implementations of the assembly language or machine code generated by the compiler
  • Its compiler inserts the whole .NET virtual machine (CLR) into the microcontroller, instead of compiling just the required functions, so it's much more inefficient than Pigmeo or traditional C compilers
  • It doesn't compile the program, its CLR interprets the CIL bytecodes on runtime
  • It's not real-time

Why a different project instead of porting Mono to microcontrollers?

  • Mono can't generate applications able to run without an operating system
  • Mono doesn't generate independent executables, it generates .NET executables that require a virtual machine to run
  • It would require as much hardware resources as .NET Micro Framework does, or even more
  • We probably wouldn't be able to compile just the required parts of the CLR, and the entire CLR would be injected into the microcontroller
  • Being an independent project we can compile from the libraries implemented by other projects like Mono and Microsoft .NET implementation

Why does Pigmeo Compiler parse CIL instead of C#?

Because compiling from CIL allows us to support a lot of different languages, so anyone can choose his favorite language and he will be able to use the huge amount of libraries provided by .NET Framework and Pigmeo Framework. Also, compiling from CIL is even easier than compiling from C#.