From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b4945ea154eefb5f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.233.170 with SMTP id tx10mr12354667pbc.0.1334681932036; Tue, 17 Apr 2012 09:58:52 -0700 (PDT) Path: r9ni67248pbh.0!nntp.google.com!news2.google.com!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Building gnat-gpl-2011-avr-windows from scratch in GPS Date: Tue, 17 Apr 2012 16:58:51 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <20256137.216.1333941508115.JavaMail.geo-discussion-forums@vbpp14> <11114179.137.1334181998473.JavaMail.geo-discussion-forums@ynej18> <20a04e0a-04b9-4bc9-bb94-04ba35e451d0@f27g2000yqc.googlegroups.com> Mime-Version: 1.0 Injection-Date: Tue, 17 Apr 2012 16:58:51 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="DkTdSjxOCm6DqG+Uf7eArg"; logging-data="9792"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19t0t3zrlEZ/lnRAu1fyPetTZzMTiCGESc=" User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Cancel-Lock: sha1:EONkDi/w6HHSB7YaNvyY+MVD3S4= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-04-17T16:58:51+00:00 List-Id: 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