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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-08-21T23:56:57+02:00</updated>

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

		<entry>
		<author><name><![CDATA[niko]]></name></author>
		<updated>2011-08-21T23:56:57+02:00</updated>

		<published>2011-08-21T23:56:57+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5967&amp;p=19412#p19412</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5967&amp;p=19412#p19412"/>
		<title type="html"><![CDATA[USBaspLoader on AT90CAN128]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5967&amp;p=19412#p19412"><![CDATA[
Hello,<br /><br />I'm trying to use the latest version of USBaspLoader on my Olimex AVR-CAN dev board (powered by an AT90CAN128) and cannot get my laptop to recognize the device.<br /><br />I am 100% sure that my hardware isn't the problem, because the hid-mouse example works just fine (I'm pretty sure it's an addressing problem, because it only happens in the boot section).<br /><br />Here's what I've changed in the original source-code so far:<br /><br />I adjusted the makefile to reflect my board:<br />AT90CAN128<br />16MHz<br />Bootloader address = 0x1E000<br /><br />I also had to change <div class="codebox"><p>Code: </p><pre><code>--section-start=.text=</code></pre></div> to <div class="codebox"><p>Code: </p><pre><code>--section-start=.bootloader=</code></pre></div> in the LDFLAGS or else I would always get an out of range error during flashing-<br /><br />I edited the bootloaderconfig.h as follows:<br /><br /><div class="codebox"><p>Code: </p><pre><code>#define USB_CFG_IOPORTNAME      E<br />#define USB_CFG_DMINUS_BIT      6<br />#define USB_CFG_DPLUS_BIT       7<br />#define USB_CFG_CLOCK_KHZ       16000<br />#define SIGNATURE_BYTES             0x1e, 0x97, 0x81, 0<br />#define bootLoaderCondition()   1</code></pre></div><br /><br />and I edited usbconfig.h:<br /><div class="codebox"><p>Code: </p><pre><code>#define USB_CFG_DRIVER_FLASH_PAGE       1<br />#define USB_INTR_CFG            MCUCR<br />#define USB_INTR_CFG_SET        ((1 &lt;&lt; ISC70) | (1 &lt;&lt; ISC71))<br />#define USB_INTR_ENABLE         EIMSK<br />#define USB_INTR_ENABLE_BIT     INT7<br />#define USB_INTR_PENDING        EIFR<br />#define USB_INTR_PENDING_BIT    INTF7<br />#define USB_INTR_VECTOR         INT7_vect</code></pre></div><br /><br />finally I included the usbconfig.h on top of the usbdrv.c.<br /><br />My fuses:<br />BOD disabled<br />On-Chip Debug enabled<br />JTAG enabled<br />SPI enabled<br />Boot section size=8KB starting at 0x1E000<br />Boot reset enabled<br />External Clock enabled (CKSEL=1111, SUT=00)<br /><br />I also tried with and without Lockbits (0xFF vs. 0xEF).<br /><br />I know that the bootloader gets called upon reset, because I enable the dev-boards LED in the main function (It doesn't light up when i set the bootloaderCondition to 0).<br /><br /><br />As mentioned above, compiling &amp; uploading the hid-mouse using the same settings works just fine (although not in the boot section of course).<br />I also got the bootloader working on 2 different ATmega8 boards, so im very sure that it is an adressing problem.<br /><br />Any Hints?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5656">niko</a> — Sun Aug 21, 2011 11:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
