comp.lang.ada
 help / color / mirror / Atom feed
From: Lucretia <laguest9000@googlemail.com>
Subject: Re: Things AVR-Ada needs to sort out - calling Rolf
Date: Tue, 29 Nov 2016 13:18:33 -0800 (PST)
Date: 2016-11-29T13:18:33-08:00	[thread overview]
Message-ID: <912d9921-6e9b-4fbc-a507-3ee92317f988@googlegroups.com> (raw)
In-Reply-To: <7730ace9-1961-4844-98f1-6f47d6848e06@googlegroups.com>

On Tuesday, 29 November 2016 18:32:28 UTC, rrr.e...@gmail.com  wrote:
> On Monday, November 28, 2016 at 7:39:45 PM UTC+1, Lucretia wrote:
> > Hi,
>  
> Hi,

Hi ho :D
 
> > Looking back at AVR stuff again and I still cannot believe Rolf Ebert hacks up the GCC build so much still.
> 
> That depends on the meaning of "so much".
> 
> I ported my patches for building gcc to gcc-5.3 and last February to gcc-6.2.
> 
> > As of GCC-4.9.4, the ability to build bare metal GNAT builds has been put back in place, see https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/ada/gcc-interface/Makefile.in?r1=218003&r2=219183&pathrev=219183 for the patch.
> 
> I read about it in the gcc-patches mailing, but cannot find it in your reference.  Actually I always wanted to move my build patches to your (or Simon's) way.

Er, the reference is above :/
  
> Perhaps the name of the patch is misleading. Actually when I first created it (gcc-3.4?) it removed about 200 bytes in the generated code from the binder file. It still makes the generated binder code a few bytes smaller. I could live without it, definitely.
> 

This (https://gist.github.com/Lucretia/d1c99124a889fd7b10f98b0418e2aaad & https://gist.github.com/Lucretia/326a08e89b5ec805eb67bb52e2ffdc34) is the b~led_shifter.ads generated from https://github.com/Lucretia/electronics/commit/593b6fb76779bb989b273cf4fe5db7841e3833d6#diff-9574567a0d03bebebfdad27c1c2a80c0

This (https://gist.github.com/Lucretia/e0ee7b35acad13d2b9dc726a671aa477) generated from https://github.com/Lucretia/bare_bones using free-ada. That is as small as it's gonna get.


> > As for 72-gcc-4.7-ada-timebase.patch, I'm not sure about this one. Is there really a need for this at all? Why does the time duration need to be changed for AVR?
> 
> That patch is also an attempt to reduce the code size on the target. Deviating from the Ada standard I can use a time base of 1ms and a time variable of only 32 bits. A few years ago 64 bit integers didn't work well on AVR.

But shouldn't setting the following:

Duration_32_Bits : constant Boolean := True;  -- ??

Sort this out?

I notice the code changes the denominator to 20000 * -6 rather than 20000 * -3, I'm not sure what this acheives tbh. Can you explain more?

> > The way to build this new compiler is to use --disable-libada in the configure command then:
> > 
> > make all-gcc
> > make all-target-libgcc
> > make -C gcc cross-gnattools ada.all.cross
> > make install-strip-gcc install-target-libgcc
> 
> Actually, I have difficulties to make that work. 

Try https://github.com/Lucretia/free-ada - build native first, then build i586-elf and then build bare_bones, trust me it works.

> > as can be seen here - https://github.com/Lucretia/free-ada/blob/develop/includes/bare_metal.inc
> 
> I looked at your script last February. In the end I sticked to my patches because I wanted to proceed and did not want to beautify my set of patches.

Yeah moving on is fine, but I really think it needs to be sorted out so anyone can just grab the source from fsf and build a working compiler.
 
> There aren't any extra patches anymore that need to be included in the upstream gcc!

Well, there are, whatever is left from the above list.
 
> Thanks for your hints. I'll see if I can streamline building AVR-Ada in the future.

Try what I have so far and see what you get. There is a build for avr-elf in free-ada, but I've not tried to build anything with it. Because of the extra timebase patch.

> best regards
>     Rolf

Ta.
Luke.


  reply	other threads:[~2016-11-29 21:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 18:39 Things AVR-Ada needs to sort out - calling Rolf Lucretia
2016-11-29 18:32 ` rrr.eee.27
2016-11-29 21:18   ` Lucretia [this message]
2016-11-29 23:14     ` Luke A. Guest
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox