avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] HowTo split a program into several files ?


From: Bernard Fouché
Subject: Re: [avr-chat] HowTo split a program into several files ?
Date: Tue, 13 Sep 2005 15:22:02 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Vincent Trouilliez wrote:

I also gathered that your WinAVR was a lot more than what I thought it
was. I thought it was a little program purely to download code into the
AVR, but after reading Joerg'sz comment on this web page, it seems it
provides a lot more. So, for a change, I will reboot the machine and
start Widows, god it's been 15 months, I wonder if I still know how to
operate it ?! ;-)
You can also stay with linux: I'm doing avr development for months (well more than one year now!) under Linux. I started with the Makefile from WinAVR : it works also under Linux. (anyway I can send
you some Makefiles we have here,all derived from WinAVR Makefile)

I'm used to work with emacs for the edit-compile-test cycle, others work with eclipse here and they are fine also. Eclipse & emacs can be seen as IDE however, at least in emacs case, you'll have to invest some time to use it. IMHO emacs main advantage is to allow you to work without ever touching
the mouse during the whole day :-)

For a time I had my project developped on Linux and occasionnaly re-compiled with WinAVR from the same set of files: there was nothing to do but to change a single line in the Makefile (again!) because of Windows backslash use in file name path. I used WinAVR on a laptop when going on the field (and now
the laptop is also under Linux)

Anyway using WinAVR Makefile as a start is a very good solution since it is written in a way that allows you to have something working quickly while allowing you still to get the control on everything is you need it. And
it will work on Linux, Windows, MacOS/X, etc.


David, "avr-gcc --version" returns 3.4.3, so it's not that old is it ?
Get 3.4.4 if possible (gcc.gnu.org): I think that there is an important bug corrected between 3.4.3 and 3.4.4 and 3.4.4 offers the best size optimization still (better than 4.0.1 at the moment)

This mean I have a slightly old version of avr-gcc it seems (3.4.3
instead of 3.4.4 ?), as well as a slighlty old version of avr-libc,
something like 1.2.3 I think (how to check for sure ?), and some
obsolete packages like avrp and avrprog, and siply no avrdude at all,
which I had to compile from source !
Also get used to fetch and compile the latest binutils, avr-gcc and avr-libc. (you can even write a script that will download and compile everything) Put the compilation result of the three in some well defined place (I use /home/avrdev) so when you move to another computer you know exactly what to bring with you instead of having to look at hundreds of file in /usr/local/something.

Doing so you'll be able to switch between Linux & Windows/WinAVR at anytime.

 Bernard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]