Deploying to gh-pages from @ Klipper3d/klipper@848a78d1a5 🚀
This commit is contained in:
@@ -1627,7 +1627,7 @@
|
||||
<p>如果能用某种方式将 bootloader 刷写到微控制器,使用该方式通常也能完成程序刷写操作,但是,这种直接刷写可能会将 bootloader 覆盖掉。相对地,bootloader 只允许用户刷写应用程序区域。因此,尽可能使用 bootloader 完成程序的刷写。</p>
|
||||
<p>该文档将尽可能介绍常见的bootloaders,刷入bootloader所需的步骤和触发bootloader进行程序刷写的流程。该文档亦非官方指引,这只是在Klipper开发人员使用过程中收集到的有用信息。</p>
|
||||
<h2 id="avr">AVR 微控制器<a class="headerlink" href="#avr" title="Permanent link">¶</a></h2>
|
||||
<p>总体上来说,Arduino项目是8位Atmel Atmega微控制器的引导程序和刷写程序的好的参考。特别是" boards.txt "文件。 <a href="https://github.com/arduino/Arduino/blob/1.8.5/hardware/arduino/avr/boards.txt">https://github.com/arduino/Arduino/blob/1.8.5/hardware/arduino/avr/boards.txt</a>是一个有用的参考。</p>
|
||||
<p>总体上来说,Arduino项目是8位Atmel Atmega微控制器的引导程序和刷写程序的好的参考。特别是" boards.txt "文件。<a href="https://github.com/arduino/Arduino/blob/1.8.5/hardware/arduino/avr/boards.txt">https://github.com/arduino/Arduino/blob/1.8.5/hardware/arduino/avr/boards.txt</a>是一个有用的参考。</p>
|
||||
<p>要刷写引导程序本身,AVR 芯片需要一个外部硬件刷写工具(它使用 SPI 与芯片进行通信)。这个工具可以购买(例如,在网上搜索 "avr isp"、"arduino isp "或 "usb tiny isp")。也可以使用另一个Arduino或Raspberry Pi来闪存AVR引导程序(例如,在网上搜索 "用raspberry pi编程AVR")。下面的例子是在假设使用 "AVR ISP Mk2 "类型的设备的情况下编写的。</p>
|
||||
<p>"avrdude "程序是最常用的工具,用于刷写atmega芯片(包括引导程序刷写和应用程序刷写)。</p>
|
||||
<h3 id="atmega2560">Atmega2560<a class="headerlink" href="#atmega2560" title="Permanent link">¶</a></h3>
|
||||
@@ -1678,7 +1678,7 @@ avrdude -cavrispv2 -patmega1284p -P/dev/ttyACM0 -b115200 -U lock:w:0x0F:m
|
||||
|
||||
<h3 id="at90usb1286">At90usb1286<a class="headerlink" href="#at90usb1286" title="Permanent link">¶</a></h3>
|
||||
<p>本文件不包括向At90usb1286刷写引导程序的方法,也不包括向该设备刷写一般应用。</p>
|
||||
<p>来自pjrc.com的Teensy++设备带有一个专用的引导程序。它需要一个来自 <a href="https://github.com/PaulStoffregen/teensy_loader_cli">https://github.com/PaulStoffregen/teensy_loader_cli</a>的定制刷写工具。可以用这个工具来刷写一个应用程序,例如:</p>
|
||||
<p>来自pjrc.com的Teensy++设备带有一个专用的引导程序。它需要一个来自<a href="https://github.com/PaulStoffregen/teensy_loader_cli">https://github.com/PaulStoffregen/teensy_loader_cli</a>的定制刷写工具。可以用这个工具来刷写一个应用程序,例如:</p>
|
||||
<div class="highlight"><pre><span></span><code>teensy_loader_cli --mcu=at90usb1286 out/klipper.elf.hex -v
|
||||
</code></pre></div>
|
||||
|
||||
@@ -1740,7 +1740,7 @@ program samd21_sam_ba.bin verify
|
||||
<div class="highlight"><pre><span></span><code>source [find target/atsame5x.cfg]
|
||||
</code></pre></div>
|
||||
|
||||
<p>获得一个引导程序--很多引导程序可以从 <a href="https://github.com/adafruit/uf2-samdx1/releases/latest">https://github.com/adafruit/uf2-samdx1/releases/latest</a>获得。例如:</p>
|
||||
<p>获得一个引导程序--很多引导程序可以从<a href="https://github.com/adafruit/uf2-samdx1/releases/latest">https://github.com/adafruit/uf2-samdx1/releases/latest</a>获得。例如:</p>
|
||||
<div class="highlight"><pre><span></span><code>wget 'https://github.com/adafruit/uf2-samdx1/releases/download/v3.7.0/bootloader-itsybitsy_m4-v3.7.0.bin'
|
||||
</code></pre></div>
|
||||
|
||||
@@ -1759,10 +1759,10 @@ at91samd bootloader 16384
|
||||
<div class="highlight"><pre><span></span><code>stm32flash -w out/klipper.bin -v -g 0 /dev/ttyAMA0
|
||||
</code></pre></div>
|
||||
|
||||
<p>注意,如果使用树莓派的3.3V串口,stm32flash协议使用的串行奇偶校验模式,树莓派的 "mini UART "并不支持。关于在树莓派的GPIO引脚上启用完整的UART的细节,见 <a href="https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-uarts">https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-uarts</a>。</p>
|
||||
<p>注意,如果使用树莓派的3.3V串口,stm32flash协议使用的串行奇偶校验模式,树莓派的 "mini UART "并不支持。关于在树莓派的GPIO引脚上启用完整的UART的细节,见<a href="https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-uarts">https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-uarts</a>。</p>
|
||||
<p>刷写后,将 "boot 0 "和 "boot 1 "都恢复设为低电平,以便在复位后从闪存启动。</p>
|
||||
<h3 id="stm32duino-stm32f103">带有 stm32duino 引导加载程序的 STM32F103<a class="headerlink" href="#stm32duino-stm32f103" title="Permanent link">¶</a></h3>
|
||||
<p>"stm32duino "项目有一个USB功能的引导程序-参见: <a href="https://github.com/rogerclarkmelbourne/STM32duino-bootloader">https://github.com/rogerclarkmelbourne/STM32duino-bootloader</a></p>
|
||||
<p>"stm32duino "项目有一个USB功能的引导程序-参见:<a href="https://github.com/rogerclarkmelbourne/STM32duino-bootloader">https://github.com/rogerclarkmelbourne/STM32duino-bootloader</a></p>
|
||||
<p>这个引导程序可以通过3.3V的串口用类似以下的命令来刷写:</p>
|
||||
<div class="highlight"><pre><span></span><code>wget 'https://github.com/rogerclarkmelbourne/STM32duino-bootloader/raw/master/binaries/generic_boot20_pc13.bin'
|
||||
|
||||
@@ -1866,11 +1866,11 @@ stm32flash -w hid_bootloader_SKR_PRO.bin -v -g 0 /dev/ttyAMA0
|
||||
<p>与STM32F1一样,STM32F4使用hid-flash工具来上传二进制文件到MCU。关于如何构建和使用hid-flash的细节,请参见上面的说明。</p>
|
||||
<p>可能需要手动进入引导程序,这可以通过设置 "boot 0 "为低电平,"boot 1 "为高电平并上电来完成。编程完成后,设备断电,将 "boot 1 "重设为低电平,这样应用程序就会被加载。</p>
|
||||
<h2 id="lpc176xsmoothieboards">LPC176x微控制器(Smoothieboards)<a class="headerlink" href="#lpc176xsmoothieboards" title="Permanent link">¶</a></h2>
|
||||
<p>本文件没有描述刷写引导程序本身的方法--见: <a href="http://smoothieware.org/flashing-the-bootloader">http://smoothieware.org/flashing-the-bootloader</a>以获得关于该主题的进一步信息。</p>
|
||||
<p>Smoothieboards通常带有一个来自 <a href="https://github.com/triffid/LPC17xx-DFU-Bootloader">https://github.com/triffid/LPC17xx-DFU-Bootloader</a>的bootloader。当使用这个引导程序时,应用程序必须以16KiB的起始地址进行编译。用这个引导程序刷写应用程序的最简单方法是将应用程序文件(例如<code>out/klipper.bin</code>)复制到SD卡上一个名为<code>firmware.bin</code>的文件,然后用该SD卡重新启动微控制器。</p>
|
||||
<p>本文件没有描述刷写引导程序本身的方法--见:<a href="http://smoothieware.org/flashing-the-bootloader">http://smoothieware.org/flashing-the-bootloader</a>以获得关于该主题的进一步信息。</p>
|
||||
<p>Smoothieboards通常带有一个来自<a href="https://github.com/triffid/LPC17xx-DFU-Bootloader">https://github.com/triffid/LPC17xx-DFU-Bootloader</a>的bootloader。当使用这个引导程序时,应用程序必须以16KiB的起始地址进行编译。用这个引导程序刷写应用程序的最简单方法是将应用程序文件(例如<code>out/klipper.bin</code>)复制到SD卡上一个名为<code>firmware.bin</code>的文件,然后用该SD卡重新启动微控制器。</p>
|
||||
<h2 id="openocd">在树莓派上运行OpenOCD<a class="headerlink" href="#openocd" title="Permanent link">¶</a></h2>
|
||||
<p>OpenOCD是一个软件包,可以进行底层的芯片编程和调试。它可以使用树莓派上的GPIO引脚与各种ARM芯片通信。</p>
|
||||
<p>本节描述了如何安装和启动OpenOCD。它来自于以下的说明: <a href="https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi">https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi</a></p>
|
||||
<p>本节描述了如何安装和启动OpenOCD。它来自于以下的说明:<a href="https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi">https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi</a></p>
|
||||
<p>开始下载和编译软件(每个步骤可能需要数分钟,"make "步骤可能需要30分钟以上):</p>
|
||||
<div class="highlight"><pre><span></span><code>sudo apt-get update
|
||||
sudo apt-get install autoconf libtool telnet
|
||||
|
||||
Reference in New Issue
Block a user