From: Warren <ve3wwg@gmail.com>
Subject: Re: GPS 2010 for AVR
Date: Fri, 30 Jul 2010 13:40:15 +0000 (UTC)
Date: 2010-07-30T13:40:15+00:00 [thread overview]
Message-ID: <Xns9DC56260D7E70WarrensBlatherings@81.169.183.62> (raw)
In-Reply-To: 4c51d42b$0$12211$7b1e8fa0@news.nbl.fi
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
next prev parent reply other threads:[~2010-07-30 13:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 19:06 GPS 2010 for AVR Warren
2010-07-29 19:19 ` Tero Koskinen
2010-07-29 19:36 ` Warren
2010-07-30 13:40 ` Warren [this message]
2010-07-30 15:43 ` sjw
2010-07-30 16:33 ` Warren
2010-07-30 19:36 ` Simon Wright
2010-07-30 20:56 ` Warren
2010-07-30 18:13 ` Warren
2010-07-29 20:08 ` Simon Wright
2010-07-30 9:12 ` sjw
2010-07-30 13:22 ` Warren
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox