Need help making minimal bare metal ARM Cortex-M D program

Johannes Pfau nospam at example.com
Sun Dec 1 03:17:12 PST 2013


Am Sun, 01 Dec 2013 09:58:01 +0100
schrieb "Mike" <none at none.com>:

> I was finally able to build a GDC cross compiler using GCC 4.8.2, 
> the GDC 4.8 branch, and crosstools-ng 1.19.0.  However, I found 
> the following errors in the instructions located here 
> (http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG)

BTW: The new location is
http://wiki.dlang.org/GDC/Cross_Compiler/crosstool-NG

> 
> 1.  The "Other Languages" option does not appear for a bare metal 
> build.  You must modify the cc.ini file to make it available per 
> jerro's insructions above.  Thanks jerro

That's a bug in crosstool-NG, I'll try to get it fixed.

> 2.  The "Core gcc extra config" option exists, but the "gcc extra 
> config" does not.  It doesn't appear to be necessary, but I have 
> yet to test this toolchain.

It's indeed not necessary for bare-metal builds. That's probably
because the instructions weren't tested on bare metal builds.

> 3.  The "Paths and misc options, Local tarballs directory" option 
> does not seem to be correct.  For me, I had to go to "C Compiler" 
> -> "gcc version" and choose "Custom gcc" and point crosstools-ng 
> to the folder containing the merged GCC/GDC source code.

Back when I wrote those instructions the "Custom gcc" option didn't
exist. Custom gcc will work just fine, but there's a subtle difference:
crosstool-NG may automatically apply some patches for certain GCC
versions. It won't apply those patches when using the "Custom gcc"
option.

However, the method described in the wiki only works if the patched
sources are packaged into a new tarball with exactly the same name as
the original tarball (gcc-4.7.1.tar.bz2/gcc-4.8.2.tar.bz2/...). Then
crosstool-NG may have cached the extracted sources and those have to be
deleted. And nowadays crosstool-NG might actually prefer .tar.xz files,
so if you have an unpatched tar.xz file in the source directory it
file has to be deleted. I'll probably add some text about these issues
to the documentation.

> I hope this information is useful to someone.

It definitely is. Thanks for the feedback!


More information about the Digitalmars-d mailing list