2

I am just getting into D, and I'm trying to figure out if I can use D for programming an Arduino. I know D normally compiles to native binaries, but I haven't had any luck trying to find a D compiler for the AVR instruction set. Does anyone know of a method for compiling D code for the Arduino?

Lily Mara
  • 3,859
  • 4
  • 29
  • 48
  • Your best bet would be gdc http://gdcproject.org/downloads/ but I don't think anyone has worked on it.. i've done x86 and arm but never avr. – Adam D. Ruppe Nov 28 '14 at 22:43

2 Answers2

3

I do not think there is a D compiler that can target ATmega328. As Adam pointed out, GDC is your best bet, but I haven't seen anyone using it for Arduino development. I am sure GDC developers will welcome contributions towards this goal.

Building GCC that targets ATmega328 is easy nowadays. You will also need avr-libc. Ask on the D forum - maybe someone was successful.

DejanLekic
  • 18,787
  • 4
  • 46
  • 77
0

Arduino usually uses a 8 bit AVR chip and I have never seen a D compiler (DMD, LDC, GDC) which can generate 8 bit code.

Henri Cavalcante
  • 455
  • 5
  • 16