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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-05-31T23:38:14+02:00</updated>

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

		<entry>
		<author><name><![CDATA[muntablues]]></name></author>
		<updated>2011-05-31T23:38:14+02:00</updated>

		<published>2011-05-31T23:38:14+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18632#p18632</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18632#p18632"/>
		<title type="html"><![CDATA[Re: BootloadHID for ATMega324p]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18632#p18632"><![CDATA[
Hi TeknoJuce<br /><br />I have to use 7000 because I use the latest winavr gcc and there the bootloader is bigger then 2kB. <br /><br />As I said, I think the µc is starting correct, otherwise the debug output would not be send over uart...<br /><br />MB<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1864">muntablues</a> — Tue May 31, 2011 11:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TeknoJuce]]></name></author>
		<updated>2011-05-28T22:41:26+02:00</updated>

		<published>2011-05-28T22:41:26+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18617#p18617</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18617#p18617"/>
		<title type="html"><![CDATA[Re: BootloadHID for ATMega324p]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18617#p18617"><![CDATA[
Hi muntablues,<br /><br />Try this...<br /><br /><div class="codebox"><p>Code: </p><pre><code>DEVICE = atmega324p<br />BOOTLOADER_ADDRESS = 7800<br />F_CPU = 12000000<br />FUSEH = 0xDA<br />FUSEL = 0xF7<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5293">TeknoJuce</a> — Sat May 28, 2011 10:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[muntablues]]></name></author>
		<updated>2011-05-26T13:56:10+02:00</updated>

		<published>2011-05-26T13:56:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18569#p18569</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18569#p18569"/>
		<title type="html"><![CDATA[BootloadHID for ATMega324p]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5708&amp;p=18569#p18569"><![CDATA[
Hi<br /><br />I am trying to get BootloadHID example working on my Mega324P.<br /><br />First of all, the µC works fine with USBasp and HIDKeys example, so I think HW should be ok. Problem is that USBasp is not really soupported for WIN7 x64 (driver issue). So I would like to use BootloadHID example.<br /><br />Here is what I have changed:<br /><br />bootloaderconfig:<br /><div class="codebox"><p>Code: </p><pre><code>#define USB_CFG_IOPORTNAME      D<br />/* This is the port where the USB bus is connected. When you configure it to<br /> * &quot;B&quot;, the registers PORTB, PINB and DDRB will be used.<br /> */<br />#define USB_CFG_DMINUS_BIT      3<br />/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.<br /> * This may be any bit in the port.<br /> */<br />#define USB_CFG_DPLUS_BIT       2<br /><br />...<br /><br />#ifndef __ASSEMBLER__   /* assembler cannot parse function definitions */<br />#include &lt;util/delay.h&gt;<br /><br />static inline void  bootLoaderInit(void)<br />{<br />    PORTB = 1 &lt;&lt; 0; /* activate pull-up for key */<br />    _delay_us(10);  /* wait for levels to stabilize */<br />}<br /><br />#define bootLoaderCondition()   ((PINB &amp; (1 &lt;&lt; 0)) == 0)   /* True if jumper is set */<br /><br />#endif<br /></code></pre></div><br /><br />makefile:<br /><div class="codebox"><p>Code: </p><pre><code>DEVICE = atmega324p<br />BOOTLOADER_ADDRESS = 7000<br />F_CPU = 12000000<br />FUSEH = 0xD8<br />FUSEL = 0xff<br /></code></pre></div><br /><br />main:<br /><div class="codebox"><p>Code: </p><pre><code>int __attribute__((noreturn)) main(void)<br />{<br />    bootLoaderInit();<br />    odDebugInit();<br />    uchar* data = &quot;HELLO&quot;;<br />    DBG1(0x00, data, 5);<br />    DBG1(0x00, 0, 0);<br />...<br />}<br /></code></pre></div><br /><br />compile output:<br /><div class="codebox"><p>Code: </p><pre><code>C:\Temp\bootloadHID.2010-07-29\firmware&gt;make<br />avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega324p -DF_CPU=12000000 -DDEBUG_LEVEL=2<br />  -c main.c -o main.o<br />In file included from main.c:22:<br />usbdrv/oddebug.c:15:2: warning: #warning &quot;Never compile production devices with<br />debugging enabled&quot;<br />main.c: In function 'main':<br />main.c:224: warning: pointer targets in initialization differ in signedness<br />main.c: At top level:<br />usbdrv/usbdrv.h:211: warning: 'usbFunctionDescriptor' used but never defined<br />usbdrv/usbdrv.h:218: warning: 'usbSetInterrupt' declared 'static' but never defi<br />ned<br />avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega324p -DF_CPU=12000000 -DDEBUG_LEVEL=2<br />  -o main.bin usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o -Wl,--section-start=.te<br />xt=7000<br />rm -f main.hex main.eep.hex<br />avr-objcopy -j .text -j .data -O ihex main.bin main.hex<br />avr-size main.bin<br />   text    data     bss     dec     hex filename<br />   2184      16      49    2249     8c9 main.bin<br /></code></pre></div><br /><br />The rest is like in example already given.<br /><br />Here is the serial debug output:<br /><div class="codebox"><p>Code: </p><pre><code>þ00: 48 45 4c 4c 4f<br />00:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br />ff:<br /></code></pre></div> <br /><br /><br /><br />So I think the bootloader starts, but is not possible to do the usb connection. I have tried with an ATMega32 but the result is the same, no connection to PC. <br /><br />I have no idea what is going wrong, so please give me a hint...<br /><br />regards<br /><br />MB<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1864">muntablues</a> — Thu May 26, 2011 1:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
