Thread overview
D in AVR backend
Sep 21, 2013
Marcelo
Sep 21, 2013
Manu
Sep 21, 2013
Iain Buclaw
Sep 21, 2013
eles
Sep 21, 2013
Dmitry Olshansky
Oct 01, 2013
eles
September 21, 2013
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
September 21, 2013
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]


September 21, 2013
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';
September 21, 2013
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?
September 21, 2013
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
October 01, 2013
On Saturday, 21 September 2013 at 20:00:27 UTC, Dmitry Olshansky wrote:

*Just a bump for the OP to see it.*