Deploying to gh-pages from @ Klipper3d/klipper@7527e57e5a 🚀
This commit is contained in:
@@ -1140,6 +1140,40 @@
|
||||
電路板定義
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#flashing-boards-that-use-sdio" class="md-nav__link">
|
||||
Flashing Boards that use SDIO
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Flashing Boards that use SDIO">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#sdio-programming-with-rpi-on-separate-power-supply" class="md-nav__link">
|
||||
SDIO Programming with RPi on Separate Power Supply
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#sdio-programming-with-rpi-on-the-same-power-supply" class="md-nav__link">
|
||||
SDIO Programming with RPi on the Same Power Supply
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#sdio-to-spi-pin-mapping" class="md-nav__link">
|
||||
SDIO to SPI Pin Mapping
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1308,6 +1342,40 @@
|
||||
電路板定義
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#flashing-boards-that-use-sdio" class="md-nav__link">
|
||||
Flashing Boards that use SDIO
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Flashing Boards that use SDIO">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#sdio-programming-with-rpi-on-separate-power-supply" class="md-nav__link">
|
||||
SDIO Programming with RPi on Separate Power Supply
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#sdio-programming-with-rpi-on-the-same-power-supply" class="md-nav__link">
|
||||
SDIO Programming with RPi on the Same Power Supply
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#sdio-to-spi-pin-mapping" class="md-nav__link">
|
||||
SDIO to SPI Pin Mapping
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1350,20 +1418,21 @@ sudo service klipper start
|
||||
<h2 id="_2">高級用法<a class="headerlink" href="#_2" title="Permanent link">¶</a></h2>
|
||||
<p>上述命令假設您的 MCU 以預設波特率 250000 連線並且韌體位於<code>~/klipper/out/klipper.bin</code>。 <code>flash-sdcard.sh</code> 指令碼提供了更改這些預設值的選項。 所有選項都可以通過幫助畫面檢視:</p>
|
||||
<div class="highlight"><pre><span></span><code>./scripts/flash-sdcard.sh -h
|
||||
Klipper SD卡更新工具
|
||||
SD Card upload utility for Klipper
|
||||
|
||||
使用方法:flash_sdcard.sh [-h] [-l] [-b <baud>] [-f <firmware>]
|
||||
usage: flash_sdcard.sh [-h] [-l] [-c] [-b <baud>] [-f <firmware>]
|
||||
<device> <board>
|
||||
|
||||
位置參數:
|
||||
<device> 裝置串列埠
|
||||
<board> 主板型別
|
||||
positional arguments:
|
||||
<device> device serial port
|
||||
<board> board type
|
||||
|
||||
可選參數:
|
||||
-h 顯示這條資訊
|
||||
-l 列出可用主板
|
||||
-b <baud> 串列埠波特率(預設為250000)
|
||||
-f <firmware> klipper.bin檔案路徑
|
||||
optional arguments:
|
||||
-h show this message
|
||||
-l list available boards
|
||||
-c run flash check/verify only (skip upload)
|
||||
-b <baud> serial baud rate (default is 250000)
|
||||
-f <firmware> path to klipper.bin
|
||||
</code></pre></div>
|
||||
|
||||
<p>如果您的電路板使用以自定義波特率連線的韌體重新整理,則可以通過指定 <code>-b</code> 選項進行升級:</p>
|
||||
@@ -1375,11 +1444,12 @@ Klipper SD卡更新工具
|
||||
</code></pre></div>
|
||||
|
||||
<p>請注意,升級 MKS Robin E3 時,無需手動執行 <code>update_mks_robin.py</code> 並將產生的二進制檔案提供給 <code>flash-sdcard.sh</code>。 此過程在上傳過程中自動執行。</p>
|
||||
<p>The <code>-c</code> option is used to perform a check or verify-only operation to test if the board is running the specified firmware correctly. This option is primarily intended for cases where a manual power-cycle is necessary to complete the flashing procedure, such as with bootloaders that use SDIO mode instead of SPI to access their SD Cards. (See Caveats below) But, it can also be used anytime to verify if the code flashed into the board matches the version in your build folder on any supported board.</p>
|
||||
<h2 id="_3">注意事項<a class="headerlink" href="#_3" title="Permanent link">¶</a></h2>
|
||||
<ul>
|
||||
<li>如介紹中所述,此方法僅適用於升級韌體。 初始刷鞋程式必須按照適用於您的控制器板的說明手動完成。</li>
|
||||
<li>雖然可以重新整理更改序列波特率或連線介面(即:從 USB 到 UART)的構建,但驗證終將失敗,因為指令碼將無法重新連線到 MCU 以驗證目前版本。</li>
|
||||
<li>僅支援使用 SPI 進行 SD 卡通訊的板。 使用 SDIO 的板,例如 Flymaker Flyboard 和 MKS Robin Nano V1/V2,將無法工作。</li>
|
||||
<li>Only boards that use SPI for SD Card communication are supported. Boards that use SDIO, such as the Flymaker Flyboard and MKS Robin Nano V1/V2, will not work in SDIO mode. However, it's usually possible to flash such boards using Software SPI mode instead. But if the board's bootloader only uses SDIO mode to access the SD Card, a power-cycle of the board and SD Card will be necessary so that the mode can switch from SPI back to SDIO to complete reflashing. Such boards should be defined with <code>skip_verify</code> enabled to skip the verify step immediately after flashing. Then after the manual power-cycle, you can rerun the exact same <code>./scripts/flash-sdcard.sh</code> command, but add the <code>-c</code> option to complete the check/verify operation. See <a href="#flashing-boards-that-use-sdio">Flashing Boards that use SDIO</a> for examples.</li>
|
||||
</ul>
|
||||
<h2 id="_4">電路板定義<a class="headerlink" href="#_4" title="Permanent link">¶</a></h2>
|
||||
<p>大多數常見的電路板都應該可用,但如有必要,可以新增新的電路板定義。 板定義位於<code>~/klipper/scripts/spi_flash/board_defs.py</code>。 定義儲存在字典中,例如:</p>
|
||||
@@ -1399,13 +1469,14 @@ Klipper SD卡更新工具
|
||||
<li><code>spi_bus</code>:連線到 SD 卡的 SPI 匯流排。 這應該從電路板的原理圖中檢索。 此欄位是必需的。</li>
|
||||
<li><code>cs_pin</code>:連線到 SD 卡的晶片選擇引腳。 這應該從電路板原理圖中檢索。 此欄位是必需的。</li>
|
||||
<li><code>firmware_path</code>:SD 卡上韌體應傳輸的路徑。 預設是<code>firmware.bin</code>。</li>
|
||||
<li><code>current_firmware_path</code> 成功重新整理後重命名的韌體檔案所在的 SD 卡上的路徑。 預設是<code>firmware.cur</code>。</li>
|
||||
<li><code>current_firmware_path</code>: The path on the SD Card where the renamed firmware file is located after a successful flash. The default is <code>firmware.cur</code>.</li>
|
||||
<li><code>skip_verify</code>: This defines a boolean value which tells the scripts to skip the firmware verification step during the flashing process. The default is <code>False</code>. It can be set to <code>True</code> for boards that require a manual power-cycle to complete flashing. To verify the firmware afterward, run the script again with the <code>-c</code> option to perform the verification step. <a href="#caveats">See caveats with SDIO cards</a></li>
|
||||
</ul>
|
||||
<p>如果需要軟體 SPI,<code>spi_bus</code> 欄位應設定為 <code>swspi</code>,並應指定以下附加欄位:</p>
|
||||
<p>If software SPI is required, the <code>spi_bus</code> field should be set to <code>swspi</code> and the following additional field should be specified:</p>
|
||||
<ul>
|
||||
<li><code>spi_pins</code>:這應該是 3 個逗號分隔的引腳,以 <code>miso,mosi,sclk</code> 的格式連線到 SD 卡。</li>
|
||||
</ul>
|
||||
<p>軟體 SPI 是必要的應該是非常罕見的,通常只有設計錯誤的板才會需要它。 <code>btt-skr-pro</code> 板定義提供了一個示例。</p>
|
||||
<p>It should be exceedingly rare that Software SPI is necessary, typically only boards with design errors or boards that normally only support SDIO mode for their SD Card will require it. The <code>btt-skr-pro</code> board definition provides an example of the former, and the <code>btt-octopus-f446-v1</code> board definition provides an example of the latter.</p>
|
||||
<p>在建立新板定義之前,應檢查現有板定義是否滿足新板所需的標準。 如果是這種情況,可以指定<code>BOARD_ALIAS</code>。 例如,可以新增以下別名來指定「my-new-board」作為「generic-lpc1768」的別名:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="n">BOARD_ALIASES</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="o">...<</span><span class="n">原先的別名</span><span class="o">></span><span class="p">,</span>
|
||||
@@ -1414,6 +1485,116 @@ Klipper SD卡更新工具
|
||||
</code></pre></div>
|
||||
|
||||
<p>如果您需要一個新的電路板定義並且您對上述過程感到不舒服,建議您在 <a href="Contact.html#discord">Klipper Community Discord</a> 中請求一個。</p>
|
||||
<h2 id="flashing-boards-that-use-sdio">Flashing Boards that use SDIO<a class="headerlink" href="#flashing-boards-that-use-sdio" title="Permanent link">¶</a></h2>
|
||||
<p><a href="#caveats">As mentioned in the Caveats</a>, boards whose bootloader uses SDIO mode to access their SD Card require a power-cycle of the board, and specifically the SD Card itself, in order to switch from the SPI Mode used while writing the file to the SD Card back to SDIO mode for the bootloader to flash it into the board. These board definitions will use the <code>skip_verify</code> flag, which tells the flashing tool to stop after writing the firmware to the SD Card so that the board can be manually power-cycled and the verification step deferred until that's complete.</p>
|
||||
<p>There are two scenarios -- one with the RPi Host running on a separate power supply and the other when the RPi Host is running on the same power supply as the main board being flashed. The difference is whether or not it's necessary to also shutdown the RPi and then <code>ssh</code> again after the flashing is complete in order to do the verification step, or if the verification can be done immediately. Here's examples of the two scenarios:</p>
|
||||
<h3 id="sdio-programming-with-rpi-on-separate-power-supply">SDIO Programming with RPi on Separate Power Supply<a class="headerlink" href="#sdio-programming-with-rpi-on-separate-power-supply" title="Permanent link">¶</a></h3>
|
||||
<p>A typical session with the RPi on a Separate Power Supply looks like the following. You will, of course, need to use your proper device path and board name:</p>
|
||||
<div class="highlight"><pre><span></span><code>sudo service klipper stop
|
||||
cd ~/klipper
|
||||
git pull
|
||||
make clean
|
||||
make menuconfig
|
||||
make
|
||||
./scripts/flash-sdcard.sh /dev/ttyACM0 btt-octopus-f446-v1
|
||||
[[[manually power-cycle the printer board here when instructed]]]
|
||||
./scripts/flash-sdcard.sh -c /dev/ttyACM0 btt-octopus-f446-v1
|
||||
sudo service klipper start
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="sdio-programming-with-rpi-on-the-same-power-supply">SDIO Programming with RPi on the Same Power Supply<a class="headerlink" href="#sdio-programming-with-rpi-on-the-same-power-supply" title="Permanent link">¶</a></h3>
|
||||
<p>A typical session with the RPi on the Same Power Supply looks like the following. You will, of course, need to use your proper device path and board name:</p>
|
||||
<div class="highlight"><pre><span></span><code>sudo service klipper stop
|
||||
cd ~/klipper
|
||||
git pull
|
||||
make clean
|
||||
make menuconfig
|
||||
make
|
||||
./scripts/flash-sdcard.sh /dev/ttyACM0 btt-octopus-f446-v1
|
||||
sudo shutdown -h now
|
||||
[[[wait for the RPi to shutdown, then power-cycle and ssh again to the RPi when it restarts]]]
|
||||
sudo service klipper stop
|
||||
cd ~/klipper
|
||||
./scripts/flash-sdcard.sh -c /dev/ttyACM0 btt-octopus-f446-v1
|
||||
sudo service klipper start
|
||||
</code></pre></div>
|
||||
|
||||
<p>In this case, since the RPi Host is being restarted, which will restart the <code>klipper</code> service, it's necessary to stop <code>klipper</code> again before doing the verification step and restart it after verification is complete.</p>
|
||||
<h3 id="sdio-to-spi-pin-mapping">SDIO to SPI Pin Mapping<a class="headerlink" href="#sdio-to-spi-pin-mapping" title="Permanent link">¶</a></h3>
|
||||
<p>If your board's schematic uses SDIO for its SD Card, you can map the pins as described in the chart below to determine the compatible Software SPI pins to assign in the <code>board_defs.py</code> file:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center">SD Card Pin</th>
|
||||
<th align="center">Micro SD Card Pin</th>
|
||||
<th align="center">SDIO Pin Name</th>
|
||||
<th align="center">SPI Pin Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center">9</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">DATA2</td>
|
||||
<td align="center">None (PU)*</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">1</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">CD/DATA3</td>
|
||||
<td align="center">CS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">2</td>
|
||||
<td align="center">3</td>
|
||||
<td align="center">CMD</td>
|
||||
<td align="center">MOSI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">4</td>
|
||||
<td align="center">4</td>
|
||||
<td align="center">+3.3V (VDD)</td>
|
||||
<td align="center">+3.3V (VDD)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">5</td>
|
||||
<td align="center">5</td>
|
||||
<td align="center">CLK</td>
|
||||
<td align="center">SCLK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">3</td>
|
||||
<td align="center">6</td>
|
||||
<td align="center">GND (VSS)</td>
|
||||
<td align="center">GND (VSS)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">7</td>
|
||||
<td align="center">7</td>
|
||||
<td align="center">DATA0</td>
|
||||
<td align="center">MISO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">8</td>
|
||||
<td align="center">8</td>
|
||||
<td align="center">DATA1</td>
|
||||
<td align="center">None (PU)*</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">N/A</td>
|
||||
<td align="center">9</td>
|
||||
<td align="center">Card Detect (CD)</td>
|
||||
<td align="center">Card Detect (CD)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">6</td>
|
||||
<td align="center">10</td>
|
||||
<td align="center">GND</td>
|
||||
<td align="center">GND</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>* None (PU) indicates an unused pin with a pull-up resistor</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user