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

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

Re: [avr-gcc-list]


From: E. Weddington
Subject: Re: [avr-gcc-list]
Date: Tue, 09 Nov 2004 09:37:51 -0700
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

李奇越 wrote:

>hi all:
>       I'm a beginner of winavr,and not familar with makefile.When I
>try to build a new project and using avr-gcc to compiler the program,
>the error messages are as follows:
>/usr/local/avr/include/avr/io.h:225:6:warning:#warning "device type not 
>defined"
>/usr/local/avr/include/avr/interrupt.h:112:3:#error "No valid external 
>interrupt
>control register defined"
>......
>......
>
>Do I need to include some header files in my program?
>And can somebody mail me a sample project?
>Thanks
>
>
>  
>

You need to use the sample Makefile template that comes with WinAVR.
Look in the <install>\sample subdirectory. Also, instead you might want
to use the MFile utility that comes with WinAVR. MFile can be used to
generate a Makefile for your project based on some simple input that you
give. The Makefile template that it uses is also the same template that
is included with WinAVR.

FYI: The warning message you are getting is becuase you do not have the
-mmcu=<device> flag in your compiler flags. Using MFile, or the WinAVR
Makefile template, will help you avoid these simple errors.

Eric


reply via email to

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