<?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/3836" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-02-27T13:59:02+02:00</updated>

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

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2010-02-27T13:59:02+02:00</updated>

		<published>2010-02-27T13:59:02+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3836&amp;p=13429#p13429</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3836&amp;p=13429#p13429"/>
		<title type="html"><![CDATA[Re: undefined reference to `usbDescriptorStringSerialNumber']]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3836&amp;p=13429#p13429"><![CDATA[
Have you defined one of the *SERIAL_NUMBER defines in usbconfig.h?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Sat Feb 27, 2010 1:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[durl]]></name></author>
		<updated>2010-01-29T15:44:46+02:00</updated>

		<published>2010-01-29T15:44:46+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3836&amp;p=13073#p13073</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3836&amp;p=13073#p13073"/>
		<title type="html"><![CDATA[undefined reference to `usbDescriptorStringSerialNumber']]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3836&amp;p=13073#p13073"><![CDATA[
hi<br />I'm trying to use V-USB with the Atmega8. But i am not able to compile my code.<br /><br />I am using this makefile:<br /><div class="codebox"><p>Code: </p><pre><code>DEVICE  = atmega8<br />F_CPU   = 12000000   # in Hz<br />FUSE_L  = 0x1f<br />FUSE_H  = 0xc1<br />AVRDUDE = avrdude -c usbasp -p $(DEVICE) # edit this line for your programmer<br /><br />CFLAGS  = -Iusbdrv -I. -DDEBUG_LEVEL=0<br />OBJECTS = usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o adc.o main.o<br /><br />COMPILE = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE)<br /><br />##############################################################################<br /># Fuse values for particular devices<br />##############################################################################<br /># If your device is not listed here, go to<br /># http://palmavr.sourceforge.net/cgi-bin/fc.cgi<br /># and choose options for external crystal clock and no clock divider<br />#<br />################################## ATMega8 ##################################<br /># ATMega8 FUSE_L (Fuse low byte):<br /># 0x9f = 1 0 0 1   1 1 1 1<br />#        ^ ^ \ /   \--+--/<br />#        | |  |       +------- CKSEL 3..0 (external &gt;8M crystal)<br />#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)<br />#        | +------------------ BODEN (BrownOut Detector enabled)<br />#        +-------------------- BODLEVEL (2.7V)<br /># ATMega8 FUSE_H (Fuse high byte):<br /># 0xc9 = 1 1 0 0   1 0 0 1 &lt;-- BOOTRST (boot reset vector at 0x0000)<br />#        ^ ^ ^ ^   ^ ^ ^------ BOOTSZ0<br />#        | | | |   | +-------- BOOTSZ1<br />#        | | | |   + --------- EESAVE (don't preserve EEPROM over chip erase)<br />#        | | | +-------------- CKOPT (full output swing)<br />#        | | +---------------- SPIEN (allow serial programming)<br />#        | +------------------ WDTON (WDT not always on)<br />#        +-------------------- RSTDISBL (reset pin is enabled)<br />#<br />############################## ATMega48/88/168 ##############################<br /># ATMega*8 FUSE_L (Fuse low byte):<br /># 0xdf = 1 1 0 1   1 1 1 1<br />#        ^ ^ \ /   \--+--/<br />#        | |  |       +------- CKSEL 3..0 (external &gt;8M crystal)<br />#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)<br />#        | +------------------ CKOUT (if 0: Clock output enabled)<br />#        +-------------------- CKDIV8 (if 0: divide by 8)<br /># ATMega*8 FUSE_H (Fuse high byte):<br /># 0xde = 1 1 0 1   1 1 1 0<br />#        ^ ^ ^ ^   ^ \-+-/<br />#        | | | |   |   +------ BODLEVEL 0..2 (110 = 1.8 V)<br />#        | | | |   + --------- EESAVE (preserve EEPROM over chip erase)<br />#        | | | +-------------- WDTON (if 0: watchdog always on)<br />#        | | +---------------- SPIEN (allow serial programming)<br />#        | +------------------ DWEN (debug wire enable)<br />#        +-------------------- RSTDISBL (reset pin is enabled)<br />#<br />############################## ATTiny25/45/85 ###############################<br /># ATMega*5 FUSE_L (Fuse low byte):<br /># 0xef = 1 1 1 0   1 1 1 1<br />#        ^ ^ \+/   \--+--/<br />#        | |  |       +------- CKSEL 3..0 (clock selection -&gt; crystal @ 12 MHz)<br />#        | |  +--------------- SUT 1..0 (BOD enabled, fast rising power)<br />#        | +------------------ CKOUT (clock output on CKOUT pin -&gt; disabled)<br />#        +-------------------- CKDIV8 (divide clock by 8 -&gt; don't divide)<br /># ATMega*5 FUSE_H (Fuse high byte):<br /># 0xdd = 1 1 0 1   1 1 0 1<br />#        ^ ^ ^ ^   ^ \-+-/ <br />#        | | | |   |   +------ BODLEVEL 2..0 (brownout trigger level -&gt; 2.7V)<br />#        | | | |   +---------- EESAVE (preserve EEPROM on Chip Erase -&gt; not preserved)<br />#        | | | +-------------- WDTON (watchdog timer always on -&gt; disable)<br />#        | | +---------------- SPIEN (enable serial programming -&gt; enabled)<br />#        | +------------------ DWEN (debug wire enable)<br />#        +-------------------- RSTDISBL (disable external reset -&gt; enabled)<br />#<br />################################ ATTiny2313 #################################<br /># ATTiny2313 FUSE_L (Fuse low byte):<br /># 0xef = 1 1 1 0   1 1 1 1<br />#        ^ ^ \+/   \--+--/<br />#        | |  |       +------- CKSEL 3..0 (clock selection -&gt; crystal @ 12 MHz)<br />#        | |  +--------------- SUT 1..0 (BOD enabled, fast rising power)<br />#        | +------------------ CKOUT (clock output on CKOUT pin -&gt; disabled)<br />#        +-------------------- CKDIV8 (divide clock by 8 -&gt; don't divide)<br /># ATTiny2313 FUSE_H (Fuse high byte):<br /># 0xdb = 1 1 0 1   1 0 1 1<br />#        ^ ^ ^ ^   \-+-/ ^<br />#        | | | |     |   +---- RSTDISBL (disable external reset -&gt; enabled)<br />#        | | | |     +-------- BODLEVEL 2..0 (brownout trigger level -&gt; 2.7V)<br />#        | | | +-------------- WDTON (watchdog timer always on -&gt; disable)<br />#        | | +---------------- SPIEN (enable serial programming -&gt; enabled)<br />#        | +------------------ EESAVE (preserve EEPROM on Chip Erase -&gt; not preserved)<br />#        +-------------------- DWEN (debug wire enable)<br /><br /><br /># symbolic targets:<br />help:<br />   @echo &quot;This Makefile has no default rule. Use one of the following:&quot;<br />   @echo &quot;make hex ....... to build main.hex&quot;<br />   @echo &quot;make program ... to flash fuses and firmware&quot;<br />   @echo &quot;make fuse ...... to flash the fuses&quot;<br />   @echo &quot;make flash ..... to flash the firmware (use this on metaboard)&quot;<br />   @echo &quot;make clean ..... to delete objects and hex file&quot;<br /><br />hex: main.hex<br /><br />program: flash fuse<br /><br /># rule for programming fuse bits:<br />fuse:<br />   @&#91; &quot;$(FUSE_H)&quot; != &quot;&quot; -a &quot;$(FUSE_L)&quot; != &quot;&quot; &#93; || \<br />      { echo &quot;*** Edit Makefile and choose values for FUSE_L and FUSE_H!&quot;; exit 1; }<br />   $(AVRDUDE) -U hfuse:w:$(FUSE_H):m -U lfuse:w:$(FUSE_L):m<br /><br /># rule for uploading firmware:<br />flash: main.hex<br />   $(AVRDUDE) -U flash:w:main.hex:i<br /><br /># rule for deleting dependent files (those which can be built by Make):<br />clean:<br />   rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.elf *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s<br /><br /># Generic rule for compiling C files:<br />.c.o:<br />   $(COMPILE) -c $&lt; -o $@<br /><br /># Generic rule for assembling Assembler source files:<br />.S.o:<br />   $(COMPILE) -x assembler-with-cpp -c $&lt; -o $@<br /># &quot;-x assembler-with-cpp&quot; should not be necessary since this is the default<br /># file type for the .S (with capital S) extension. However, upper case<br /># characters are not always preserved on Windows. To ensure WinAVR<br /># compatibility define the file type manually.<br /><br /># Generic rule for compiling C to assembler, used for debugging only.<br />.c.s:<br />   $(COMPILE) -S $&lt; -o $@<br /><br /># file targets:<br /><br /># Since we don't want to ship the driver multipe times, we copy it into this project:<br />#usbdrv:<br />#   cp -r ../../../usbdrv .<br /><br />main.elf: $(OBJECTS)   # usbdrv dependency only needed because we copy it<br />   $(COMPILE) -o main.elf $(OBJECTS)<br /><br />main.hex: main.elf<br />   rm -f main.hex main.eep.hex<br />   avr-objcopy -j .text -j .data -O ihex main.elf main.hex<br />   avr-size main.hex<br /><br /># debugging targets:<br /><br />disasm:   main.elf<br />   avr-objdump -d main.elf<br /><br />cpp:<br />   $(COMPILE) -E main.c adc.c adc.h<br /></code></pre></div><br /><br />But i get the following error:<br />usbdrv/usbdrv.o: In function `usbPoll':<br />usbdrv.c:(.text+0xfe): undefined reference to `usbDescriptorStringSerialNumber'<br />usbdrv.c:(.text+0x100): undefined reference to `usbDescriptorStringSerialNumber'<br />make: *** [main.elf] Error 1<br /><br />Where is the error? Because main.c is compiled successfully and i made no changes in the function usbPoll.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3456">durl</a> — Fri Jan 29, 2010 3:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
