<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/9763" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2015-04-15T10:20:49+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/9763</id>

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2015-04-15T10:20:49+02:00</updated>

		<published>2015-04-15T10:20:49+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29530#p29530</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29530#p29530"/>
		<title type="html"><![CDATA[Re: error undefined reference to `usbPoll' and'usbInit']]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29530#p29530"><![CDATA[
Hello Today!<br />I am running to do your advice today ,I hope it will be better.<p>Statistics: Posted by Guest — Wed Apr 15, 2015 10:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blargg]]></name></author>
		<updated>2015-04-15T04:14:01+02:00</updated>

		<published>2015-04-15T04:14:01+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29528#p29528</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29528#p29528"/>
		<title type="html"><![CDATA[Re: error undefined reference to `usbPoll' and'usbInit']]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29528#p29528"><![CDATA[
Get one of the basic vusb examples to see what all its makefile compiles in. You need at least usbdrv/usbdrv.c and usbdrv/usbdrvasm.S, as you're getting linker errors due to not linking these in.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=20076">blargg</a> — Wed Apr 15, 2015 4:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2015-04-14T21:43:01+02:00</updated>

		<published>2015-04-14T21:43:01+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29527#p29527</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29527#p29527"/>
		<title type="html"><![CDATA[error undefined reference to `usbPoll' and'usbInit']]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=9763&amp;p=29527#p29527"><![CDATA[
Hello everybody<br /><br />I after almost three hours search in internet and reading a lot little discription about above error now is confused completely and ask god to show me the right way.<br />this is my fully program i copy paste from codeandlife.com tutorial and try to use on atmega8a:<br /><br />#include &lt;avr/io.h&gt;<br />#include &lt;avr/interrupt.h&gt;<br />#include &lt;avr/wdt.h&gt;<br />#include &lt;util/delay.h&gt;<br />#include &quot;usbdrv.h&quot;<br /><br />USB_PUBLIC uchar usbFunctionSetup(uchar data[8]) {<br />        return 0; // do nothing for now<br />}<br /><br />int main() {<br /><br />    uchar i;<br /><br />    wdt_enable(WDTO_1S); // enable 1s watchdog timer<br /><br />    usbInit();<br />        <br />    usbDeviceDisconnect(); // enforce re-enumeration<br />    for(i = 0; i&lt;250; i++) { // wait 500 ms<br />        wdt_reset(); // keep the watchdog happy<br />        _delay_ms(2);<br />    }<br />    usbDeviceConnect();<br />        <br />    sei(); // Enable interrupts after re-enumeration<br />        <br />    while(1) {<br />        wdt_reset(); // keep the watchdog happy<br />     usbPoll();<br />    }<br />        <br />    return 0;<br />}<br /><br />and also this is my make file:<br /><div class="codebox"><p>Code: </p><pre><code># Hey Emacs, this is a -*- makefile -*-<br />#----------------------------------------------------------------------------<br /># WinAVR Makefile Template written by Eric B. Weddington, Jِrg Wunsch, et al.<br />#<br /># Released to the Public Domain<br />#<br /># Additional material for this makefile was written by:<br /># Peter Fleury<br /># Tim Henigan<br /># Colin O'Flynn<br /># Reiner Patommel<br /># Markus Pfaff<br /># Sander Pool<br /># Frederik Rouleau<br /># Carlos Lamas<br />#<br />#----------------------------------------------------------------------------<br /># On command line:<br />#<br /># make all = Make software.<br />#<br /># make clean = Clean out built project files.<br />#<br /># make coff = Convert ELF to AVR COFF.<br />#<br /># make extcoff = Convert ELF to AVR Extended COFF.<br />#<br /># make program = Download the hex file to the device, using avrdude.<br />#                Please customize the avrdude settings below first!<br />#<br /># make debug = Start either simulavr or avarice as specified for debugging, <br />#              with avr-gdb or avr-insight as the front end for debugging.<br />#<br /># make filename.s = Just compile filename.c into the assembler code only.<br />#<br /># make filename.i = Create a preprocessed source file for use in submitting<br />#                   bug reports to the GCC project.<br />#<br /># To rebuild project do &quot;make clean&quot; then &quot;make all&quot;.<br />#----------------------------------------------------------------------------<br /><br /><br /># MCU name<br />MCU = atmega8<br /><br /><br /># Processor frequency.<br />#     This will define a symbol, F_CPU, in all source code files equal to the <br />#     processor frequency. You can then use this symbol in your source code to <br />#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done<br />#     automatically to create a 32-bit value in your source code.<br />#     Typical values are:<br />#         F_CPU =  1000000<br />#         F_CPU =  1843200<br />#         F_CPU =  2000000<br />#         F_CPU =  3686400<br />#         F_CPU =  4000000<br />#         F_CPU =  7372800<br />#         F_CPU =  8000000<br />#         F_CPU = 11059200<br />#         F_CPU = 14745600<br />#         F_CPU = 16000000<br />#         F_CPU = 18432000<br />#         F_CPU = 20000000<br />F_CPU = 8000000<br /><br /><br /># Output format. (can be srec, ihex, binary)<br />FORMAT = ihex<br /><br /><br /># Target file name (without extension).<br />TARGET = main<br /><br /><br /># Object files directory<br />#     To put object files in current directory, use a dot (.), do NOT make<br />#     this an empty or blank macro!<br />OBJDIR = .<br /><br /><br /># List C source files here. (C dependencies are automatically generated.)<br />SRC = $(TARGET).c  <br /><br /><br /># List C++ source files here. (C dependencies are automatically generated.)<br />CPPSRC = <br /><br /><br /># List Assembler source files here.<br />#     Make them always end in a capital .S.  Files ending in a lowercase .s<br />#     will not be considered source files but generated files (assembler<br />#     output from the compiler), and will be deleted upon &quot;make clean&quot;!<br />#     Even though the DOS/Win* filesystem matches both .s and .S the same,<br />#     it will preserve the spelling of the filenames, and gcc itself does<br />#     care about how the name is spelled on its command-line.<br />ASRC =<br /><br /><br /># Optimization level, can be &#91;0, 1, 2, 3, s&#93;. <br />#     0 = turn off optimization. s = optimize for size.<br />#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)<br />OPT = s<br /><br /><br /># Debugging format.<br />#     Native formats for AVR-GCC's -g are dwarf-2 &#91;default&#93; or stabs.<br />#     AVR Studio 4.10 requires dwarf-2.<br />#     AVR &#91;Extended&#93; COFF format requires stabs, plus an avr-objcopy run.<br />DEBUG = dwarf-2<br /><br /><br /># List any extra directories to look for include files here.<br />#     Each directory must be seperated by a space.<br />#     Use forward slashes for directory separators.<br />#     For a directory that has spaces, enclose it in quotes.<br />EXTRAINCDIRS = <br /><br /><br /># Compiler flag to set the C Standard level.<br />#     c89   = &quot;ANSI&quot; C<br />#     gnu89 = c89 plus GCC extensions<br />#     c99   = ISO C99 standard (not yet fully implemented)<br />#     gnu99 = c99 plus GCC extensions<br />CSTANDARD = -std=gnu99<br /><br /><br /># Place -D or -U options here for C sources<br />CDEFS = -DF_CPU=$(F_CPU)UL<br /><br /><br /># Place -D or -U options here for ASM sources<br />ADEFS = -DF_CPU=$(F_CPU)<br /><br /><br /># Place -D or -U options here for C++ sources<br />CPPDEFS = -DF_CPU=$(F_CPU)UL<br />#CPPDEFS += -D__STDC_LIMIT_MACROS<br />#CPPDEFS += -D__STDC_CONSTANT_MACROS<br /><br /><br /><br />#---------------- Compiler Options C ----------------<br />#  -g*:          generate debugging information<br />#  -O*:          optimization level<br />#  -f...:        tuning, see GCC manual and avr-libc documentation<br />#  -Wall...:     warning level<br />#  -Wa,...:      tell GCC to pass this to the assembler.<br />#    -adhlns...: create assembler listing<br />CFLAGS = -g$(DEBUG)<br />CFLAGS += $(CDEFS)<br />CFLAGS += -O$(OPT)<br />CFLAGS += -funsigned-char<br />CFLAGS += -funsigned-bitfields<br />CFLAGS += -fpack-struct<br />CFLAGS += -fshort-enums<br />CFLAGS += -Wall<br />CFLAGS += -Wstrict-prototypes<br />#CFLAGS += -mshort-calls<br />#CFLAGS += -fno-unit-at-a-time<br />#CFLAGS += -Wundef<br />#CFLAGS += -Wunreachable-code<br />#CFLAGS += -Wsign-compare<br />CFLAGS += -Wa,-adhlns=$(&lt;:%.c=$(OBJDIR)/%.lst)<br />CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))<br />CFLAGS += $(CSTANDARD)<br /><br /><br />#---------------- Compiler Options C++ ----------------<br />#  -g*:          generate debugging information<br />#  -O*:          optimization level<br />#  -f...:        tuning, see GCC manual and avr-libc documentation<br />#  -Wall...:     warning level<br />#  -Wa,...:      tell GCC to pass this to the assembler.<br />#    -adhlns...: create assembler listing<br />CPPFLAGS = -g$(DEBUG)<br />CPPFLAGS += $(CPPDEFS)<br />CPPFLAGS += -O$(OPT)<br />CPPFLAGS += -funsigned-char<br />CPPFLAGS += -funsigned-bitfields<br />CPPFLAGS += -fpack-struct<br />CPPFLAGS += -fshort-enums<br />CPPFLAGS += -fno-exceptions<br />CPPFLAGS += -Wall<br />CPPFLAGS += -Wundef<br />#CPPFLAGS += -mshort-calls<br />#CPPFLAGS += -fno-unit-at-a-time<br />#CPPFLAGS += -Wstrict-prototypes<br />#CPPFLAGS += -Wunreachable-code<br />#CPPFLAGS += -Wsign-compare<br />CPPFLAGS += -Wa,-adhlns=$(&lt;:%.cpp=$(OBJDIR)/%.lst)<br />CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))<br />#CPPFLAGS += $(CSTANDARD)<br /><br /><br />#---------------- Assembler Options ----------------<br />#  -Wa,...:   tell GCC to pass this to the assembler.<br />#  -adhlns:   create listing<br />#  -gstabs:   have the assembler create line number information; note that<br />#             for use in COFF files, additional information about filenames<br />#             and function names needs to be present in the assembler source<br />#             files -- see avr-libc docs &#91;FIXME: not yet described there&#93;<br />#  -listing-cont-lines: Sets the maximum number of continuation lines of hex <br />#       dump that will be displayed for a given single line of source input.<br />ASFLAGS = $(ADEFS) -Wa,-adhlns=$(&lt;:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100<br /><br /><br />#---------------- Library Options ----------------<br /># Minimalistic printf version<br />PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min<br /><br /># Floating point printf version (requires MATH_LIB = -lm below)<br />PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt<br /><br /># If this is left blank, then it will use the Standard printf version.<br />PRINTF_LIB = <br />#PRINTF_LIB = $(PRINTF_LIB_MIN)<br />#PRINTF_LIB = $(PRINTF_LIB_FLOAT)<br /><br /><br /># Minimalistic scanf version<br />SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min<br /><br /># Floating point + %&#91; scanf version (requires MATH_LIB = -lm below)<br />SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt<br /><br /># If this is left blank, then it will use the Standard scanf version.<br />SCANF_LIB = <br />#SCANF_LIB = $(SCANF_LIB_MIN)<br />#SCANF_LIB = $(SCANF_LIB_FLOAT)<br /><br /><br />MATH_LIB = -lm<br /><br /><br /># List any extra directories to look for libraries here.<br />#     Each directory must be seperated by a space.<br />#     Use forward slashes for directory separators.<br />#     For a directory that has spaces, enclose it in quotes.<br />EXTRALIBDIRS = <br /><br /><br /><br />#---------------- External Memory Options ----------------<br /><br /># 64 KB of external RAM, starting after internal RAM (ATmega128!),<br /># used for variables (.data/.bss) and heap (malloc()).<br />#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff<br /><br /># 64 KB of external RAM, starting after internal RAM (ATmega128!),<br /># only used for heap (malloc()).<br />#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff<br /><br />EXTMEMOPTS =<br /><br /><br /><br />#---------------- Linker Options ----------------<br />#  -Wl,...:     tell GCC to pass this to linker.<br />#    -Map:      create map file<br />#    --cref:    add cross reference to  map file<br />LDFLAGS = -Wl,-Map=$(TARGET).map,--cref<br />LDFLAGS += $(EXTMEMOPTS)<br />LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))<br />LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)<br />#LDFLAGS += -T linker_script.x<br /><br /><br /><br />#---------------- Programming Options (avrdude) ----------------<br /><br /># Programming hardware<br /># Type: avrdude -c ?<br /># to get a full listing.<br />#<br />AVRDUDE_PROGRAMMER = stk500v2<br /><br /># com1 = serial port. Use lpt1 to connect to parallel port.<br />AVRDUDE_PORT = com1    # programmer connected to serial device<br /><br />AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex<br />#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep<br /><br /><br /># Uncomment the following if you want avrdude's erase cycle counter.<br /># Note that this counter needs to be initialized first using -Yn,<br /># see avrdude manual.<br />#AVRDUDE_ERASE_COUNTER = -y<br /><br /># Uncomment the following if you do /not/ wish a verification to be<br /># performed after programming the device.<br />#AVRDUDE_NO_VERIFY = -V<br /><br /># Increase verbosity level.  Please use this when submitting bug<br /># reports about avrdude. See &lt;http://savannah.nongnu.org/projects/avrdude&gt; <br /># to submit bug reports.<br />#AVRDUDE_VERBOSE = -v -v<br /><br />AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)<br />AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)<br />AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)<br />AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)<br /><br /><br /><br />#---------------- Debugging Options ----------------<br /><br /># For simulavr only - target MCU frequency.<br />DEBUG_MFREQ = $(F_CPU)<br /><br /># Set the DEBUG_UI to either gdb or insight.<br /># DEBUG_UI = gdb<br />DEBUG_UI = insight<br /><br /># Set the debugging back-end to either avarice, simulavr.<br />DEBUG_BACKEND = avarice<br />#DEBUG_BACKEND = simulavr<br /><br /># GDB Init Filename.<br />GDBINIT_FILE = __avr_gdbinit<br /><br /># When using avarice settings for the JTAG<br />JTAG_DEV = /dev/com1<br /><br /># Debugging port used to communicate between GDB / avarice / simulavr.<br />DEBUG_PORT = 4242<br /><br /># Debugging host used to communicate between GDB / avarice / simulavr, normally<br />#     just set to localhost unless doing some sort of crazy debugging when <br />#     avarice is running on a different computer.<br />DEBUG_HOST = localhost<br /><br /><br /><br />#============================================================================<br /><br /><br /># Define programs and commands.<br />SHELL = sh<br />CC = avr-gcc<br />OBJCOPY = avr-objcopy<br />OBJDUMP = avr-objdump<br />SIZE = avr-size<br />AR = avr-ar rcs<br />NM = avr-nm<br />AVRDUDE = avrdude<br />REMOVE = rm -f<br />REMOVEDIR = rm -rf<br />COPY = cp<br />WINSHELL = cmd<br /><br /><br /># Define Messages<br /># English<br />MSG_ERRORS_NONE = Errors: none<br />MSG_BEGIN = -------- begin --------<br />MSG_END = --------  end  --------<br />MSG_SIZE_BEFORE = Size before: <br />MSG_SIZE_AFTER = Size after:<br />MSG_COFF = Converting to AVR COFF:<br />MSG_EXTENDED_COFF = Converting to AVR Extended COFF:<br />MSG_FLASH = Creating load file for Flash:<br />MSG_EEPROM = Creating load file for EEPROM:<br />MSG_EXTENDED_LISTING = Creating Extended Listing:<br />MSG_SYMBOL_TABLE = Creating Symbol Table:<br />MSG_LINKING = Linking:<br />MSG_COMPILING = Compiling C:<br />MSG_COMPILING_CPP = Compiling C++:<br />MSG_ASSEMBLING = Assembling:<br />MSG_CLEANING = Cleaning project:<br />MSG_CREATING_LIBRARY = Creating library:<br /><br /><br /><br /><br /># Define all object files.<br />OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) <br /><br /># Define all listing files.<br />LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) <br /><br /><br /># Compiler flags to generate dependency files.<br />GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d<br /><br /><br /># Combine all necessary flags and optional flags.<br /># Add target processor to flags.<br />ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)<br />ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)<br />ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)<br /><br /><br /><br /><br /><br /># Default target.<br />all: begin gccversion sizebefore build sizeafter end<br /><br /># Change the build target to build a HEX file or a library.<br />build: elf hex eep lss sym<br />#build: lib<br /><br /><br />elf: $(TARGET).elf<br />hex: $(TARGET).hex<br />eep: $(TARGET).eep<br />lss: $(TARGET).lss<br />sym: $(TARGET).sym<br />LIBNAME=lib$(TARGET).a<br />lib: $(LIBNAME)<br /><br /><br /><br /># Eye candy.<br /># AVR Studio 3.x does not check make's exit code but relies on<br /># the following magic strings to be generated by the compile job.<br />begin:<br />   @echo<br />   @echo $(MSG_BEGIN)<br /><br />end:<br />   @echo $(MSG_END)<br />   @echo<br /><br /><br /># Display size of file.<br />HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex<br />ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf<br /><br />sizebefore:<br />   @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \<br />   2&gt;/dev/null; echo; fi<br /><br />sizeafter:<br />   @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \<br />   2&gt;/dev/null; echo; fi<br /><br /><br /><br /># Display compiler version information.<br />gccversion : <br />   @$(CC) --version<br /><br /><br /><br /># Program the device.  <br />program: $(TARGET).hex $(TARGET).eep<br />   $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)<br /><br /><br /># Generate avr-gdb config/init file which does the following:<br />#     define the reset signal, load the target file, connect to target, and set <br />#     a breakpoint at main().<br />gdb-config: <br />   @$(REMOVE) $(GDBINIT_FILE)<br />   @echo define reset &gt;&gt; $(GDBINIT_FILE)<br />   @echo SIGNAL SIGHUP &gt;&gt; $(GDBINIT_FILE)<br />   @echo end &gt;&gt; $(GDBINIT_FILE)<br />   @echo file $(TARGET).elf &gt;&gt; $(GDBINIT_FILE)<br />   @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  &gt;&gt; $(GDBINIT_FILE)<br />ifeq ($(DEBUG_BACKEND),simulavr)<br />   @echo load  &gt;&gt; $(GDBINIT_FILE)<br />endif<br />   @echo break main &gt;&gt; $(GDBINIT_FILE)<br /><br />debug: gdb-config $(TARGET).elf<br />ifeq ($(DEBUG_BACKEND), avarice)<br />   @echo Starting AVaRICE - Press enter when &quot;waiting to connect&quot; message displays.<br />   @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \<br />   $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)<br />   @$(WINSHELL) /c pause<br /><br />else<br />   @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \<br />   $(DEBUG_MFREQ) --port $(DEBUG_PORT)<br />endif<br />   @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)<br /><br /><br /><br /><br /># Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.<br />COFFCONVERT = $(OBJCOPY) --debugging<br />COFFCONVERT += --change-section-address .data-0x800000<br />COFFCONVERT += --change-section-address .bss-0x800000<br />COFFCONVERT += --change-section-address .noinit-0x800000<br />COFFCONVERT += --change-section-address .eeprom-0x810000<br /><br /><br /><br />coff: $(TARGET).elf<br />   @echo<br />   @echo $(MSG_COFF) $(TARGET).cof<br />   $(COFFCONVERT) -O coff-avr $&lt; $(TARGET).cof<br /><br /><br />extcoff: $(TARGET).elf<br />   @echo<br />   @echo $(MSG_EXTENDED_COFF) $(TARGET).cof<br />   $(COFFCONVERT) -O coff-ext-avr $&lt; $(TARGET).cof<br /><br /><br /><br /># Create final output files (.hex, .eep) from ELF output file.<br />%.hex: %.elf<br />   @echo<br />   @echo $(MSG_FLASH) $@<br />   $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $&lt; $@<br /><br />%.eep: %.elf<br />   @echo<br />   @echo $(MSG_EEPROM) $@<br />   -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom=&quot;alloc,load&quot; \<br />   --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $&lt; $@ || exit 0<br /><br /># Create extended listing file from ELF output file.<br />%.lss: %.elf<br />   @echo<br />   @echo $(MSG_EXTENDED_LISTING) $@<br />   $(OBJDUMP) -h -S -z $&lt; &gt; $@<br /><br /># Create a symbol table from ELF output file.<br />%.sym: %.elf<br />   @echo<br />   @echo $(MSG_SYMBOL_TABLE) $@<br />   $(NM) -n $&lt; &gt; $@<br /><br /><br /><br /># Create library from object files.<br />.SECONDARY : $(TARGET).a<br />.PRECIOUS : $(OBJ)<br />%.a: $(OBJ)<br />   @echo<br />   @echo $(MSG_CREATING_LIBRARY) $@<br />   $(AR) $@ $(OBJ)<br /><br /><br /># Link: create ELF output file from object files.<br />.SECONDARY : $(TARGET).elf<br />.PRECIOUS : $(OBJ)<br />%.elf: $(OBJ)<br />   @echo<br />   @echo $(MSG_LINKING) $@<br />   $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)<br /><br /><br /># Compile: create object files from C source files.<br />$(OBJDIR)/%.o : %.c<br />   @echo<br />   @echo $(MSG_COMPILING) $&lt;<br />   $(CC) -c $(ALL_CFLAGS) $&lt; -o $@ <br /><br /><br /># Compile: create object files from C++ source files.<br />$(OBJDIR)/%.o : %.cpp<br />   @echo<br />   @echo $(MSG_COMPILING_CPP) $&lt;<br />   $(CC) -c $(ALL_CPPFLAGS) $&lt; -o $@ <br /><br /><br /># Compile: create assembler files from C source files.<br />%.s : %.c<br />   $(CC) -S $(ALL_CFLAGS) $&lt; -o $@<br /><br /><br /># Compile: create assembler files from C++ source files.<br />%.s : %.cpp<br />   $(CC) -S $(ALL_CPPFLAGS) $&lt; -o $@<br /><br /><br /># Assemble: create object files from assembler source files.<br />$(OBJDIR)/%.o : %.S<br />   @echo<br />   @echo $(MSG_ASSEMBLING) $&lt;<br />   $(CC) -c $(ALL_ASFLAGS) $&lt; -o $@<br /><br /><br /># Create preprocessed source for use in sending a bug report.<br />%.i : %.c<br />   $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $&lt; -o $@ <br /><br /><br /># Target: clean project.<br />clean: begin clean_list end<br /><br />clean_list :<br />   @echo<br />   @echo $(MSG_CLEANING)<br />   $(REMOVE) $(TARGET).hex<br />   $(REMOVE) $(TARGET).eep<br />   $(REMOVE) $(TARGET).cof<br />   $(REMOVE) $(TARGET).elf<br />   $(REMOVE) $(TARGET).map<br />   $(REMOVE) $(TARGET).sym<br />   $(REMOVE) $(TARGET).lss<br />   $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)<br />   $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)<br />   $(REMOVE) $(SRC:.c=.s)<br />   $(REMOVE) $(SRC:.c=.d)<br />   $(REMOVE) $(SRC:.c=.i)<br />   $(REMOVEDIR) .dep<br /><br /><br /># Create object files directory<br />$(shell mkdir $(OBJDIR) 2&gt;/dev/null)<br /><br /><br /># Include the dependency files.<br />-include $(shell mkdir .dep 2&gt;/dev/null) $(wildcard .dep/*)<br /><br /><br /># Listing of phony targets.<br />.PHONY : all begin finish end sizebefore sizeafter gccversion \<br />build elf hex eep lss sym coff extcoff \<br />clean clean_list program debug gdb-config<br /><br /><br /><br /><br /></code></pre></div><br /><br /><br />if can someone help me ,i will be so grateful.<p>Statistics: Posted by Guest — Tue Apr 14, 2015 9:43 pm</p><hr />
]]></content>
	</entry>
	</feed>
