<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 19: Debugging 4-page erase devices (tiny841, tiny1634, ...) - Change on device-descriptor</title><link>https://sourceforge.net/p/avarice/bugs/19/</link><description>Recent changes to 19: Debugging 4-page erase devices (tiny841, tiny1634, ...) - Change on device-descriptor</description><atom:link href="https://sourceforge.net/p/avarice/bugs/19/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 23 Oct 2014 19:38:04 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/avarice/bugs/19/feed.rss" rel="self" type="application/rss+xml"/><item><title>Debugging 4-page erase devices (tiny841, tiny1634, ...) - Change on device-descriptor</title><link>https://sourceforge.net/p/avarice/bugs/19/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Since the new tiny841 was very interesting to me I bought some and got exploring. But soon I found out that it was not supported by AVaRICE (at least not until now ;-).&lt;br /&gt;
First I tried making an device-descriptor by myself. But this didn't work out. Maybe I screwed up there. But in the end I simply traced the usb communication on a Windows-PC (at work) and then found out that there was a different format used for the device-descriptor as it is used in AVaRICE up-to now. I think this ist mostly due to the 4-Page Erase logic of the tiny841. I think this same method is also used on the tiny1634 and tiny441. Essentially an erase always erases 4 flash-pages so that the page-buffer has to be filled 4 times in order to write the the same amount as was erased before. (I guess the only advance is in saving some registers for holding that page-buffer).&lt;br /&gt;
So since breakpoints on those debugWire-devices is merely a break-instruction the flash has to be reprogrammed whenever a new breakpoint is set. For that the Debug-Hardware needs to now that the page-buffer doesn't cover the entire erase-window.&lt;/p&gt;
&lt;p&gt;So I basically copied the raw-data of the usb-commands and inserted a device-specific command sequence in the setDeviceDescriptor function. This is very ugly and should probably be moved to somewhere else. But I think it should be somebody who has a deeper understanding of the software, as it might involve extending that device-descriptor-table.&lt;/p&gt;
&lt;p&gt;Anyways that patch works for me.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Armin Otterstätter</dc:creator><pubDate>Thu, 23 Oct 2014 19:38:04 -0000</pubDate><guid>https://sourceforge.nete2f8ef48f5fbe0615a87ab248a73d4b5a2cf0cc8</guid></item></channel></rss>