{"id":1613,"date":"2013-09-16T02:57:43","date_gmt":"2013-09-16T00:57:43","guid":{"rendered":"http:\/\/raftaman.net\/?p=1613"},"modified":"2021-05-15T11:46:38","modified_gmt":"2021-05-15T09:46:38","slug":"flashing-gen7-bootloader-with-avrdude","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=1613","title":{"rendered":"Flashing Gen7 bootloader with avrdude"},"content":{"rendered":"<p>The <a href=\"http:\/\/reprap.org\/wiki\/Gen7_Arduino_IDE_Support\">Arudino IDE Support<\/a> package also contains different bootloaders for quite a few variations of the <a href=\"http:\/\/reprap.org\/wiki\/Generation_7_Electronics\">Generation 7 Electronics<\/a> <a href=\"http:\/\/reprap.org\/wiki\/Main_Page\">RepRap<\/a> controller board.<\/p>\n<p>The Arudino IDE Support wiki page at the RepRap wiki also contains a <a href=\"http:\/\/reprap.org\/wiki\/Gen7_Arduino_IDE_Support#Linux\">paragraph<\/a> on how to flash the bootloader onto the Gen7 board with <a href=\"http:\/\/www.nongnu.org\/avrdude\/\">avrdude<\/a>. It suggest to write the fuses first, the flash the hex file onto the microcontroller and lock the bootloader afterwards. While there&#8217;s nothing wrong with that, it can be done in a single command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ avrdude -pm1284p -cstk500 -P\/dev\/ttyUSB0 \\\r\n-U lock:w:0x3F:m \\\r\n-U flash:w:bootloader-1284P-20MHz.hex \\\r\n-U lfuse:w:0xf7:m \\\r\n-U hfuse:w:0xdc:m \\\r\n-U efuse:w:0xfc:m \\\r\n-U lock:w:0x0F:m\r\n<\/pre>\n<p>Of course, the parameters regarding the processor and the programmer port may be different.<\/p>\n<p>The actual bootloader hex files can be found in the Gen7 Arudino IDE Support package. Probably the easiest way to get it is to clone <a href=\"http:\/\/reprap.org\/wiki\/User:Traumflug\">Traumflug<\/a>&#8216;s Gen7 git repository<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ git clone https:\/\/github.com\/Traumflug\/Generation_7_Electronics.git\r\n<\/pre>\n<p>The <strong>hex files<\/strong> can be found in: <code>Generation_7_Electronics\/arduino support\/Gen7 Arduino IDE Support\/Gen7\/bootloaders\/Gen7\/<\/code><\/p>\n<p>Make sure to choose the right one for your microcontroller and clock speed. The <strong>fuses<\/strong> for the different microcontrollers are listed in <code>Generation_7_Electronics\/arduino support\/Gen7 Arduino IDE Support\/Gen7\/boards.txt<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Arudino IDE Support package also contains different bootloaders for quite a few variations of the Generation 7 Electronics RepRap controller board. The Arudino IDE Support wiki page at the RepRap wiki also contains a paragraph on how to flash the bootloader onto the Gen7 board with avrdude. It suggest to write the fuses first, the flash the hex file&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=1613\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,61],"class_list":["post-1613","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-avr","tag-reprap"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1613"}],"version-history":[{"count":18,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1613\/revisions"}],"predecessor-version":[{"id":2196,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1613\/revisions\/2196"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}