From: Warren on
Simon Wright expounded in news:m2wrseqcep.fsf(a)pushface.org:

> Warren <ve3wwg(a)gmail.com> writes:
>
>> I have in my C:\GNAT-AVR\2010\bin directory the
>> necessary executables, including avr-gnatmake.exe,
>> etc.
>>
>> So where do I configure this for GPS?
>
> Go into Project > Edit Project Properties, select the Language tab. In
> the lower half (Tools) > Compiler, click on 'gnatmake'. I see a little
> diaog with an option pulldown - click on this and there is
> avr-gnatmake!

Ok, I found that. The one thing I thought that was unintuitive,
is all the other tools had drop down widgets to make a choice
on. I saw the 'gnatmake' there, but I couldn't see how to
change it. After puzzling a bit and trying other stuff I gave
a frustrated double-click on it, that suddenly brought up a
new dialog box. That's unintuitive, because it doesn't look like
it should work. Maybe it's just me.

It's certainly a pain to have to go changing everything for
each new avr project. So after playing with GPS a bit, I
moved back to makefile and emacs.

Warren
From: Warren on
Tero Koskinen expounded in news:4c51d42b$0$12211$7b1e8fa0(a)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
From: sjw on
On Jul 30, 2:40 pm, Warren <ve3...(a)gmail.com> wrote:

> avr-gnatlink F:\cygwin\home\Warren\avr\testavr\testavr.ali -mmcu=avr5 -lgcc
> -o F:\cygwin\home\Warren\avr\testavr\testavr

Just -lgcc on its own? you'd expect it to call up -lgnat & possibly -
lgnarl. Hmm.
From: Warren on
sjw expounded in news:d00563f7-b2a4-4a8c-8d53-adcbe72d62d8
@j9g2000yqn.googlegroups.com:

> On Jul 30, 2:40�pm, Warren <ve3...(a)gmail.com> wrote:
>
>> avr-gnatlink F:\cygwin\home\Warren\avr\testavr\testavr.ali -mmcu=avr5 -
> lgcc
>> -o F:\cygwin\home\Warren\avr\testavr\testavr
>
> Just -lgcc on its own? you'd expect it to call up -lgnat & possibly -
> lgnarl. Hmm.

Huh? It does the -lgnat on its own. Adding it
didn't helped either. ;-)

Warren
From: Warren on
Warren expounded in
news:Xns9DC56260D7E70WarrensBlatherings(a)81.169.183.62:

> Tero Koskinen expounded in news:4c51d42b$0$12211$7b1e8fa0(a)news.nbl.fi:
>> 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:

Ok, I looked at the hello example more closely, and
after some experimentation I finally got all my ducks
in a row.

It now works, hoo ha!

The key turned out to be the following 3 lines in the
project file (that I had differently):

package Builder renames AVR.Builder;
package Compiler renames AVR.Compiler;
package Binder renames AVR.Binder;

I'm not that familiar with all this gnat project file
business, but I can see that I'll need to..

Warren
First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: Float conversion
Next: HOOD resources