Deploying to gh-pages from @ Klipper3d/klipper@7527e57e5a 🚀
This commit is contained in:
@@ -1140,6 +1140,40 @@
|
||||
Definizioni della scheda
|
||||
</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 @@
|
||||
Definizioni della scheda
|
||||
</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>
|
||||
@@ -1352,7 +1420,7 @@ sudo service klipper start
|
||||
<div class="highlight"><pre><span></span><code>./scripts/flash-sdcard.sh -h
|
||||
SD Card upload utility for Klipper
|
||||
|
||||
usage: flash_sdcard.sh [-h] [-l] [-b <baud>] [-f <firmware>]
|
||||
usage: flash_sdcard.sh [-h] [-l] [-c] [-b <baud>] [-f <firmware>]
|
||||
<device> <board>
|
||||
|
||||
positional arguments:
|
||||
@@ -1362,6 +1430,7 @@ positional arguments:
|
||||
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>
|
||||
@@ -1375,11 +1444,12 @@ optional arguments:
|
||||
</code></pre></div>
|
||||
|
||||
<p>Nota che quando si aggiorna un MKS Robin E3 non è necessario eseguire manualmente <code>update_mks_robin.py</code> e fornire il binario risultante a <code>flash-sdcard.sh</code>. Questa procedura è automatizzata durante il processo di caricamento.</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="avvertenze">Avvertenze<a class="headerlink" href="#avvertenze" title="Permanent link">¶</a></h2>
|
||||
<ul>
|
||||
<li>Come accennato nell'introduzione, questo metodo funziona solo per l'aggiornamento del firmware. La procedura di flashing iniziale deve essere eseguita manualmente secondo le istruzioni che si applicano alla scheda del controller.</li>
|
||||
<li>Sebbene sia possibile eseguire il flashing di una build che modifica il baud seriale o l'interfaccia di connessione (ad esempio: da USB a UART), la verifica avrà sempre esito negativo poiché lo script non sarà in grado di riconnettersi all'MCU per verificare la versione corrente.</li>
|
||||
<li>Sono supportate solo le schede che utilizzano SPI per la comunicazione con scheda SD. Le schede che utilizzano SDIO, come Flymaker Flyboard e MKS Robin Nano V1/V2, non funzioneranno.</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="definizioni-della-scheda">Definizioni della scheda<a class="headerlink" href="#definizioni-della-scheda" title="Permanent link">¶</a></h2>
|
||||
<p>Dovrebbero essere disponibili le schede più comuni, tuttavia è possibile aggiungere una nuova definizione di scheda, se necessario. Le definizioni delle schede si trovano in <code>~/klipper/scripts/spi_flash/board_defs.py</code>. Le definizioni sono memorizzate nel dizionario, ad esempio:</p>
|
||||
@@ -1399,13 +1469,14 @@ optional arguments:
|
||||
<li><code>spi_bus</code>: il bus SPI collegato alla scheda SD. Questo dovrebbe essere recuperato dallo schema della scheda. Questo campo è obbligatorio.</li>
|
||||
<li><code>cs_pin</code>: il pin di selezione del chip collegato alla scheda SD. Questo dovrebbe essere recuperato dallo schema della scheda. Questo campo è obbligatorio.</li>
|
||||
<li><code>firmware_path</code>: il percorso sulla scheda SD in cui trasferire il firmware. L'impostazione predefinita è <code>firmware.bin</code>.</li>
|
||||
<li><code>current_firmware_path</code> Il percorso sulla scheda SD in cui si trova il file del firmware rinominato dopo un flash riuscito. L'impostazione predefinita è "firmware.cur".</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>Se è richiesto il software SPI, il campo <code>spi_bus</code> deve essere impostato su <code>swspi</code> e deve essere specificato il seguente campo aggiuntivo:</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>spi_pins<code>: Dovrebbero essere 3 pin separati da virgola che sono collegati alla scheda SD nel formato</code>miso,mosi,sclk`.</li>
|
||||
</ul>
|
||||
<p>Dovrebbe essere estremamente raro che sia necessario Software SPI, in genere solo le schede con errori di progettazione lo richiederanno. La definizione della scheda <code>btt-skr-pro</code> fornisce un esempio.</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>Prima di creare una nuova definizione di scheda, è necessario verificare se una definizione di scheda esistente soddisfa i criteri necessari per la nuova scheda. Se questo è il caso, può essere specificato un <code>BOARD_ALIAS</code>. Ad esempio, è possibile aggiungere il seguente alias per specificare <code>my-new-board</code> come alias per <code>generic-lpc1768</code>:</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">previous</span> <span class="n">aliases</span><span class="o">></span><span class="p">,</span>
|
||||
@@ -1414,6 +1485,116 @@ optional arguments:
|
||||
</code></pre></div>
|
||||
|
||||
<p>Se hai bisogno di una nuova definizione di scheda e ti senti a disagio con la procedura descritta sopra, ti consigliamo di rivolgerti a <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