www.digitalmars.com         C & C++   DMDScript  

D.gnu - D in AVR backend

reply "Marcelo" <mpolitzer.c gmail.com> writes:
Hello I've just successfully lit a LED with a atmega88 using GDC.
(AVR is a 8bit micro controller with 16bits pointers)

I had to change GDC to accept a zero critsize and implemented
these stubs for volatile operations on the memmory mapped IO.

extern (C) void _d_criticalenter() {}
extern (C) void _d_criticalexit() {}

The toolchain is using newlib for now.
My next step is to try making it with the avr-libc, and then get 
the IRQs working with the prologue and epilogue generated by it.

Regards, Marcelo
Sep 21 2013
next sibling parent Manu <turkeyman gmail.com> writes:
--089e0158c6f023295e04e6e23539
Content-Type: text/plain; charset=UTF-8

On 21 September 2013 19:34, Marcelo <mpolitzer.c gmail.com> wrote:

 Hello I've just successfully lit a LED with a atmega88 using GDC.
 (AVR is a 8bit micro controller with 16bits pointers)

 I had to change GDC to accept a zero critsize and implemented
 these stubs for volatile operations on the memmory mapped IO.

 extern (C) void _d_criticalenter() {}
 extern (C) void _d_criticalexit() {}

 The toolchain is using newlib for now.
 My next step is to try making it with the avr-libc, and then get the IRQs
 working with the prologue and epilogue generated by it.

 Regards, Marcelo

[Like] --089e0158c6f023295e04e6e23539 Content-Type: text/html; charset=UTF-8 <div dir="ltr">On 21 September 2013 19:34, Marcelo <span dir="ltr">&lt;<a href="mailto:mpolitzer.c gmail.com" target="_blank">mpolitzer.c gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;pad ing-left:1ex">Hello I&#39;ve just successfully lit a LED with a atmega88 using GDC.<br> (AVR is a 8bit micro controller with 16bits pointers)<br> <br> I had to change GDC to accept a zero critsize and implemented<br> these stubs for volatile operations on the memmory mapped IO.<br> <br> extern (C) void _d_criticalenter() {}<br> extern (C) void _d_criticalexit() {}<br> <br> The toolchain is using newlib for now.<br> My next step is to try making it with the avr-libc, and then get the IRQs working with the prologue and epilogue generated by it.<br> <br> Regards, Marcelo<br> </blockquote></div><br></div><div class="gmail_extra">[Like]<br></div></div> --089e0158c6f023295e04e6e23539--
Sep 21 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 21 September 2013 10:34, Marcelo <mpolitzer.c gmail.com> wrote:
 Hello I've just successfully lit a LED with a atmega88 using GDC.
 (AVR is a 8bit micro controller with 16bits pointers)

 I had to change GDC to accept a zero critsize and implemented
 these stubs for volatile operations on the memmory mapped IO.

 extern (C) void _d_criticalenter() {}
 extern (C) void _d_criticalexit() {}

 The toolchain is using newlib for now.
 My next step is to try making it with the avr-libc, and then get the IRQs
 working with the prologue and epilogue generated by it.

 Regards, Marcelo

Awesome. Do let me know how you get on. I expect to see links and patches. =) -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Sep 21 2013
prev sibling next sibling parent "eles" <eles eles.com> writes:
On Saturday, 21 September 2013 at 09:34:26 UTC, Marcelo wrote:
 Hello I've just successfully lit a LED with a atmega88 using 
 GDC.
 (AVR is a 8bit micro controller with 16bits pointers)

 I had to change GDC to accept a zero critsize and implemented
 these stubs for volatile operations on the memmory mapped IO.

 extern (C) void _d_criticalenter() {}
 extern (C) void _d_criticalexit() {}

Hey, me too I need that! Mind to share?
Sep 21 2013
prev sibling next sibling parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
21-Sep-2013 13:34, Marcelo пишет:
 Hello I've just successfully lit a LED with a atmega88 using GDC.
 (AVR is a 8bit micro controller with 16bits pointers)

 I had to change GDC to accept a zero critsize and implemented
 these stubs for volatile operations on the memmory mapped IO.

 extern (C) void _d_criticalenter() {}
 extern (C) void _d_criticalexit() {}

 The toolchain is using newlib for now.
 My next step is to try making it with the avr-libc, and then get the
 IRQs working with the prologue and epilogue generated by it.

 Regards, Marcelo

Another +1. Would be awesome to see this as a git repo and/or some howto. After all I used to teach folks basics on MCUs with precisely these chips (and then there are *duinos sold everywhere). -- Dmitry Olshansky
Sep 21 2013
prev sibling parent "eles" <eles eles.com> writes:
On Saturday, 21 September 2013 at 20:00:27 UTC, Dmitry Olshansky 
wrote:

*Just a bump for the OP to see it.*
Oct 01 2013