0

D can access the C/C++ runtime libraries on a target environment and it also allows C programs to access its functions in a similar fashion.

[1] Is there a way to integrate the capability of using D programs on RIOT, as in binaries compiled by the D compiler?

Citrullin
  • 2,269
  • 14
  • 29
saishme
  • 51
  • 1
  • 1
  • 7
  • 1
    Adding language support where? To your toolchain? – πάντα ῥεῖ Oct 22 '16 at 22:36
  • Yes, so that it becomes possible for me to develop in D rather than C/C++ (no disrespect to those two! It's just an academic curiosity that I'm trying to quench here!) – saishme Oct 22 '16 at 22:42
  • Check GCC it offers a broad variety of programming languages support: http://dgcc.sourceforge.net/ – πάντα ῥεῖ Oct 22 '16 at 22:45
  • Will definitely go through that. Thank you! :) – saishme Oct 22 '16 at 22:49
  • 2
    The http://dgcc.sourceforge.net/ website is horribly outdated. The current address for the GCC D compiler is https://gdcproject.org/ . Out of the architectures RIOT supports (AVR, MSP, ARM) GDC will currently probably only work on ARM. The standard d runtime (druntime, phobos) won't work on embedded systems so you'll have to build GDC/GCC with `--disable-libphobos`. See http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler for more information. – jpf Oct 23 '16 at 13:09
  • Thank you so much for the pointer @jpf ! :) – saishme Oct 23 '16 at 19:18

1 Answers1

2

Since RIOT is built with GCC by default, I would assume the required "D support" is already there - you need to enable the D programming language in your GCC (may require recompiling the GCC in some cases!).

However, GDC (http://gdcproject.org - the D language support in GCC) may not yet have support for your preferred target architecture. ARM is definitely supported - I use it myself on my ODROID (http://hardkernel.com) machines.

As pointed by @jpf (who is one of the GDC devs btw), you do not have the luxury of using the standard library, so you will have to use the C runtime all the time, which is not really a big problem...

If you do successfully run your D programs on RIOT OS, please write a blog article about the steps required to make it work as you wished. The D community will appreciate that.

DejanLekic
  • 18,787
  • 4
  • 46
  • 77