Embedded D, top down?

Timo Sintonen via D.gnu d.gnu at puremagic.com
Fri Feb 20 23:56:19 PST 2015


On Friday, 20 February 2015 at 19:51:16 UTC, Henri Sundelin wrote:
> Hi Timo,
>
> Thanks for the info! I looked the minlibd, the biggest question 
> for me is whether it targets too small devices, taking out the 
> most of phobos functionality in the process? What are your 
> ultimate goals?
>
While my personal interests are in stm32 processors, the goal of 
the library project is:
- to be able to run D programs in any platform without operating 
system support
- to change the standard library as little as possible
- to get the changes in the stardard library when possible

> My embedded target spec looks something like 256k RAM/256M 
> flash, so I'd expect it to be possible to bring of plenty of 
> phobos onboard? What I need is full OO, templates, string 
> processing etc.. we want to (de)serialize JSON a lot. Malloc is 
> provided. Threading, networking etc stuff is not required.

One big thing here is the lack of gc. All allocated objects must 
be freed manually. Many library functions use gc allocated data 
internally and they may not be freed. There is work going on to 
remove gc data in labrary functions.
Otherwise objects wotk fine. Templates are a compile time feature 
and not depending on target.

Many phobos features require support from operating system or on 
libc which in turn depends on the operating system. There are 
features like string functions that could be used. The issue is 
that phobos files usually import several files that in turn 
import other files. In the chain there may always be a file that 
can not be compiled. There is active work going on to reduce the 
amount of imports. This will make easier to port phobos and so I 
have not hurried with phobos yet.



More information about the D.gnu mailing list