在iar 编译EW编译环境下如何在整个项目中搜索一个函数或文件?求高人

今天装了一个GCC,编译时少了一个LINK文件.... - 维库电子市场网
今天装了一个GCC,编译时少了一个LINK文件....
作者:xzhenggen 栏目:
今天装了一个GCC,编译时少了一个文件....& &make.exe& all-------- begin --------avr-gcc (GCC) 3.4.1 (C)
Foundation, Inc.T see the source for copying conditions.&&There is NO not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.make.exe: *** No rule to make target `main.o', needed by `main.elf'.&&Stop.&
Exit Code: 2到哪里去找???
作者: 勇敢的心 于
13:16:00 发布:
是否添加了makefile到工程文件夹?&
作者: xzhenggen 于
13:49:00 发布:
添加了makefile到工程文件夹按到HotPower提供的WINAVR环境下,编译及调试具体步骤:出现了上面的问题.
作者: lanmp 于
15:12:00 发布:
这个问题我以前也遇到过应该就是makefile的问题,你看看文件名对不?还有添加c文件之后记得点ok
作者: xzhenggen 于
16:03:00 发布:
文件名,添加c文件没有错啊不知道是makefile的哪里的问题?......
作者: tdh03z 于
19:47:00 发布:
哈,我的也是我今天也是这样,在UltraEdit环境下make后出现一样的提示我的makefile文件是用Mfile程序创建的。后用WINAVR中的例程,好像就好了另外有人知道cof文件怎么生成啊
作者: winsu 于
22:32:00 发布:
cof的生成在帮助中有说的,我做过,但现在记不起了&
作者: hotpower 于
11:12:00 发布:
main file 错误#
format. (can be srec, ihex, binary)FORMAT = ihex# Target file
(without extension).TARGET = avrdemo(模版是main)# List C source files here. (C dependencies are automatically generated.)SRC = $(TARGET).c
作者: xzhenggen 于
11:45:00 发布:
多谢hotpower 指点......GCC确实是一个宝,但我更喜欢IAR EW编译系统.cof文件怎么没有生成?真是着急......
作者: hotpower 于
11:53:00 发布:
应该自动生成cof文件c.Mainfile-&Debug format-&Avr-ext-COFF(AVR Studio...)&&&生成可以在avrstudio中打开进行源码级调试的目标文件&&&C:\WinAvr\examples\\.cof
作者: xzhenggen 于
13:08:00 发布:
再向hotpower请教一下:自动生成cof文件怎么我的就不行呢?我的问题出在哪里......& &make.exe& all-------- begin --------avr-gcc (GCC) 3.4.1 (C)
Foundation, Inc.T see the source for copying conditions.&&There is NO not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Size before:demo.elf&&:section&&&&size&&&&&&addr.text&&&&&&&244&&&&&&&&&0.data&&&&&&&&&0&&&8388704.bss&&&&&&&&&&3&&&8388704.noinit&&&&&&&0&&&8388707.&&&&&&&0&&&8454144.stab&&&&&&&804&&&&&&&&&0.stabstr&&&&&&&&&&&&0Total&&&&&&Size after:demo.elf&&:section&&&&size&&&&&&addr.text&&&&&&&244&&&&&&&&&0.data&&&&&&&&&0&&&8388704.bss&&&&&&&&&&3&&&8388704.noinit&&&&&&&0&&&8388707.&&&&&&&0&&&8454144.stab&&&&&&&804&&&&&&&&&0.stabstr&&&&&&&&&&&&0Total&&&&&&Errors: none-------- end --------&
Exit Code: 0
作者: hotpower 于
18:48:00 发布:
哈哈,骑驴找驴呀...都生成了demo.elf文件,而且无错,那么*.lst,*.hex,*.cof等文件也已在当前项目的目录中...例(rtcdemo.c)& &make.exe& all-------- begin --------avr-gcc (GCC) 3.4.1 (C)
Foundation, Inc.T see the source for copying conditions.&&There is NO not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Size before:rtcdemo.elf&&:section&&&&size&&&&&&addr.text&&&&&&&266&&&&&&&&&0.data&&&&&&&&&0&&&8388704.bss&&&&&&&&&&9&&&8388704.noinit&&&&&&&0&&&8388713.&&&&&&&0&&&8454144.stab&&&&&&&&&&&&&&&0.stabstr&&&&&&&&&&&&0Total&&&&&&Compiling: rtcdemo.cavr-gcc -c -mmcu= -I. -gstabs&&&-Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=rtcdemo.lst&&-std=gnu99 -Wp,-M,-MP,-MT,rtcdemo.o,-MF,.dep/rtcdemo.o.d rtcdemo.c -o rtcdemo.o Linking: rtcdemo.elfavr-gcc -mmcu= -I. -gstabs&&&-Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=rtcdemo.o&&-std=gnu99 -Wp,-M,-MP,-MT,rtcdemo.o,-MF,.dep/rtcdemo.elf.d rtcdemo.o&&&-- rtcdemo.elf -Wl,-Map=rtcdemo.map,--cref&&&&-lmCreating load file for : rtcdemo.hexavr-objcopy -O ihex -R . rtcdemo.elf rtcdemo.hexCreating load file for : rtcdemo.eepavr-objcopy -j . --set-section-flags=.=&alloc,load& \--change-section-lma .=0 -O ihex rtcdemo.elf rtcdemo.eepCreating Extended Listing: rtcdemo.lssavr-objdump -h -S rtcdemo.elf & rtcdemo.lssCreating Symbol Table: rtcdemo.symavr-nm -n rtcdemo.elf & rtcdemo.symConverting to AVR Extended COFF: rtcdemo.cofavr-objcopy --debugging --change-section-address .data-0x800000 --change-section-address .bss-0x800000 --change-section-address .noinit-0x800000 --change-section-address .-0x810000&&-O coff-ext-avr rtcdemo.elf rtcdemo.cofDiscarding local symbol outside any compilation unit: .do_copy_data_startDiscarding local symbol outside any compilation unit: .do_copy_data_loopDiscarding local symbol outside any compilation unit: .do_clear_bss_startDiscarding local symbol outside any compilation unit: .do_clear_bss_loopSize after:rtcdemo.elf&&:section&&&&size&&&&&&addr.text&&&&&&&272&&&&&&&&&0.data&&&&&&&&&0&&&8388704.bss&&&&&&&&&&9&&&8388704.noinit&&&&&&&0&&&8388713.&&&&&&&0&&&8454144.stab&&&&&&&&&&&&&&&0.stabstr&&&&&&&&&&&&0Total&&&&&&Errors: none-------- end --------&
Exit Code: 0
作者: xzhenggen 于
8:52:00 发布:
老大,我真的是没有办法生成COF文件......有lst,hex.....就是没有COF文件......也没有下面这些语句:Compiling: rtcdemo.cavr-gcc -c -mmcu= -I. -gstabs&&&-Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=rtcdemo.lst&&-std=gnu99 -Wp,-M,-MP,-MT,rtcdemo.o,-MF,.dep/rtcdemo.o.d rtcdemo.c -o rtcdemo.o Linking: rtcdemo.elfavr-gcc -mmcu= -I. -gstabs&&&-Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=rtcdemo.o&&-std=gnu99 -Wp,-M,-MP,-MT,rtcdemo.o,-MF,.dep/rtcdemo.elf.d rtcdemo.o&&&-- rtcdemo.elf -Wl,-Map=rtcdemo.map,--cref&&&&-lmCreating load file for : rtcdemo.hexavr-objcopy -O ihex -R . rtcdemo.elf rtcdemo.hexCreating load file for : rtcdemo.eepavr-objcopy -j . --set-section-flags=.=&alloc,load& \--change-section-lma .=0 -O ihex rtcdemo.elf rtcdemo.eepCreating Extended Listing: rtcdemo.lssavr-objdump -h -S rtcdemo.elf & rtcdemo.lssCreating Symbol Table: rtcdemo.symavr-nm -n rtcdemo.elf & rtcdemo.symConverting to AVR Extended COFF: rtcdemo.cofavr-objcopy --debugging --change-section-address .data-0x800000 --change-section-address .bss-0x800000 --change-section-address .noinit-0x800000 --change-section-address .-0x810000&&-O coff-ext-avr rtcdemo.elf rtcdemo.cofDiscarding local symbol outside any compilation unit: .do_copy_data_startDiscarding local symbol outside any compilation unit: .do_copy_data_loopDiscarding local symbol outside any compilation unit: .do_clear_bss_startDiscarding local symbol outside any compilation unit: .do_clear_bss_loop
作者: hotpower 于
9:03:00 发布:
搞不明白,先给你个makefile(,rtcdemo.c)# Hey Emacs, this is a -*- makefile -*-## WinAVR
makefile written by Eric B. Weddington, Jrg Wunsch, et al.# Released to the Public Domain# Please read the make user manual!## Additional material for this makefile was submitted by:#&&Tim Henigan#&&Peter Fleury#&&Reiner Patommel#&&Sander Pool#&&Frederik Rouleau#&&Markus Pfaff## On command :## make all = Make .## make clean = Clean out built project files.## make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).## make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio#&&&&&&&&&&&&&&&&4.07 or greater).## make program = Download the hex file to the , using avrdude.&&Please#&&&&&&&&&&&&&&&&customize the avrdude settings below first!## make file.s = Just compile file.c into the assembler code ## To rebuild project do &make clean& then &make all&.## MCU MCU = #
format. (can be srec, ihex, binary)FORMAT = ihex# Target file
(without extension).TARGET = rtcdemo# List C source files here. (C dependencies are automatically generated.)SRC = $(TARGET).c# 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#
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 files, and gcc itself does# care about how the
is spelled on its command-.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 stabs [default], or dwarf-2.# AVR (extended) COFF requires stabs, plus an avr-objcopy run.DEBUG = stabs# List any extra directories to look for include files here.#&&&&&Each directory must be seperated by a space.EXTRAINCDIRS = # Compiler flag to set the C
level.# c89&&&- &ANSI& C# gnu89 - c89 plus GCC extensions# c99&&&- ISO C99
(not yet fully implemented)# gnu99 - c99 plus GCC extensionsCSTANDARD = -std=gnu99# Place -D or -U options hereCDEFS =# Place -I options hereCINCS =# Compiler flags.#&&-g*:&&&&&&&&&&generate debugging information#&&-O*:&&&&&&&&&&optimization level#&&-f...:&&&&&&&&tuning, see GCC manual and avr-libc documentation#&&-Wall...:&&&&&warning level#&&-Wa,...:&&&&&&tell GCC to pass this to the assembler.#&&&&-adhlns...: create assembler listingCFLAGS = -g$(DEBUG)CFLAGS += $(CDEFS) $(CINCS)CFLAGS += -O$(OPT)CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enumsCFLAGS += -Wall -Wstrict-prototypesCFLAGS += -Wa,-adhlns=$(&:.c=.lst)CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))CFLAGS += $(CSTANDARD)# Assembler flags.#&&-Wa,...:&&&tell GCC to pass this to the assembler.#&&-ahlms:&&&&create listing#&&-gstabs:&&&have the assembler
note that#&&&&&&&&&&&&&for use in COFF files, additional information about files#&&&&&&&&&&&&&and function s needs to be present in the assembler source#&&&&&&&&&&&&&files -- see avr-libc docs [FIXME: not yet described there]ASFLAGS = -Wa,-adhlns=$(&:.S=.lst),-gstabs #Additional libraries.# Minimalistic printf versionPRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min# Floating point printf version (requires MATH_LIB = -lm below)PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_fltPRINTF_LIB = # Minimalistic scanf versionSCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min# Floating point + %[ scanf version (requires MATH_LIB = -lm below)SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_fltSCANF_LIB = MATH_LIB = -lm# External
options# 64 KB of external RAM, starting after internal RAM (!),# used for variables (.data/.bss) and heap (malloc()).#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff# 64 KB of external RAM, starting after internal RAM (!),#
used for heap (malloc()).#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffffEXTMEMOPTS =# Linker flags.#&&-Wl,...:&&&&&tell GCC to pass this to linker.#&&&&-Map:&&&&&&create map file#&&&&--cref:&&&&add cross reference to&&map fileLDFLAGS = -Wl,-Map=$(TARGET).map,--crefLDFLAGS += $(EXTMEMOPTS)LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)#
using avrdude. Settings and variables.#
: alf avr910
bascom bsd # dt006 pavr picoweb pony-stk200
stk200 ## Type: avrdude -c ?# to get a full listing.#AVRDUDE_PROGRAMMER = # com1 = serial port. Use lpt1 to connect to parallel port.AVRDUDE_PORT = com1&&&&# programmer connected to serial AVRDUDE_WRITE_FLASH = -U :w:$(TARGET).hex#AVRDUDE_WRITE_EEPROM = -U :w:$(TARGET).eep# Uncomment the following if you want avrdude's erase cycle counter.# Note that this counter needs to be initialized first using -Yn,# see avrdude manual.#AVRDUDE_ERASE_COUNTER = -y# Uncomment the following if you do /not/ wish a verification to be# performed after
the .#AVRDUDE_NO_VERIFY = -V# Increase verbosity level.&&Please use this when submitting bug# reports about avrdude. See &http://savannah.nongnu.org/projects/avrdude& # to submit bug reports.#AVRDUDE_VERBOSE = -v -vAVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)# ---------------------------------------------------------------------------# Define directories, if needed.DIRAVR = c:/winavrDIRAVRBIN = $(DIRAVR)/binDIRAVRUTILS = $(DIRAVR)/utils/binDIRINC = .DIRLIB = $(DIRAVR)/avr/lib# Define programs and commands.SHELL = shCC = avr-gccOBJCOPY = avr-objcopyOBJDUMP = avr-objdumpSIZE = avr-sizeNM = avr-nmAVRDUDE = avrdudeREMOVE = rm -fCOPY = cp# Define Messages# EnglishMSG_ERRORS_NONE = Errors: noneMSG_BEGIN = -------- begin --------MSG_END = --------&&en
作者: tdh03z 于
9:49:00 发布:
说说自己的方法晕,敲了老半天,突然全没了简单说一下自已生成cof文件的过程1、先参考ouravr网站上的GCC教程,生成*.o和*.elf两个文件2、利用mfile程序生成cof文件,要注意的是在mfile程序中文件名应与*.o文件名设置成一样,输出格式中选COFF,其实可以参考GCC的教程(不过教程中并没有说明用mfile之前必须要生成*.o和*.elf两个文件)设置好后,另存到工程文件夹中即可。我花了2天的时间才搞定的,也不知对不对,有没有更好的方法不过有个问题就是,在Studio4.09中调用cof文件后,是汇编程序,并不是c,这样调试起来不是很讨厌吗??用ICC AVR 生成的cof文件在调用后还是C格式,非常方便调试
作者: xzhenggen 于
10:15:00 发布:
实在搞不懂......COPY你上面的makefile出现下面情况:& &make.exe& allmakefile:275: *** missing separator.&&Stop.&
Exit Code: 2
作者: tdh03z 于
10:38:00 发布:
源文件位置# List C source files here. (C dependencies are automatically generated.)SRC = $(TARGET).c&&这个地方应该加上你的源文件位置,记不清楚了好像是直接加在后面。
作者: hotpower 于
11:04:00 发布:
难道是我运气好???这是从反汇编窗口里拷贝的...78:&&&&&&&&&reset();+:&&&91E00060&&&&LDS&&&&&R30,0x0060&&&&&&&Load direct from data space+:&&&91F00061&&&&LDS&&&&&R31,0x0061&&&&&&&Load direct from data space+:&&&9509&&&&&&&&ICALL&&&&&&&&&&&&&&&&&&&&Indirect call to (Z)80:&&&&&&&&&&&_NOP();+:&&&0000&&&&&&&&NOP&&&&&&&&&&&&&&&&&&&&&&No operation79:&&&&&&&&&for(;;) {+0000007A:&&&CFFE&&&&&&&&RJMP&&&&PC-0x0001&&&&&&&&Relative jump@0000007B: __vector_486:&&&&&&&SIGNAL(SIG_OVERFLOW2)87:&&&&&&&{+0000007B:&&&921F&&&&&&&&&&&&R1&&&&&&&&&&&&&&& register on stack+0000007C:&&&&&&&&&&&&&&&R0&&&&&&&&&&&&&&& register on stack+0000007D:&&&B60F&&&&&&&&IN&&&&&&R0,0x3F&&&&&&&&&&In from I/O location+0000007E:&&&&&&&&&&&&&&&R0&&&&&&&&&&&&&&& register on stack+0000007F:&&&&&&&&&&&CLR&&&&&R1&&&&&&&&&&&&&&&Clear Register+:&&&938F&&&&&&&&&&&&R24&&&&&&&&&&&&&& register on stack88:&&&&&&&&&TCNT2 = 0xf8;//+:&&&EF88&&&&&&&&LDI&&&&&R24,0xF8&&&&&&&&&Load immediate+:&&&BD84&&&&&&&&OUT&&&&&0x24,R24&&&&&&&&&Out to I/O location89:&&&&&&&&&if (SysDataTime.Sec & 59) SysDataTime.Sec ++;+:&&&9180006B&&&&LDS&&&&&R24,0x006B&&&&&&&Load direct from data space+:&&&338B&&&&&&&&CPI&&&&&R24,0x3B&&&&&&&&&Compare with immediate+:&&&&&&&&&&&BRCC&&&&PC+0x05&&&&&&&&&&Branch if carry cleared89:&&&&&&&&&if (SysDataTime.Sec & 59) SysDataTime.Sec ++;+:&&&5F8F&&&&&&&&SUBI&&&&R24,0xFF&&&&&&&&&Subtract immediate+:&&&9380006B&&&&STS&&&&&0x006B,R24&&&&&&&Store direct to data space+0000008A:&&&&&&&&&&&RJMP&&&&PC+0x0018&&&&&&&&Relative jump91:&&&&&&&&&&&SysDataTime.Sec = 0;+0000008B:&&&9210006B&&&&STS&&&&&0x006B,R1&&&&&&&&Store direct to data space92:&&&&&&&&&&&if (SysDataTime.Min & 59) SysDataTime.Min ++;+0000008D:&&&9180006A&&&&LDS&&&&&R24,0x006A&&&&&&&Load direct from data space+0000008F:&&&338B&&&&&&&&CPI&&&&&R24,0x3B&&&&&&&&&Compare with immediate+:&&&&&&&&&&&BRCC&&&&PC+0x05&&&&&&&&&&Branch if carry cleared+:&&&5F8F&&&&&&&&SUBI&&&&R24,0xFF&&&&&&&&&Subtract immediate+:&&&9380006A&&&&STS&&&&&0x006A,R24&&&&&&&Store direct to data space+:&&&C00C&&&&&&&&RJMP&&&&PC+0x000D&&&&&&&&Relative jump94:&&&&&&&&&&&&&SysDataTime.Min = 0;+:&&&9210006A&&&&STS&&&&&0x006A,R1&&&&&&&&Store direct to data space95:&&&&&&&&&&&&&if (SysDataTime.Hours & 23) SysDataTime.Hours ++; +:&&&&&&&LDS&&&&&R24,0x0069&&&&&&&Load direct from data space+:&&&3187&&&&&&&&CPI&&&&&R24,0x17&&&&&&&&&Compare with immediate+0000009A:&&&&&&&&&&&BRCC&&&&PC+0x05&&&&&&&&&&Branch if carry cleared+0000009B:&&&5F8F&&&&&&&&SUBI&&&&R24,0xFF&&&&&&&&&Subtract immediate+0000009C:&&&&&&&STS&&&&&0x0069,R24&&&&&&&Store direct to data space+0000009E:&&&C002&&&&&&&&RJMP&&&&PC+0x0003&&&&&&&&Relative jump97:&&&&&&&&&&&&&&&SysDataTime.Hours = 0;+0000009F:&&&&&&&STS&&&&&0x0069,R1&&&&&&&&Store direct to data space100:&&&&&&&&&&wdt_re
作者: tdh03z 于
11:43:00 发布:
这是从那拷贝下来的不是吧,这是你从那里拷贝下来的,不会是从Studio中调用cof文件后在程序窗口中看到的吧
作者: xzhenggen 于
12:39:00 发布:
看样子,我要改行了.......按照你们提供的方法,试了又试.就是不出来COF文件.......真是气孔人!!!!!!!!!!!!!!!!!!!
作者: hotpower 于
12:50:00 发布:
帖出C邮个M把C给我(保密的不要)...还你个makefile+cof...真累呀...
作者: xzhenggen 于
13:27:00 发布:
多谢!hotpower......删除WINAVR,重装一次还是不行,生成不了COF文件.我的makefile内容如下:# Hey Emacs, this is a -*- makefile -*-## WinAVR
makefile written by Eric B. Weddington, Jrg Wunsch, et al.# Released to the Public Domain# Please read the make user manual!## Additional material for this makefile was submitted by:#&&Tim Henigan#&&Peter Fleury#&&Reiner Patommel#&&Sander Pool#&&Frederik Rouleau#&&Markus Pfaff## On command :## make all = Make .## make clean = Clean out built project files.## make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).## make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio#&&&&&&&&&&&&&&&&4.07 or greater).## make program = Download the hex file to the , using avrdude.&&Please#&&&&&&&&&&&&&&&&customize the avrdude settings below first!## make file.s = Just compile file.c into the assembler code ## To rebuild project do &make clean& then &make all&.## MCU MCU = #
format. (can be srec, ihex, binary)FORMAT = ihex# Target file
(without extension).TARGET = # List C source files here. (C dependencies are automatically generated.)SRC = $(TARGET).c# 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#
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 files, and gcc itself does# care about how the
is spelled on its command-.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 stabs [default], or dwarf-2.# AVR (extended) COFF requires stabs, plus an avr-objcopy run.DEBUG = stabs# List any extra directories to look for include files here.#&&&&&Each directory must be seperated by a space.EXTRAINCDIRS = # Compiler flag to set the C
level.# c89&&&- &ANSI& C# gnu89 - c89 plus GCC extensions# c99&&&- ISO C99
(not yet fully implemented)# gnu99 - c99 plus GCC extensionsCSTANDARD = -std=gnu99# Place -D or -U options hereCDEFS =# Place -I options hereCINCS =# Compiler flags.#&&-g*:&&&&&&&&&&generate debugging information#&&-O*:&&&&&&&&&&optimization level#&&-f...:&&&&&&&&tuning, see GCC manual and avr-libc documentation#&&-Wall...:&&&&&warning level#&&-Wa,...:&&&&&&tell GCC to pass this to the assembler.#&&&&-adhlns...: create assembler listingCFLAGS = -g$(DEBUG)CFLAGS += $(CDEFS) $(CINCS)CFLAGS += -O$(OPT)CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enumsCFLAGS += -Wall -Wstrict-prototypesCFLAGS += -Wa,-adhlns=$(&:.c=.lst)CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))CFLAGS += $(CSTANDARD)# Assembler flags.#&&-Wa,...:&&&tell GCC to pass this to the assembler.#&&-ahlms:&&&&create listing#&&-gstabs:&&&have the assembler
note that#&&&&&&&&&&&&&for use in COFF files, additional information about files#&&&&&&&&&&&&&and function s needs to be present in the assembler source#&&&&&&&&&&&&&files -- see avr-libc docs [FIXME: not yet described there]ASFLAGS = -Wa,-adhlns=$(&:.S=.lst),-gstabs #Additional libraries.# Minimalistic printf versionPRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min# Floating point printf version (requires MATH_LIB = -lm below)PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_fltPRINTF_LIB = # Minimalistic scanf versionSCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min# Floating point + %[ scanf version (requires MATH_LIB = -lm below)SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_fltSCANF_LIB = MATH_LIB = -lm# External
options# 64 KB of external RAM, starting after internal RAM (!),# used for variables (.data/.bss) and heap (malloc()).#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff# 64 KB of external RAM, starting after internal RAM (!),#
used for heap (malloc()).#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffffEXTMEMOPTS =# Linker flags.#&&-Wl,...:&&&&&tell GCC to pass this to linker.#&&&&-Map:&&&&&&create map file#&&&&--cref:&&&&add cross reference to&&map fileLDFLAGS = -Wl,-Map=$(TARGET).map,--crefLDFLAGS += $(EXTMEMOPTS)LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)#
using avrdude. Settings and variables.#
: alf avr910
bascom bsd # dt006 pavr picoweb pony-stk200
stk200 ## Type: avrdude -c ?# to get a full listing.#AVRDUDE_PROGRAMMER = # com1 = serial port. Use lpt1 to connect to parallel port.AVRDUDE_PORT = com1&&&&# programmer connected to serial AVRDUDE_WRITE_FLASH = -U :w:$(TARGET).hex#AVRDUDE_WRITE_EEPROM = -U :w:$(TARGET).eep# Uncomment the following if you want avrdude's erase cycle counter.# Note that this counter needs to be initialized first using -Yn,# see avrdude manual.#AVRDUDE_ERASE_COUNTER = -y# Uncomment the following if you do /not/ wish a verification to be# performed after
the .#AVRDUDE_NO_VERIFY = -V# Increase verbosity level.&&Please use this when submitting bug# reports about avrdude. See &http://savannah.nongnu.org/projects/avrdude& # to submit bug reports.#AVRDUDE_VERBOSE = -v -vAVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)# ---------------------------------------------------------------------------# Define directories, if needed.DIRAVR = c:/winavrDIRAVRBIN = $(DIRAVR)/binDIRAVRUTILS = $(DIRAVR)/utils/binDIRINC = .DIRLIB = $(DIRAVR)/avr/lib# Define programs and commands.SHELL = shCC = avr-gccOBJCOPY = avr-objcopyOBJDUMP = avr-objdumpSIZE = avr-sizeNM = avr-nmAVRDUDE = avrdudeREMOVE = rm -fCOPY = cp# Define Messages# EnglishMSG_ERRORS_NONE = Errors: noneMSG_BEGIN = -------- beg
作者: tzgxf 于
13:35:00 发布:
tdh03z 你从Studio中打开的文件选错了&
作者: tdh03z 于
14:31:00 发布:
错了吗tzgxf你好,是文件选错了吗,那晚上要好好看看难道调试文件不是cof文件吗??能告诉是那个后缀名的文件吗
作者: xzhenggen 于
17:36:00 发布:
在此再一次感谢hotpower, 多谢hotpower提供WINAVR01.PDF文档.手工设置在MAKEFILE里面有问题.用MFILE软件生成MAKEFILE在MFILE软件里面选DEBUG FORMAT------&AVR-COFF(AVR STUDIO 3.X ,VMLAB&3.10)OK!!!!
讨论内容:
Copyright &
浙ICP证030469号

我要回帖

更多关于 iar不能编译 的文章

 

随机推荐