|
RT,
命令提示行make报错:
Program: 152 bytes (0.9% Full)
(.text + .data + .bootloader)
Data: 0 bytes (0.0% Full)
(.data + .bss + .noinit)
Compiling C: main.c
avr-gcc -c -mmcu=atmega16a -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -
funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-a
dhlns=./main.lst -IC:\WinAVR-20071221\avr\include -std=gnu99 -Wundef -MMD -MP -M
F .dep/main.o.d main.c -o main.o
In file included from main.c:1:
c:/winavr-20100110/lib/gcc/../../avr/include/avr/iom16a.h:38:4: error: #error "I
nclude <avr/io.h> instead of this file."
In file included from c:/winavr-20100110/lib/gcc/../../avr/include/avr/io.h:238,
from main.c:2:
c:/winavr-20100110/lib/gcc/../../avr/include/avr/iom16a.h:44:4: error: #error "A
ttempt to include more than one <avr/ioXXX.h> file."
make: *** [main.o] Error 1
E:\avrtest>
makefile按网友们描述的进行操作,源文件路径也作了更改。依然报错,求解求指点……
makefile文件部分内容:
……
……
# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
OBJDIR = .
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c
# List C++ source files here. (C dependencies are automatically generated.)
CPPSRC =
# List Assembler source files here.
# Make them always end in a capital .S. Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC =
# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s
# Debugging format.
# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
# AVR Studio 4.10 requires dwarf-2.
# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
DEBUG = dwarf-2
# List any extra directories to look for include files here.
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS = C:\WinAVR-20071221\avr\include
# Compiler flag to set the C Standard level.
# c89 = "ANSI" C
# gnu89 = c89 plus GCC extensions
# c99 = ISO C99 standard (not yet fully implemented)
# gnu99 = c99 plus GCC extensions
CSTANDARD = -std=gnu99
……
…… |
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|