www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Has anyone run D program on Arduino?

reply mw <mingwu gmail.com> writes:
If you do, can you share your experience?

e.g tool chains you use.

Thanks!
Oct 03 2022
next sibling parent reply ryuukk_ <ryuukk.dev gmail.com> writes:
On Monday, 3 October 2022 at 23:00:28 UTC, mw wrote:
 If you do, can you share your experience?

 e.g tool chains you use.

 Thanks!
Hello, I haven't tested myself, but looks like the way to go is with LDC: https://wiki.dlang.org/D_on_AVR
Oct 03 2022
parent mw <mingwu gmail.com> writes:
On Tuesday, 4 October 2022 at 03:09:16 UTC, ryuukk_ wrote:
 On Monday, 3 October 2022 at 23:00:28 UTC, mw wrote:
 If you do, can you share your experience?

 e.g tool chains you use.

 Thanks!
Hello, I haven't tested myself, but looks like the way to go is with LDC: https://wiki.dlang.org/D_on_AVR
Nice, will check.
Oct 03 2022
prev sibling next sibling parent Max Samukha <maxsamukha gmail.com> writes:
On Monday, 3 October 2022 at 23:00:28 UTC, mw wrote:
 If you do, can you share your experience?

 e.g tool chains you use.

 Thanks!
I've done a one-off project for a custom board, which is essentially an Arduino plus a bunch of 74-series ICs. I was not successful with LDC because of issues with ISRs, slices and something else I can't remember. All or some of the issues may have been fixed since. GDC works well, though. You can even use the new GDC 12 branch. It segfaults on narrowing conversions, but that was easy to work around with casts. My current toolchain is GDC 12.2 for mingw-w64 host, binutils 2.39, avr libc 2.01, and a tweaked version of https://github.com/WebFreak001/avrd.
Oct 04 2022
prev sibling parent reply Adam D Ruppe <destructionator gmail.com> writes:
On Monday, 3 October 2022 at 23:00:28 UTC, mw wrote:
 If you do, can you share your experience?
I finally decided to do a hello world and write up some info in my blog about it: http://dpldocs.info/this-week-in-d/Blog.Posted_2022_10_10.html#hello-arduino Might help you get started.
Oct 10 2022
next sibling parent Johan <j j.nl> writes:
On Monday, 10 October 2022 at 16:55:48 UTC, Adam D Ruppe wrote:
 On Monday, 3 October 2022 at 23:00:28 UTC, mw wrote:
 If you do, can you share your experience?
I finally decided to do a hello world and write up some info in my blog about it: http://dpldocs.info/this-week-in-d/Blog.Posted_2022_10_10.html#hello-arduino Might help you get started.
Hey Adam, Nice! About inline assembly with GDC and LDC, LDC supports GDC-style syntax since v1.21. See examples here: https://github.com/ldc-developers/druntime/pull/171/files cheers, Johan
Oct 10 2022
prev sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Monday, 10 October 2022 at 16:55:48 UTC, Adam D Ruppe wrote:
 On Monday, 3 October 2022 at 23:00:28 UTC, mw wrote:
 If you do, can you share your experience?
I finally decided to do a hello world and write up some info in my blog about it: http://dpldocs.info/this-week-in-d/Blog.Posted_2022_10_10.html#hello-arduino Might help you get started.
Thanks Adam
Oct 11 2022