comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Building gnat-gpl-2011-avr-windows from scratch in GPS
Date: Tue, 17 Apr 2012 16:58:51 +0000 (UTC)
Date: 2012-04-17T16:58:51+00:00	[thread overview]
Message-ID: <jmk7gb$9i0$1@dont-email.me> (raw)
In-Reply-To: 20a04e0a-04b9-4bc9-bb94-04ba35e451d0@f27g2000yqc.googlegroups.com

On Sun, 15 Apr 2012 09:02:31 -0700, Rolf wrote:

> AVR-Ada V1.1 still uses gcc-4.3.x, AdaCore's AVR compiler is based on
> gcc-4.5. That version has a serious problem if you use locally renamed
> variables of the MCU's registers.  Either use AVR-Ada V1.1 or wait a few
> days/weeks for AVR-Ada V1.2 which will use gcc-4.7

Good news indeed!

I have just successfully(as far as I know!) built gcc-4.7 prerelease 
version (20120302) for AVR, and verified it makes the "Blinky" project 
http://sourceforge.net/apps/mediawiki/avr-ada/index.php?
title=USB_Boarduino#Blinky_in_Ada
which works with appropriate changes on three platforms.

I have also added a switch and modified the example along the lines : 
    Sw : Boolean renames MCU.PinB_Bits(1);
...
    MCU.DDRB_Bits := (1 => DD_Input, others => DD_Output); 
...
        LED <= not Sw;
and the fact that it works as expected suggests to me that the GCC4.5 bug 
with renamed registers has been fixed.

One of the platforms I tried, http://www.pjrc.com/teensy/
uses the Atmega32U4 which isn't in the list of AVRAda 1.1 supported 
devices. (however, mcu=atmega328p worked for this example)
Are there any guidelines how to add support for a new CPU, perhaps by 
modifying the 32u6 sources?

- Brian




  parent reply	other threads:[~2012-04-17 16:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09  3:18 Building gnat-gpl-2011-avr-windows from scratch in GPS Rego, P.
2012-04-09  7:23 ` Simon Wright
2012-04-11 22:06   ` Rego, P.
2012-04-15 16:02     ` Rolf
2012-04-17  1:01       ` Rego, P.
2012-04-17 15:37         ` Simon Wright
2012-04-17 16:58       ` Brian Drummond [this message]
2012-04-17 19:29         ` Simon Wright
2012-04-17 21:19           ` Brian Drummond
replies disabled

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