D for embedded system

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Jan 8 09:42:20 PST 2013


08-Jan-2013 20:58, Freddie Chopin пишет:
> On Tuesday, 8 January 2013 at 16:52:05 UTC, Freddie Chopin wrote:
>> 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).

I'd bet that the most of Phobos is out. Then it needs custom run-time 
w.r.t. threads and memory management (this could be built on top of 
whatever C-runtime is there), no GC and cutdown other features like RTTI 
(TypeInfo etc.) and/or class hierarchy with Object.
Then, of course, to be practical it needs memory access to I/O 
ports/registers (this also could warp some C interface).

>
> To be even more specific - I'm talking about microCONTROLLERS (not
> micro-processors), ARM Cortex-M3 or Cortex-M4, STM32, LPC17xx, maybe
> even Cortex-M0 if the footprint is low enough... So no MMU, sometimes
> MPU (rarely), ROM in "hundreds of kilobytes", RAM in "tens of kilobytes"
> (sometimes less, rarely over 100kB - only for really big chips).
>

I'll get to use Cortex-M3/M4 rather soon (looking forward about half a 
year into future). So I'd love to know how to fit D in there.

> PC programmers have so many options to choose from, while on the MCUs
> it's basically only C (really about 99.666%), C++ sometimes, sometimes
> assembly - there are also things not worth mentioning like BASIC for
> some AVR chips and that's about all...
>
> 4\/3!!


-- 
Dmitry Olshansky


More information about the D.gnu mailing list