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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,516fa714bab424cb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news.wiretrip.org!news2.arglkargh.de!newsfeed.straub-nv.de!open-news-network.org!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: GPS 2010 for AVR Date: Fri, 30 Jul 2010 13:40:15 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <4c51d42b$0$12211$7b1e8fa0@news.nbl.fi> Injection-Date: Fri, 30 Jul 2010 13:40:15 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="31616"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xZRnsvE9jOMP/Uxstuf6m2FdpzGLnOm4=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:EbVOS01LG0Ogkb5ieX9ulS1fAr4= Xref: g2news1.google.com comp.lang.ada:12718 Date: 2010-07-30T13:40:15+00:00 List-Id: Tero Koskinen expounded in news:4c51d42b$0$12211$7b1e8fa0@news.nbl.fi: > On 07/29/2010 10:06 PM, Warren wrote: >> I'm trying to do a simple project build for avr (not >> expecting to run the code). > .. >> I'll be doing some more RTFM, but any hints on >> this is appreciated. It would be cool to do some >> Arduino work in Ada, this coming winter. > > I haven't tried AVR programming with GPS or GNAT GPL toolchain, but I > have been using AVR-Ada 1.0 and 1.1 from http://avr-ada.sf.net/ > for Arduino. So far it has worked pretty well on OpenBSD, Fedora Linux, > and Windows XP. .. > For AVR-Ada 1.1 you can use command: > avr-gnatmake -XMCU=atmega328p -Phello.gpr I installed AVR-Ada on my home computer. I'm interested in using some of the library support for it, so I gave it a go. But I ran into a problem in getting it to link: avr-gnatmake -Ptestavr.gpr avr-gnatbind -aIc:/WinAVR-20100110/lib/gcc/avr/4.3.3/rts/avr5/adainclude - aOc:/WinAVR-20100110/lib/gcc/avr/4.3.3/rts/avr5/adalib -I- -x F:\cygwin \home\Warren\avr\testavr\testavr.ali avr-gnatlink F:\cygwin\home\Warren\avr\testavr\testavr.ali -mmcu=avr5 -lgcc -o F:\cygwin\home\Warren\avr\testavr\testavr b~testavr.o: In function `adafinal': b~testavr.adb:(.text+0x16): undefined reference to `system__standard_library__adafinal' b~testavr.o: In function `main': b~testavr.adb:(.text+0x44): undefined reference to `__gnat_initialize' b~testavr.adb:(.text+0x54): undefined reference to `system__standard_library__adafinal' b~testavr.adb:(.text+0x58): undefined reference to `__gnat_finalize' avr-gnatlink: error when calling C:\WinAVR-20100110\bin\avr-gcc.exe avr-gnatmake: *** link failed. make: *** [testavr.ihex] Error 4 I also tried using the -RTS= parameter. If I leave out the -RTS= or the -aI and -aO options, it then complains about not being able to find -lgnat. I also tried -nostdlib, but that didn't seem to make any difference. There seems to be an undocumented step in configuring the platform. I would have thought that -mmcu=... would have taken care of that, but evidently it is not enough. Also: are you sure the parameter is '-XMCU=...' ? It didn't seem to matter when I used -mmcu=... (I tried both). Oh the fun in getting embedded stuff to work. ;-) Warren