Prev: Float conversion
Next: HOOD resources
From: Warren on 29 Jul 2010 15:06 I'm trying to do a simple project build for avr (not expecting to run the code). I just want to test the tool chain for avr. I'm running into GPS configuration issues (and I'm still RTFMing). What is happening is that when I request a "Build all" it tries to execute "gnatmake" and doesn't find it, which is right -- I installed the win-avr version. It needs to run avr-<tool>.exe. I'm a bit surprised that the win-avr version doesn't do this out of the box. :( 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? How can I set this for ALL projects -- after all, this is the win-avr version of GPS. 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. Warren
From: Tero Koskinen on 29 Jul 2010 15:19 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. Quick tutorial for Windows XP: 1. Install Win-AVR somewhere 2. Install AVR-Ada into same location 3. Set PATH to point Win-AVR's bin directory. 4. Compile with avr-gnatmake. I have used following Hello World example (Mercurial repository) with AVR-Ada 1.0 (and 1.1) to test the setup: http://bitbucket.org/tkoskine/arduino-hello For AVR-Ada 1.1 you can use command: avr-gnatmake -XMCU=atmega328p -Phello.gpr to compile the source files for Arduino. > > Warren -Tero
From: Warren on 29 Jul 2010 15:36 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 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. ... > I have used following Hello World example (Mercurial repository) with > AVR-Ada 1.0 (and 1.1) to test the setup: > http://bitbucket.org/tkoskine/arduino-hello > > For AVR-Ada 1.1 you can use command: > avr-gnatmake -XMCU=atmega328p -Phello.gpr > > to compile the source files for Arduino. I've looked at that project and wondered which toolset to invest my time in (time is my shortest commodity). I was drawn to GPS because it looked like it would require minimal setup. But me thinks this is not the case. While I prefer Linux, I generally use Cygwin and XP because of my company provided laptop and the fact that my music recording software only runs Windows at home. On my to do list is to see if I can get my home PC to boot from an external USB drive. If so, I'll put Linux there. I may try to get this win-avr toolset to work from cygwin, by using a driver script to modify the path temporarily etc. I prefer command lines and makefiles anyway. ;-) One nice addition, which is perhaps in the works, is a way to set up simple tasking, even if it is non-preemptive with a Yield() call. Certainly this is first on my to-do list, once I can get something simple to work on the hardware. Thanks, Warren
From: Simon Wright on 29 Jul 2010 16:08 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! Might be as well to do the others as well (I see no avr-gdb, better GIRFT. Or build/test the main app logic on the host). > How can I set this for ALL projects -- after all, > this is the win-avr version of GPS. GPS is a host application, which supports multiple targets. The way we've worked in a GNAT Pro environment is that gnatmake and powerpc-wrs-vxworks-gnatmake (in your case, avr-gnatmake) and friends all live in the same folder. Indeed, the way to install the cross-environment is to install the host compiler first and then the cross; on Windows it defaults to the same install head. That's part of the reason for having <target>-gnatmake. Our GPRs are set up to use environment variables to choose whether to build for the host or the target. I don't know whether you can do this from the project properties editor in GPS, but you can certainly do it in Emacs! (nor Notepad, come to that).
From: sjw on 30 Jul 2010 05:12
On Jul 29, 9:08 pm, Simon Wright <si...(a)pushface.org> wrote: > but you can certainly do it > in Emacs! (nor Notepad, come to that). *or* Notepad. |