qmk_firmware/assets/isp_flashing_guide.md.DmbtFgBl.js

16 lines
36 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
const __pageData = JSON.parse('{"title":"ISP Flashing Guide","description":"","frontmatter":{},"headers":[],"relativePath":"isp_flashing_guide.md","filePath":"isp_flashing_guide.md"}');
const _sfc_main = { name: "isp_flashing_guide.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="isp-flashing-guide" tabindex="-1">ISP Flashing Guide <a class="header-anchor" href="#isp-flashing-guide" aria-label="Permalink to &quot;ISP Flashing Guide&quot;"></a></h1><p>In order to flash a microcontroller over USB, it needs something called a bootloader. This bootloader lives in a specific section of the flash memory, and allows you to load the actual application firmware (in this case, QMK) into the rest of the flash.</p><p>However, it can sometimes happen that the bootloader becomes corrupted and needs reflashing, or you may want to change the bootloader to another one. It&#39;s not possible to do this with the existing bootloader, because, of course, it is already running, and cannot overwrite itself. Instead, you will need to ISP flash the microcontroller.</p><p>There are several different kinds of bootloaders available for AVR microcontrollers. Most STM32 ARM-based microcontrollers already have a USB-capable bootloader in ROM, so generally do not need to be ISP flashed. The one current exception is the <a href="#flashing-stm32duino-bootloader">STM32F103</a>.</p><h2 id="hardware" tabindex="-1">Hardware <a class="header-anchor" href="#hardware" aria-label="Permalink to &quot;Hardware&quot;"></a></h2><p>One of the following devices is required to perform the ISP flashing. The product links are to the official versions, however you can certainly source them elsewhere.</p><p>You&#39;ll also need some jumper wires to connect the ISP flasher and the target board. Some boards have an ISP header with the necessary pins broken out. If not, then you will need to temporarily solder the wires to the PCB -- usually to switch pins or directly to the MCU. The wiring is fairly straightforward; for the most part, you&#39;ll be connecting like to like. Refer to the target MCU&#39;s datasheet for the exact <code>RESET</code>, <code>SCLK</code>, <code>MOSI</code> and <code>MISO</code> pins.</p><h3 id="pro-micro-as-isp" tabindex="-1">Pro Micro as ISP <a class="header-anchor" href="#pro-micro-as-isp" aria-label="Permalink to &quot;Pro Micro as ISP&quot;"></a></h3><p><a href="https://www.sparkfun.com/products/12640" target="_blank" rel="noreferrer">SparkFun Pro Micro</a></p><p>To use a 5V/16MHz Pro Micro as an ISP flashing tool, you will first need to load a <a href="https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex" target="_blank" rel="noreferrer">special firmware</a> onto it that emulates a hardware ISP flasher.</p><p><strong>AVRDUDE Programmer</strong>: <code>avrisp</code><br><strong>AVRDUDE Port</strong>: Serial</p><h4 id="wiring" tabindex="-1">Wiring <a class="header-anchor" href="#wiring" aria-label="Permalink to &quot;Wiring&quot;"></a></h4><table><thead><tr><th>Pro Micro</th><th>Keyboard</th></tr></thead><tbody><tr><td><code>VCC</code></td><td><code>VCC</code></td></tr><tr><td><code>GND</code></td><td><code>GND</code></td></tr><tr><td><code>10</code> (<code>B6</code>)</td><td><code>RESET</code></td></tr><tr><td><code>15</code> (<code>B1</code>)</td><td><code>SCLK</code></td></tr><tr><td><code>16</code> (<code>B2</code>)</td><td><code>MOSI</code></td></tr><tr><td><code>14</code> (<code>B3</code>)</td><td><code>MISO</code></td></tr></tbody></table><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Note that the <code>10</code> pin on the Pro Micro should be wired to the <code>RESET</code> pin on the keyboard&#39;s controller. <em><strong>DO NOT</strong></em> connect the <code>RESET</code> pin on the Pro Micro to the <code>RESET</code> on the keyboard.</p></div><h3 id="arduino-uno-micro-as-isp" tabindex="-1">Arduino Uno / Micro as ISP <a class="header-anchor" href="#arduino-uno-micro-as-isp" aria-label="Permalink to &quot;Arduino Uno / Micro as ISP&quot;"></a></h3><p><a href="https://store.arduino.cc/products/arduino-uno-rev3" target="_blank" rel="noreferrer">Arduino Uno</a><a href="https://store.arduino.cc/products/arduino-micro" target="_blank" rel="noreferrer">Arduino Micro</a></p><p>A standard U
const _hoisted_113 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_113);
}
const isp_flashing_guide = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
isp_flashing_guide as default
};