ARM Cortex-M Microcontroller startup files
Timo Sintonen via Digitalmars-d
digitalmars-d at puremagic.com
Mon Apr 27 06:42:23 PDT 2015
On Monday, 27 April 2015 at 07:55:10 UTC, Martin Nowak wrote:
> Great, I tried to find out how GDC binaries are build, but
> couldn't find any script.
Instructions here:
http://wiki.dlang.org/GDC/Cross_Compiler/Generic
or here:
https://bitbucket.org/timosi/minlibd/wiki/gdc_cross_compiler
There are other instructions in
http://wiki.dlang.org/GDC/Installation
but I think there is no script
>
> How much stuff do you strip out of runtime for minilibd? It
> still seems to contain fat typeinfo and moduleinfo. We'd
> probably need the equivalent of -no-rtti and -fno-exceptions
> and add -fno-moduleinfo.
It uses -no-moduleinfo but. The module related stuff in object.d
has been removed but there may be some code elsewhere. I got
exceptions to work but for smaller systems they should be made
removable.
The basic idea has been to make as little changes as possible. I
started by compiling object.d and then added files and modified
them one by one until there were no compile or link errors. Then
I added other files that could be compiled without errors. It is
not guaranteed that all features work and the list of files have
changed from version to version.
Required and optional files can be found in Makefile
https://bitbucket.org/timosi/minlibd/src/15e88941c534a19e753fa0eebcd053b17392b7ad/libdruntime/Makefile?at=default
Required changes to these files
https://bitbucket.org/timosi/minlibd/src/15e88941c534a19e753fa0eebcd053b17392b7ad/Changes?at=default
A while ago someone turned this change list to a bugzilla issue
14101, and there is also related issue 14100
>
> Maybe building a few different configurations of minilibd makes
> sense.
> The ARM toolchain comes with a nano.spec to select newlib-nano
> and size optimized libc++.
> https://launchpadlibrarian.net/200699979/readme.txt
I have not yet needed libc in my work but of course we can have
one.
I repeat here that all libraries have to be built with the same
compiler flags that the application. Otherwise hard to find bugs
may occur.
More information about the Digitalmars-d
mailing list