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,FREEMAIL_FROM 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.227.230 with SMTP id sd6mr7259893pbc.8.1334505837638; Sun, 15 Apr 2012 09:03:57 -0700 (PDT) Path: r9ni59554pbh.0!nntp.google.com!news1.google.com!postnews.google.com!f27g2000yqc.googlegroups.com!not-for-mail From: Rolf Newsgroups: comp.lang.ada Subject: Re: Building gnat-gpl-2011-avr-windows from scratch in GPS Date: Sun, 15 Apr 2012 09:02:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: <20a04e0a-04b9-4bc9-bb94-04ba35e451d0@f27g2000yqc.googlegroups.com> References: <20256137.216.1333941508115.JavaMail.geo-discussion-forums@vbpp14> <11114179.137.1334181998473.JavaMail.geo-discussion-forums@ynej18> NNTP-Posting-Host: 91.4.237.156 Mime-Version: 1.0 X-Trace: posting.google.com 1334505837 6463 127.0.0.1 (15 Apr 2012 16:03:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 15 Apr 2012 16:03:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f27g2000yqc.googlegroups.com; posting-host=91.4.237.156; posting-account=-RRRjAkAAAAGFvmHqTCN-L7gNQ7lRGfd User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-04-15T09:02:31-07:00 List-Id: > > Is there a worked example with the toolchain? > > No. I could not find any example that I could run yet. AdaCore's AVR compiler comes with a sample application somewhere (I don't remember where). When using gcc for AVR you have to specify the target MCU at the compile and link steps with the option -mmcu=. In your example you missed that option in the compile step. > But googling today I found this tutorial by Maciej Kucia:http://student.agh.edu.pl/~mkucia/wiki/doku.php?id=avrada > > which looks to be very interesting. The tutorial requires GNAT AVR + GPS + > WinAVR GNU gcc tools and libraries for AVR + Atmel AVR Studio 5. I use all of them frequently, so that's no problem, but I'd expect that I could use just GNAT AVR + GPS to build the .hex. However sure it can be a very good starting point. I will try it. AVR-Ada /= AdaCore's AVR compiler. 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 HTH Rolf