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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-12-03T01:47:14+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Grendel]]></name></author>
		<updated>2008-12-03T01:47:14+02:00</updated>

		<published>2008-12-03T01:47:14+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1944&amp;p=6797#p6797</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1944&amp;p=6797#p6797"/>
		<title type="html"><![CDATA[boot sector on ATmega128]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1944&amp;p=6797#p6797"><![CDATA[
Hm, w/ gcc this could be modified to<br /><br /><div class="codebox"><p>Code: </p><pre><code>#if FLASHEND &gt; 0xFFFF<br />#define USB_READ_FLASH&#40;addr&#41;    pgm_read_byte_far&#40;addr&#41;<br />#else<br />#define USB_READ_FLASH&#40;addr&#41;    pgm_read_byte&#40;addr&#41;<br />#endif</code></pre></div><br />to generally allow for devices w/ more than 64k flash. avr/io.h defines FLASHEND based on the selected device.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=101">Grendel</a> — Wed Dec 03, 2008 1:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-12-02T17:10:09+02:00</updated>

		<published>2008-12-02T17:10:09+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1944&amp;p=6795#p6795</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1944&amp;p=6795#p6795"/>
		<title type="html"><![CDATA[boot sector on ATmega128]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1944&amp;p=6795#p6795"><![CDATA[
The latest version (20081126) doesn't work from the boot sector in ATmega128 and probably other devices when the code needs to read from Flash at &gt;64k. As a workaround, I modified usbportability.h to use far reads (ELPM instead of LPM), but it's not elegant, as non-boot code should use the faster near reads (LPM).<br /><div class="codebox"><p>Code: </p><pre><code>#if defined &#40;__AVR_ATmega128__&#41;<br />#define USB_READ_FLASH&#40;addr&#41;    pgm_read_byte_far&#40;addr&#41;<br />#else<br />#define USB_READ_FLASH&#40;addr&#41;    pgm_read_byte&#40;addr&#41;<br />#endif<br /></code></pre></div><p>Statistics: Posted by Guest — Tue Dec 02, 2008 5:10 pm</p><hr />
]]></content>
	</entry>
	</feed>
