<?xml version="1.0"?><rss version="2.0">
<channel>
  <title>Alan&#039;s Ramblings - atmega328p tag</title>
  <link>http://bleaklow.com:80/tags/atmega328p/</link>
  <description>My opinions may be incorrect, but they are my own</description>
  <language>en</language>
  <copyright>Alan Burlison</copyright>
  <lastBuildDate>Wed, 29 Feb 2012 20:50:00 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  <image>
    <url>http://bleaklow.com/images/misc/logo.gif</url>
    <title>Alan&#039;s Ramblings</title>
    <link>http://bleaklow.com:80/</link>
  </image>
  <item>
    <title>Optiboot on Arduino Pro Mini</title>
    <link>http://bleaklow.com:80/2011/01/21/optiboot_on_arduino_pro_mini.html</link>
    <description>
          &lt;p&gt;
The newer Arduino boards such as the &lt;a href=&#034;http://arduino.cc/en/Main/ArduinoBoardUno&#034;&gt;Uno&lt;/a&gt; include a new bootloader that takes up about 1/4 of the size of the old one.  That means some extra memory can be freed up for applications.  The new bootloader is known as &lt;a href=&#034;http://code.google.com/p/optiboot/&#034;&gt;Optiboot&lt;/a&gt;, and the site says &#034;Compatible with 168 and 328 Arduinos including Lilypad, Pro, Nano&#034;.  Unfortunately, in the case of the Pro Mini, that&#039;s not true, but it can be made to work.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
At the time of writing, the current v3 release tarball doesn&#039;t include some important bugfixes such as &lt;a href=&#034;http://code.google.com/p/optiboot/issues/detail?id=8&#034;&gt;this one&lt;/a&gt;.  My advice is to pull the latest version from the repository and build it yourself.
&lt;/li&gt;
&lt;li&gt;
With the standard makefile flags Optiboot may not build, depending on which version of the compiler you are using.  The fix is to add &lt;code&gt;-nostdlib&lt;/code&gt; to &lt;code&gt;LDFLAGS&lt;/code&gt; as detailed in &lt;a href=&#034;http://code.google.com/p/optiboot/issues/detail?id=1&#034;&gt;this bug&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;
Optiboot uses different upload baud speeds from the old bootloader, apparently to shave a few seconds off uploads.  Unfortunately that has caused sketch upload issues such as &lt;a href=&#034;http://code.google.com/p/optiboot/source/detail?r=93a76f563985639b4076b5e5c8a11ea4fe9dc79e&#034;&gt;this&lt;/a&gt;, and in the specific case of the Pro Mini, &lt;a href=&#034;http://code.google.com/p/optiboot/issues/detail?id=28&#034;&gt;this&lt;/a&gt;.  The common factor is that the Optiboot baud rate is too high to be reliable.  I suspect that several of the other &#034;Sketch won&#039;t upload&#034; reports are caused by the same thing.  Also, changing the baud rate means that it&#039;s not only necessary to fiddle with the boards.txt file to make the Arduino environment use the new baud rates, it&#039;s also necessary that you know exactly what bootloader is on a board.  My recommendation is to edit the &lt;a href=&#034;http://code.google.com/p/optiboot/source/browse/optiboot/bootloaders/optiboot/Makefile&#034;&gt;Makefile&lt;/a&gt; and change the &lt;code&gt;-DBAUD_RATE=XXXXX&lt;/code&gt; values to those in the original &lt;a href=&#034;https://github.com/arduino/Arduino/blob/master/hardware/arduino/boards.txt&#034;&gt;boards.txt&lt;/a&gt; file.
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Update&lt;/h3&gt;
&lt;p&gt;
I&#039;ve tried five different Pro Minis, setting the baud rate to 57600 instead of 115200 and whilst four of them upload fine with Optiboot, one of them doesn&#039;t.  I can get it to work by manually resetting the board, and it works fine with the standard Arduino bootloader.  Clearly there&#039;s some sort of timing issue related to resets, I&#039;ll have to tinker some more.
&lt;/p&gt;

</description>
      <category>Arduino</category>
    <category>Tech</category>
    <comments>http://bleaklow.com:80/2011/01/21/optiboot_on_arduino_pro_mini.html#comments</comments>
    <guid isPermaLink="true">http://bleaklow.com:80/2011/01/21/optiboot_on_arduino_pro_mini.html</guid>
    <pubDate>Fri, 21 Jan 2011 14:17:50 GMT</pubDate>
  </item>
  </channel>
</rss>

