www.digitalmars.com         C & C++   DMDScript  

D.gnu - Bare metal D

reply "teachop" <is-not given.com> writes:
Looking for help / advice getting D running in an embedded 
system.  The compiler building for gdc and newlib went smoothly 
(mostly) thanks to this web page:
http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG

I have given the bitbucket-hosted timosi/minlibd a fair bit of 
time and not been able to link correctly and get an output.  The 
library built wihtout error.  The example there isn't complete.  
My targets are AVR32 and ARM Cortex M3 but am first focusing only 
on the M3.

Any advice on getting this going?  Thanks.
May 04 2013
next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--047d7bb044ac5f992904dbf670c3
Content-Type: text/plain; charset=ISO-8859-1

On May 4, 2013 6:40 PM, "teachop" <is-not given.com> wrote:
 Looking for help / advice getting D running in an embedded system.  The

web page:
 http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG

 I have given the bitbucket-hosted timosi/minlibd a fair bit of time and

wihtout error. The example there isn't complete. My targets are AVR32 and ARM Cortex M3 but am first focusing only on the M3.
 Any advice on getting this going?  Thanks.

Seek me out if there are any blockers preventing you from doing this. Otherwise please document everything you do. :) Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --047d7bb044ac5f992904dbf670c3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <p><br> On May 4, 2013 6:40 PM, &quot;teachop&quot; &lt;<a href=3D"mailto:is-not gi= ven.com">is-not given.com</a>&gt; wrote:<br> &gt;<br> &gt; Looking for help / advice getting D running in an embedded system. =A0= The compiler building for gdc and newlib went smoothly (mostly) thanks to t= his web page:<br> &gt; <a href=3D"http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG">h= ttp://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG</a><br> &gt;<br> &gt; I have given the bitbucket-hosted timosi/minlibd a fair bit of time an= d not been able to link correctly and get an output. =A0The library built w= ihtout error. =A0The example there isn&#39;t complete. =A0My targets are AV= R32 and ARM Cortex M3 but am first focusing only on the M3.<br> &gt;<br> &gt; Any advice on getting this going? =A0Thanks.</p> <p>Seek me out if there are any blockers preventing you from doing this.=A0= Otherwise please document everything you do.=A0 :)<br></p> <p>Regards<br> -- <br> Iain Buclaw</p> <p>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;</p> --047d7bb044ac5f992904dbf670c3--
May 05 2013
prev sibling next sibling parent "Timo Sintonen" <t.sintonen luukku.com> writes:
On Sunday, 5 May 2013 at 10:56:53 UTC, Iain Buclaw wrote:
 On May 4, 2013 6:40 PM, "teachop" <is-not given.com> wrote:
 Looking for help / advice getting D running in an embedded 
 system.  The

thanks to this web page:
 http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG

 I have given the bitbucket-hosted timosi/minlibd a fair bit of 
 time and

built wihtout error. The example there isn't complete. My targets are AVR32 and ARM Cortex M3 but am first focusing only on the M3.
 Any advice on getting this going?  Thanks.

Seek me out if there are any blockers preventing you from doing this. Otherwise please document everything you do. :)

I have been able to compile, link and run a test program in stm32f4 with the tools and libs in my repo. The major thing that is missing is memory allocation. The one I used was heavily related to my hardware and I am now making a more general version. Another file that is missing is a startup file. The file should have code that sets the state of the processor so that we can call main. This means usually setting the clock oscillator, interrupt controller and memory controller. This file is totally processor dependent and the processor vendor does provide this. The license of those files may prevent me to share them in my repo. There has also been issues in linking. When an operating system loads an elf file, it can look the elf headers and find out the section locations. When the file is loaded into flash memory, this information is lost. Linker script variables are used to mark the locations but they may still be wrong. I have been a busy lately but I try to get a working example as soon as possible. It is possible and it has been done and it has worked. Meanwhile, I am interested to hear what kind of processors you are using. I can answer stm32 related questions if that is your target.
May 05 2013
prev sibling next sibling parent "teachop" <is-not given.com> writes:
On Sunday, 5 May 2013 at 18:00:45 UTC, Timo Sintonen wrote:
 On Sunday, 5 May 2013 at 10:56:53 UTC, Iain Buclaw wrote:
 On May 4, 2013 6:40 PM, "teachop" <is-not given.com> wrote:
 Looking for help / advice getting D running in an embedded 
 system.  The

thanks to this web page:
 http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG

 I have given the bitbucket-hosted timosi/minlibd a fair bit 
 of time and

library built wihtout error. The example there isn't complete. My targets are AVR32 and ARM Cortex M3 but am first focusing only on the M3.
 Any advice on getting this going?  Thanks.

Seek me out if there are any blockers preventing you from doing this. Otherwise please document everything you do. :)

I have been able to compile, link and run a test program in stm32f4 with the tools and libs in my repo. The major thing that is missing is memory allocation. The one I used was heavily related to my hardware and I am now making a more general version. Another file that is missing is a startup file. The file should have code that sets the state of the processor so that we can call main. This means usually setting the clock oscillator, interrupt controller and memory controller. This file is totally processor dependent and the processor vendor does provide this. The license of those files may prevent me to share them in my repo. There has also been issues in linking. When an operating system loads an elf file, it can look the elf headers and find out the section locations. When the file is loaded into flash memory, this information is lost. Linker script variables are used to mark the locations but they may still be wrong. I have been a busy lately but I try to get a working example as soon as possible. It is possible and it has been done and it has worked. Meanwhile, I am interested to hear what kind of processors you are using. I can answer stm32 related questions if that is your target.

is if I order in an inexpensive ST Micro "discovery" board so I can track along with your work. My first real goal is for ARM and specifically the NXP LPC1788.
May 05 2013
prev sibling parent "teachop" <is-not given.com> writes:
I picked up an STM32F205RF board, ready when you are Timo...
May 07 2013