avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Next version of winavr!!!


From: Dave Hansen
Subject: Re: [avr-gcc-list] Next version of winavr!!!
Date: Fri, 22 Aug 2003 09:49:18 -0400

From: Andreas Schwarz <address@hidden>
[...]

"Steven Chang-Lin Yu" <address@hidden> wrote:
[...]
> Just some suggestion, for the next version:

> 3. A GUI or text based makefile generator (I am writing one for
> myself, if it is finish I will send to the mailing list)

3a. Throw away Volker Oth's makefile, replace it by a SIMPLE example
and/or a makefile generator.

Ummm.

I'm fairly new to the avr-gcc world, though I've been programming embedded systems for over 15 years. I first downloaded WinAVR a few months ago, and was able to get everything running (i.e., an application I was porting to WinAVR) within a day or so.

If "Volker Oth's makefile" is the Makefile supplied with WinAVR, it would be a great disservice to the user community to replace it with a "SIMPLE" example. I, for one, found it very clear and easy to understand and use.

I have since (for my own use) created my own make files based on a "core" derived from the WinAVR makefile (used on all projects), which includes a project-specific makefile called "Project.mak," an example of which is shown below:

--- begin included file Project.mak ---
# Project.mak
# Project specific definitions for building software with avr-gcc
#

# Target file name (without extension).
#
TARGET      =   PDC

# C and assembly source files (C dependencies are automatically generated.)
#
CSRC        =   main.c      \
               io.c        \
               window.c    \
               pinch.c     \
               timer.c     \
               uart.c      \
               eeprom.c

ASRC        =

# Specify the target processor and clock speed.
# Examples: atmega32, attiny26, at90s8535.
# See /WinAVR/doc/avr-libc/avr-libc-user-manual/using_tools.html
#
MCU         =   atmega32
HZ          =   12000000

# Define project-specific compilation-control symbols
#
APPDEFS     =   -D DBUG=1 -D HIGH_CAP=0
--- end included file Project.mak ---

This is not difficult stuff. Munging makefiles is an important skill generally applicable to all fields of programming. The documentation and the example is clear. If you can't figure it out, perhaps you're in the wrong business. Hand-holding IDE's are for wimps. Real programmers don't eat quiche. ;-)

Granted, make is somewhat baroque, but it's not broke. Time spent learning make will not be wasted. A gentle tutorial is available in book form from O'Reilly (Managing Projects with Make, currently in stock at a cost of US$12.50 from bookpool.com, though it doesn't cover the latest version of gmake) if the documentation included with WinAVR doesn't float your boat.

SCons (www.scons.org) looks really interesting, but I haven't had the time to try it out. My impression is that it is better suited to large complex projects than is make, but most of my stuff with the AVR is pretty simple.

Regards,
  -=Dave

_________________________________________________________________
Help protect your PC: Get a free online virus scan at McAfee.com. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



reply via email to

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