[SAoC] "Druntime for Microcontrollers" project thread

Severin Teona teona.severin9 at gmail.com
Tue Oct 6 15:58:04 UTC 2020


On Wednesday, 30 September 2020 at 18:03:55 UTC, IGotD- wrote:
> On Wednesday, 30 September 2020 at 17:55:48 UTC, IGotD- wrote:
>>
>> Ok, back from stupidity. With --function-sections and 
>> --data-sections now with the phobos and runtime properly 
>> compiled with those options, I was able to reduce the size. 
>> One binary from about 700KB to 400KB, another binary from 
>> about 500KB to about 320Kb.
>>
>> Still not microcontroller size but a slight improvement.
>
> Also, when linking the flag --gc-sections (GNU linker) must be 
> used otherwise nothing will happen.

Hello, thanks a lot for the tips. I have tried compiling the 
runtime with both flags (--function-sections and --data-sections 
in --dFlags) and also with --gc-sections (as an argument for the 
linker), but I must be probably doing something wrong because the 
size of the output is the same.

The binary you are talking about is the one after you link the 
druntime with the application you want to write on the 
microcontroller? Or just the static runtime and phobos?

Thank you again.


More information about the Digitalmars-d mailing list