circuitpython-org/_includes/download/board.html
2023-12-08 11:02:28 -08:00

332 lines
16 KiB
HTML

{% assign board_id = page.board_id %}
{% if page.board_alias != nil %}
{% assign board_id = page.board_alias %}
{% endif %}
{% assign board = site.data.files | where: "id", board_id %}
{% if board[0] %}
{% assign stable = board[0].versions | where: "stable", true | sort: "version" %}
{% assign unstable = board[0].versions | where: "stable", false | sort: "version" %}
{% assign bootloaders = site.data.bootloaders.bootloaders %}
{% assign bootloader_version = bootloaders[page.family].version %}
{% assign bootloader_id = page.bootloader_id %}
{% assign releases = stable | concat: unstable %}
{% capture download_url %}https://downloads.circuitpython.org/bin/{{ board_id}}{% endcapture %}
{% for version in releases %}
<div class="section {% if version.stable %}stable{% else %}unstable{% endif %}">
<h3>CircuitPython {{ version.version }}</h3>
{% if version.stable %}
<p>
This is the latest <strong>stable</strong> release of CircuitPython that will work with the {{ page.name }}.
</p>
<p>
<strong>Use this release</strong> if you are new to CircuitPython.
</p>
{% else %}
<p>
This is the latest development release of CircuitPython that will work with the {{ page.name }}.
</p>
<p>
<strong>Alpha</strong> development releases are early releases.
They are unfinished, are likely to have bugs, and the features they provide may change.
<strong>Beta</strong> releases may have some bugs and unfinished features,
but should be suitable for many uses.
A <strong>Release Candidate (rc)</strong> release is considered done and
will become the next stable release, assuming no further issues are found.
</p>
<p>
Please try alpha, beta, and rc releases if you are able.
Your testing is invaluable: it helps us uncover and find issues quickly.
</p>
{% endif %}
{% if page.family == 'nrf52840' %}
<p>
<b>On nRF boards, CircuitPython 8.2.0 and later require UF2 bootloader version 0.6.1 or later.
Older bootloaders cannot load the firmware. See <i>Update UF2 Bootloader</i> below.</b>
</p>
{% endif %}
<p>
<a href="https://github.com/adafruit/circuitpython/releases/tag/{{ version.version }}">Release Notes for {{ version.version }}</a>
</p>
<div class="download-details">
{% comment %}
Create a list of language codes and names so it can be sorted.
Jumping through hoops so that the new lines and spaces from the case are removed at the start of the names.
Finally the array is sorted, which is possible because each entry is now guaranteed to start with the language name, no whitespace.
Whitespaces still need to be filtered before outputing the strings.
{% endcomment %}
{% capture languages_with_names %}
{% for language in version.languages %}
{% case language %}
{% when 'cs' %}
CZECH
{% when 'de_DE' %}
GERMAN
{% when 'en_GB' %}
ENGLISH (UK)
{% when 'en_US' %}
ENGLISH (US)
{% when 'en_x_pirate' %}
PIRATE (ENGLISH)
{% when 'es' %}
SPANISH
{% when 'fil' %}
FILIPINO
{% when 'fr' %}
FRENCH
{% when 'el' %}
GREEK
{% when 'hi' %}
HINDI
{% when 'ID' %}
INDONESIAN
{% when 'it_IT' %}
ITALIAN
{% when 'ja' %}
JAPANESE
{% when 'ko' %}
KOREAN
{% when 'nl' %}
DUTCH
{% when 'pl' %}
POLISH
{% when 'pt_BR' %}
PORTUGUESE (BRAZILIAN)
{% when 'ru' %}
RUSSIAN
{% when 'sv' %}
SWEDISH
{% when 'tr' %}
TURKISH
{% when 'zh_Latn_pinyin' %}
CHINESE (PINYIN)
{% else %}
{{ file[0] | upcase }}
{% endcase %}
::{{ language }},
{% endfor %}
{% endcapture %}
{% assign languages_with_names_array = languages_with_names | split: "," %}
{% capture languages_with_names_strip %}{% for language_info in languages_with_names_array %}{{ language_info | strip }},{% endfor %}{% endcapture %}
{% assign languages_sorted = languages_with_names_strip | split: "," | sort_natural %}
<label class="language-select">
<select>
{% for language_info in languages_sorted %}
{% assign language_split = language_info | split: "::" %}
{% assign language_name = language_split[0] | strip %}
{% assign language_code = language_split[1] | strip %}
{% if language_name == "" %}
{% comment %} Unnecessary ? {% endcomment %}
{% continue %}
{% endif %}
{% capture no_extension %}{{ download_url }}/{{ language_code }}/adafruit-circuitpython-{{ board_id }}-{{ language_code }}-{{ version.version }}{% endcapture %}
{% capture files %}{% for ext in version.extensions %}{{ no_extension }}.{{ext}}{% if forloop.last == false %},{% endif %}{% endfor %}{% endcapture %}
<option value="{{ files }}"
data-files="{{ files }}"
data-locale="{{ language_code | replace: '_', '-' }}"
{% if language_code == "en_US" %}selected{% endif %}>
{{ language_name }}
</option>
{% endfor %}
</select>
</label>
<div class="download-buttons">
{% for extension in version.extensions %}
<a class="download-button {% if version.stable %}stable{% else %}unstable{% endif %} {{ extension }}" href="{{ download_url }}/en_US/adafruit-circuitpython-{{ board_id }}-en_US-{{ version.version }}.{{ extension }}">DOWNLOAD .{{ extension | upcase }} NOW <i class="fas fa-download" aria-hidden="true"></i></a>
{% endfor %}
{% if page.family == 'esp32s2' or page.family == 'esp32c3' or page.family == 'esp32s3' or page.family == 'esp32' %}
<button is="cp-install-button" class="installer-button" boardid="{{ board_id }}"
{% for extension in version.extensions %}
{{ extension }}file="{{ download_url }}/en_US/adafruit-circuitpython-{{ board_id }}-en_US-{{ version.version }}.{{ extension }}"
{% endfor %}
version="{{ version.version }}"
>OPEN INSTALLER <i class="fas fa-magic" aria-hidden="true"></i></button>
{% endif %}
</div>
</div>
{% if version.modules %}
<p>
Built-in modules available:
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">{{ version.modules | join: ', ' }}</span>
</p>
{% endif %}
{% if version.frozen_libraries and version.frozen_libraries.size != 0 %}
<p>
Included frozen<sup><a href="https://docs.circuitpython.org/en/latest/docs/reference/glossary.html?highlight=frozen#term-frozen-module" title="What is a frozen module">(?)</a></sup> modules:
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">{{ version.frozen_libraries | join: ', ' }}</span>
</p>
{% endif %}
</div>
{% endfor %}
{% endif %}
<div class="section unrecommended">
<h3>Absolute Newest</h3>
<p>
Every time we commit new code to CircuitPython we automatically
build binaries for each board and language. The binaries are
stored on Amazon S3, organized by board, and then by
language. These releases are even newer than the development release listed above.
Try them if you want the absolute latest and are
feeling daring or want to see if a problem has been fixed.
</p>
<div>
<a class="download-button-unrecommended" href="https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/{{ board_id }}/">BROWSE S3<i class="fas fa-arrow-circle-right" aria-hidden="true"></i></a>
<div class="clear"></div>
</div>
</div>
<div class="section unrecommended">
<h3>Previous Versions of CircuitPython</h3>
<p>
All previous releases of CircuitPython are available for download from Amazon S3 through the button below.
For very old releases, look in the <strong>OLD/</strong> folder for each board.
Release notes for each release are available at GitHub button below.
</p>
<p>
Older releases are useful for testing if you something appears to be broken in a newer release
but used to work,
or if you have older code that depends on features only available in an older release.
Otherwise we recommend using the latest stable release.
</p>
<div class="previous-versions-buttons">
<a class="download-button-unrecommended" href="https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/{{ board_id }}/">BROWSE S3<i class="fas fa-arrow-circle-right" aria-hidden="true"></i></a>
<a class="download-button-unrecommended" href="https://github.com/adafruit/circuitpython/releases">BROWSE GITHUB<i class="fab fa-github" aria-hidden="true"></i></a>
</div>
</div>
{% comment %}
Only output bootloader information if we have complete info about a board, and we know the latest
version of its bootloader family.
By the way, boolean operation precedence is right to left! (yeesh)
{% endcomment %}
{% if bootloader_version and bootloader_id %}
{% if page.family == 'esp32s2' or page.family == 'esp32c3' or page.family == 'esp32s3' %}
<div class="section unrecommended">
<h3>Install, Repair, or Update UF2 Bootloader</h3>
<p>
Latest version: {{ bootloader_version }}
</p>
<p>
<strong>The UF2 bootloader allows you to load CircuitPython, MakeCode, and Arduino programs.
The bootloader is not CircuitPython.</strong>
If a UF2 bootloader is installed, you can check its version by looking in
the <b>INFO_UF2.TXT</b> file when the <b>BOOT</b> drive is visible
(<b>FTHRS2BOOT</b>, <b>MAGTAGBOOT</b>, <b>HOUSEBOOT</b>, etc.)
</p>
<p>
It is not necessary to reinstall a UF2 bootloader you unless a <b>BOOT</b> drive is not visible
when in UF2 bootloader mode, or you know of a problem with your current UF2 bootloader.
</p>
<p>
If a UF2 bootloader has never been installed on the board, or the UF2 bootloader was removed by erasing or overwriting the flash, the UF2 bootloader must be installed in order to flash <b>.uf2</b> files onto the board. <b>.bin</b> files can be uploaded without a UF2 bootloader, using the
<a href="https://adafruit.github.io/Adafruit_WebSerial_ESPTool/">ESP Web Flasher</a>
or <b>esptool.py</b>.
</p>
<p>
<em>Note: <b>update.uf2</b> files are not currently working on ESP32-S2 or ESP32-S3 boards.</em>
</p>
<p><strong><em>Important</em></strong>:
<em>this will erase previously flashed firmware and sketches from the board,
but needs to be perfomed only once.</em>
</p>
<p><em>The instructions here are general.
We recommend you consult the manufacturer's board documentation for detailed
instructions, which may be different.</em>
</p>
<ul>
<li>Unzip to find the file <b>combined.bin</b>.</li>
<li>Place board in bootloader mode:
<ul>
<li>Plug board into a USB port on your computer using a data/sync cable. Make sure it is the only board plugged in, and that a charge-only cable is not being used.</li>
<li>Press and <strong>hold down</strong> the <b>BOOT</b> or <b>0</b> button.</li>
<li>Press and <strong>release</strong> the <b>RESET</b> or <b>RST</b> button.</li>
<li>Release the <b>BOOT</b> button.</li>
</ul>
</li>
<li>Upload <b>combined.bin</b> (Google Chrome 89 or newer):
<ul>
<li>Open <a href="https://adafruit.github.io/Adafruit_WebSerial_ESPTool/">ESP Web Flasher</a> in a new window/tab.</li>
<li>Select <b>460800 Baud</b> from the pull-down menu (top-right).</li>
<li>Click <b>Connect</b> (top-right).</li>
<li>Select the COM or Serial port from the pop-up window.</li>
<li>After successful connection, click <b>Erase</b>.</li>
<li>After successful erase, click any <b>Choose a file...</b>, then locate and select the <b>combined.bin</b> file unzipped earlier.</li>
<li>After successfully choosing <b>combined.bin</b>, click <b>Program</b>.</li>
<li>After the TinyUF2 firmware update is complete, press the <b>RESET</b> button on the board.
A new drive <b>BOOT</b> should be visible in your file browser.</li>
</ul>
</li>
</ul>
<p>
After installing the UF2 bootloader, enter the bootloader by double-clicking the reset button.
On boards with an RGB status LED, tap reset once, wait for the LED to turn purple, and tap
again before the purple goes away. On other boards, consult the board documentation.
</p>
<p>
After you update, check <b>INFO_UF2.TXT</b> to verify that the bootloader version has been updated.
Then you will need to load or reload CircuitPython using the <b>.uf2</b> file.
</p>
<div>
<a class="download-button" href="https://github.com/adafruit/tinyuf2/releases/download/{{ bootloader_version }}/tinyuf2-{{ bootloader_id }}-{{ bootloader_version }}.zip">DOWNLOAD BOOTLOADER ZIP<i class="fas fa-download" aria-hidden="true"></i></a>
</div>
</div>
{% else %}
<div class="section unrecommended">
<h3>Update UF2 Bootloader</h3>
<p>
Latest version: {{ bootloader_version }}
</p>
<p>
<strong>The bootloader allows you to load CircuitPython, MakeCode, and Arduino programs.
The bootloader is not CircuitPython.</strong>
You can check the current version of your bootloader by looking in
the <b>INFO_UF2.TXT</b> file when the <b>BOOT</b> drive is visible (<b>FEATHERBOOT</b>, <b>CPLAYBOOT</b>, etc.).
</p>
<p>
It is not necessary to update your bootloader if it is working fine.
Read the release notes on GitHub to see what has been changed.
In general, we recommend you not update the bootloader unless you know there is a problem with it
or a support person has asked you to try updating it.
</p>
{% if page.family == 'nrf52840' %}
<p>
<b>On nRF boards, CircuitPython 8.2.0 and later require UF2 bootloader version 0.6.1 or later.
Older bootloaders cannot load the firmware.
To check the version of your board's bootloader,
look at <i>INFO_UF2.TXT</i> when the <i>BOOT</i> drive is present.
</b>
To update the bootloader, refer to the "Update Bootloader" page in the guide for
your board, or start with
<a href="https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/update-bootloader">this page</a>.
</p>
<p>
After you update, check <b>INFO_UF2.TXT</b> to verify that the bootloader version has been updated.
Then you will need to reload CircuitPython.
</p>
<div>
<a class="download-button-unrecommended" href="https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/tag/{{ bootloader_version }}">BROWSE ON GITHUB<i class="fab fa-github" aria-hidden="true"></i></a>
</div>
{% endif %}
{% if page.family == 'atmel-samd' %}
<p>
To update, first save the contents of <b>CIRCUITPY</b>, just in case.
Then double-click the reset button to show the <b>BOOT</b> drive.
Drag the <b>update-bootloader</b> <b>.uf2</b> file to the <b>BOOT</b> drive.
Wait a few tens of seconds for the bootloader to update; the <b>BOOT</b> drive will reappear.
After you update, check <b>INFO_UF2.TXT</b> to verify that the bootloader version has been updated.
Then you will need to reload CircuitPython.
</p>
<p>
<a class="download-button" href="https://github.com/adafruit/uf2-samdx1/releases/download/{{ bootloader_version }}/update-bootloader-{{ bootloader_id }}-{{ bootloader_version }}.uf2">DOWNLOAD UPDATER UF2<i class="fas fa-download" aria-hidden="true"></i></a>
</p>
<div>
<a class="download-button-unrecommended" href="https://github.com/adafruit/uf2-samdx1/releases/tag/{{ bootloader_version }}">BROWSE ON GITHUB<i class="fab fa-github" aria-hidden="true"></i></a>
</div>
{% endif %}
</div>
{% endif %}
{% endif %}