Arduino and D

NAme email at example.org
Mon May 27 15:13:31 UTC 2019


On Wednesday, 16 May 2018 at 08:48:26 UTC, Russel Winder wrote:
> On Tue, 2018-05-15 at 22:28 +0000, Filipe Laíns via 
> Digitalmars-d wrote: […]
>> 
>
>> Actually, most arduinos use Atmel's chips so most of them are 
>> AVR. Apparently, there was some work done to port GDC to AVR 
>> [1]. I don't really know the usability of this but I suspect 
>> it's not much.
>
> [1] Looks very old and unmaintained, i.e. 4 years since the 
> last commit. Also D (gdc) is now a part of the GCC suite, which 
> may explain [1] being retred. GCC has AVR backends, thus gdc 
> has an AVR backend. Also it has an ARM backend. Like ldc, gdc 
> gets many backends (more or less) for free.
>
> GCC is now at 8.0.0, but what version of D is it using in gdc?
>
> Is a desire to see D used more in IoT projects a reason for 
> more people to be interested in gdc and help get it's version 
> updated with each GCC release. Alternatively does D in IoT mean 
> "use ldc". Does the LLVM suite support AVR and ARM backends as 
> GCC does?
>
>> If you want a board with similar size too small arduino like 
>> the pro/pro mini that has an ARM chip, you should have a look 
>> at Teensy[2]. Using D to program ARM chips shouldn't be that 
>> hard.
>> 
>> [1] 
>> https://github.com/D-Programming-microD/GDC/tree/microD-4.9 
>> [2] https://www.pjrc.com/teensy/
>
> Someone sent me a couple of ESP8266 development boards and a 
> ESP-WROOM-32 development board, the intention being to play 
> with them as MicroPython devices. I see from the device 
> websites, they are intended for use as standard Arduino 
> (presumably C) devices or as Lua controlled devices. Perhaps 
> they should be D controlled devices as well. I guess though the 
> problem is which firmware to load to then use as a D controlled 
> device, and which toolchain to use with it: Arduino mode has a 
> full IDE/ICE set up. Also does D have the library to deal with 
> controlling hardware. How easy is it to build D codes with gdc 
> or ldc without Phobos, and without DRuntime?
>
> Is D wthout Phobos useful for IoT or should one stick with 
> C,Lua, and MicroPython? Is IoT an opportunity for D or is it a 
> false direction given D is an x86/x86_64 oriented programming 
> language?

LLVM has an AVR target.
I was able to run a simple LED blink program using betterC on an 
AVR attiny chip. I just output the IR from LDC, and put it 
through LLVM targeting AVR. No work needs to be done, D already 
works on AVR!


More information about the Digitalmars-d mailing list