On Wednesday, 27 November 2019 at 18:25:47 UTC, H. S. Teoh wrote:
On Wed, Nov 27, 2019 at 02:35:53PM +0000, Ernesto Castellotti via Digitalmars-d-announce wrote:
Hi,

I wrote a page in the wiki for basic information on how to use D on AVR 8-bit, using LLVM and LDC.

https://wiki.dlang.org/D_on_AVR

With BetterC everything seems to be working fine, now it's time to create a framework for using D on microcontrollers!

According to Walter (cf. https://digitalmars.com/articles/hits.pdf, slide 5), D was designed with the assumption of running on a 32-bit or higher CPU. How is this handled in the AVR case? Or is this strictly only for betterC? (Even with -betterC I'm having some trouble imagining how basic D features might work on an 8-bit controller.)

Not questioning your work -- I think this is awesome -- but just curious about the practical implications of writing D for an 8-bit environment.


T

The support to targets that use 16 bits as a pointer size has already been added to LDC (https://github.com/ldc-developers/ldc/pull/2194), so minimal AVR support is present (AVR uses 16 bit pointers). Obviously not all the language works with AVR, however with BetterC there are no problems. But the support to druntime and phobos is non-existent, honestly I don't think it's a big problem, I am of the opinion that it is better to have a separate library to develop on AVR. Most of the modules in phobos are useless for the classic AVR work, or they are inadequate because they use GC or depend on an operating system.
In my opinion, nobody really wants to use them.

Reply via email to