On Tuesday, 8 January 2013 at 15:45:18 UTC, Matthew Caron wrote:
On 01/08/2013 09:22 AM, Freddie Chopin wrote:> Hi!
>
> Any progress on making D an usable alternative for C/C++ for
ARM
> MCUs?
I had a cross compiler working based on an older version of
this:
http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG
Bear in mind that my embedded system is an ARM CPU with at
least 16MB of RAM, so it runs Linux and is basically just a
small footprint Linux distro. If you mean "bare metal", I
haven't done that.
Yes, we're talking about real bare-metal here (; I think D with
it's safety fits really nicely in the embedded niche... I think
that if D could be used on a system with 128kB of flash and 8kB
of RAM that would be great. If it would require the chip to have
more RAM it wouldn't be so great, but a 16kB or 32kB is still
quite OK... This would probably require D's lib (phobos) to NOT
depend on garbage collector (or maybe use it only in some
high-level stuff that would be to big for such embedded system
anyway).
> Anyway - do you think that D's threads could actually replace
a
> RTOS on an embedded system? This would be quite interesting
too (;
An RTOS does a lot more than manage threads. ;-)
Well, RTOSes ("schedulers") like FreeRTOS don't do that much -
you have threads, mutexes/semaphores, message queue and software
timers - all of them but the last one is covered by D APIs, but
now I thought that D probably just uses some OS services for that
(like POSIX pthread.h), wrapping it up a little...
Anyway - I think these functions of D would nicely replace simple
RTOSes that have a scheduler and nothing more...
4\/3!!