Need help making minimal bare metal ARM Cortex-M D program
Johannes Pfau
nospam at example.com
Sun Nov 24 06:21:42 PST 2013
Am Sun, 24 Nov 2013 14:19:43 +0100
schrieb "Mike" <none at none.com>:
> On Sunday, 24 November 2013 at 12:53:42 UTC, Iain Buclaw wrote:
> > On Sunday, 24 November 2013 at 12:43:01 UTC, Mike wrote:
> >> I am very new to D, but I finally got my toolchain compiled
> >> and working. I'm using LDC. I failed with GDC and eventually
> >> gave up.
> >>
> >
> > I know Johannes has some patches yet to trickle down into gdc.
> > And druntime is does not support ARM fully in 2.063, but it
> > would be helpful if you could take some time to let people know
> > what went wrong when you tried things, rather than just giving
> > up. Otherwise, nothing will get fixed.
Cortex-M is the 'bare metal' branch of ARM where you usually don't run
linux so druntime won't work anyway. There are some compiler fixes in
my branch that could be interesting though:
https://github.com/jpf91/GDC/commits/arm
BTW: I'll start merging back the fixes to gdc master this week. Some
fixes have to be merged into phobos upstream though so it might take
some time.
>
> I don't think the problems I encountered with GDC were the fault
> of GDC. They were my fault. I have more to learn about the
> Linux platform. It seems the GCC toolchain is highly dependent
> on the host platform and if things aren't set up just right, you
> get errors that have nothing to do with the actual problem.
>
> Also, when I tried to follow the crosstools instructions here
> (http://wiki.dlang.org/GDC/Cross_Compiler) I found that the
> latest crosstools was missing some of the options that are needed.
You mean options for bare metal builds or options described in the
wiki? I'm not sure if crosstool-NG works well with bare metal builds.
>
> I have been quite successful using the GNU Tools for ARM Embedded
> Processors here (https://launchpad.net/gcc-arm-embedded), and I
> hope to merge this with the GDC code and give it another try. I
> tried it this weekend, but I wasn't even able to get the shell
> scripts to run without errors.
>
> And, I didn't JUST give up. I worked on it all weekend, every
> weekend, for the past 3 weeks. I'm tired of the platform
> dependencies, and I'm anxious to just get started. Once I get
> more familiar with D and have some working code, I'll give GDC
> another try.
>
GCC build scripts can be annoying, especially when cross-compiling.
Your best bet is still crosstool-NG though, what exactly are the
missing options?
More information about the Digitalmars-d
mailing list