On Fri, Dec 7, 2012 at 9:45 AM, George Hahn <[email protected]>wrote:

> Dear Sirs and Mesdames,
>
> I am extremely interested in using Vala on embedded devices. I learned
> about Vala earlier this week and have spent a lot of time researching it,
> but I am still a complete newbie by all definitions. I apologize for any
> ignorant questions I may pose below.
>
> To give you an idea of my target processors, take a look at the Microchip
> PIC32.
> Operating frequency: 40 - 80 MHz
> RAM: 4KB - 128KB
> Program memory: 16KB - 512KB
>
> I have been able to expose a portion of the PIC32 peripheral library to
> Vala 0.16.1 under the POSIX profile. This is a nice step, but I would
> really love to be able to use classes, even with single inheritance.
>
> The issue with using profiles other than the POSIX profile is the
> dependency on GLib, specifically, glib.h and glib-object.h. The
> dependencies within these files are: GType, g* numeric types, and g_*
> memory and object handling functions.
>
> My questions:
>
> What project should I be looking at? I've taken a look at the abandoned
> POSIX branch and a very brief look at the Dova branch.
> (https://gitorious.org/ideas/vala-codegen-posix)
>
> What is the bare minimum I will have to do to get classes to work?
>
> Is writing a bare-minimum GLib implementation plausible?
>
> In theory, I should be able to implement the direct dependencies listed
> above. Would this be sufficient?
>

I believe even C is too much for that PIC. You need memory management, heap
allocation and so on for using Vala classes. In my experience, the best
approach is to use assembly or some very optimized C compiler, otherwise
you end up consuming both the ROM and the RAM. I can't imagine using the
Vala generated C code that isn't exactly optimized, being compiled by a C
compiler that isn't optimized itself.
Vala produces a lot of redundant code, and C produces redundant code itself
especially when managing pointers.

-- 
www.debian.org - The Universal Operating System
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to