RFC: Pay-as-you-go, Portable D Runtime for Microcontrollers (and maybe more)

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Mon May 4 23:56:43 PDT 2015


On 5 May 2015 at 08:39, Dan Olson via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> "Mike" <none at none.com> writes:
>
>> Read on GitHub: https://github.com/JinShil/minimal_druntime_experiment
>>
>> There was recently a discussion about how we could create a portable,
>> pay-as-you-go, D runtime to help bring the promise of D to
>> free-standing platforms and devices with tight resource constraints
>> (e.g. microcontrollers).  Thread started here:
>> http://forum.dlang.org/post/mhrs4p$31id$1@digitalmars.com
>
> This is cool stuff.  Embedded has been the bulk of my software life and
> is most fun.  I see there has been a lot of discussion that I'll have to
> read up on before I say much more though.
>
>> * the newlib C library
>
> newlib has treated me well in the past, especially being so highly
> customizable.  I think it is a good choice.  It would be fun to rewrite
> it in D, but that perhaps is much work for little immediate benefit.
>
>>
>> Plea to Compiler Implementers
>> ***********************************
>> We need better control over codegen.  TypeInfo and dead-code removal
>> is preventing me from making progress
>> (http://forum.dlang.org/post/quemhwpgijwmqtpxukiv@forum.dlang.org). I've
>> resorted to compiling to assembly, using sed to hack the assembly, and
>> then compiling the assembly.  Things like that make me want to not use
>> D at all.
>
> Yeah, this should be improved.
>
> How about a -disable-tls option so that when there are no threads and
> thus no TLS, you can compile exising D code as-is.  Otherwise you have
> to rewrite normal variables to __gshared everywhere (I actually have this
> option in a ldc fork).
>

Configure GDC with --disable-tls --disable-threads to get the desired
behaviour (disabling only TLS just makes codegen fallback to emulated
thread support).


More information about the Digitalmars-d mailing list