What is the state of Microcontroller support in d?

Taylor Hillegeist via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 7 20:38:01 PDT 2016


So, for me one of the greatest things about d is that it is 
compiled to machine language. But It makes me sad that this 
strength doesn't seem to be available in one of the most obvious 
places.

There are some projects:

minilibd:
https://bitbucket.org/timosi/minlibd
The example code is still waiting for decision what is the proper 
way to
access peripheral registers in D code.

The Discovery board Demo:
https://github.com/JinShil/stm32f42_discovery_demo
I actually was able to run the code on this board.

These are very cool, I do notice that both of these use GDC.

The discovery demo looked tedious to implement 
(https://github.com/JinShil/stm32_datasheet_to_d).

I cheated and used a CMSIS .svd file to build the peripherals 
registers.
https://www.keil.com/pack/doc/CMSIS/SVD/html/svd__outline_pg.html

There are big hurdles:
Typeinfo bloat.
Register/Linker file configuation.
Standardized build environments.
More complete runtimes with examples :)
better documentation on d runtime and what is needed for x 
functionality.

But bottom line is it really isn't easy to do. I follow the 
examples for the most part. I feel like the Build environment was 
clunkly for micros and dub certainly was not the right build tool.

I was just curious what is the story?

I know its a goal that in time the community would love to reach.


More information about the Digitalmars-d mailing list