circuitpython-org/_includes/download/board.html

379 lines
19 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 %}
{% assign bootloader_instructions = page.bootloader_nonstandard_entry_instructions %}
{% 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 }}.
<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>
{% if page.family == 'esp32s2' or page.family == 'esp32s3' %}
<p>
<strong>On Espressif ESP32-S2 and ESP32-S3 boards with 4MB flash,
CircuitPython 10.0.0-beta.0 and later require TinyUF2 bootloader version 0.33.0 or later.
Older TinyUF2 bootloaders don't provide enough room for the firmware and cannot load it.
See the
<a href="https://github.com/adafruit/circuitpython/releases/tag/{{ version.version }}">Release Notes</a>
for more details, and see <em>Update UF2 Bootloader</em> below.</strong>
</p>
{% endif %}
<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>
<strong>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 <em>Update UF2 Bootloader</em> below.</strong>
</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">
{% assign reverse_extensions = version.extensions | reverse %}
{% for extension in reverse_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' or page.family == 'esp32c6' %}
<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 page.download_instructions != nil and page.download_instructions != "" %}
<a class="install-instructions" target="_blank" href="{{ page.download_instructions }}">Learn how to install CircuitPython on this board <i class="fas fa-external-link-alt" aria-hidden="true"></i></a>
{% endif %}
{% if version.modules %}
<details>
<summary>Modules included in this download</summary>
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
{% for module_name in version.modules %}
{% if module_name contains "." %}
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{ module_name | split: '.' | first }}/#{{ module_name }}">
{% else %}
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{ module_name }}">
{% endif %}
{{ module_name }}</a>
{% endfor %}
</span>
</details>
{% 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 %}">
{% for module_name in version.frozen_libraries %}
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/projects/{{ module_name | split: 'adafruit_' | last }}">
{{ module_name }}</a>{% unless forloop.last %}, {% endunless %}
{% endfor %}
</span>
</p>
{% endif %}
{% if page.features %}
<p>Features:
<span class="features-list">
{% for feature in page.features %}
<a class="library-link" href="/downloads?features={{ feature }}">{{feature}}</a>{% unless forloop.last %}, {% endunless %}
{% endfor %}
</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 == '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.
</strong>
The bootloader itself is not CircuitPython.
On Espressif boards, the UF2 bootloader is called <em>TinyUF2</em>.
If the TinyUF2 bootloader is installed, you can check its version by looking in
the <strong>INFO_UF2.TXT</strong> file when the <strong>BOOT</strong> drive is visible
(<strong>FTHRS2BOOT</strong>, <strong>MAGTAGBOOT</strong>, <strong>HOUSEBOOT</strong>, etc.)
</p>
<p>
In general, it is not necessary to update TinyUF2 at every version change.
You can read the <a href="https://github.com/adafruit/tinyuf2/releases">release notes on GitHub</a> to see what has been changed.
Update if you've been told about a necessary change or a bug fix.
</p>
<p><strong><em>Note:</em></strong>
<em>CircuitPython 10 and later, on Espressif boards with 4MB flash, requires TinyUF2 0.33.0 or later.
The flash partition layout has changed (<a href="https://learn.adafruit.com/adafruit-esp32-s3-feather/update-tinyuf2-bootloader-for-circuitpython-10-4mb-boards-only">details</a>).</em>
</p>
<p>
If TinyUF2 has never been installed on the board,
or it was removed by erasing or overwriting the flash,
it must be installed in order to flash <strong>.uf2</strong> files onto the board.
But you don't need the TinyUF2 bootloader to upload <strong>.bin</strong> files. They can be uploaded using the
built-in ROM bootloader, with the
<a href="https://adafruit.github.io/Adafruit_WebSerial_ESPTool/">Adafruit WebSerial ESPTool</a>
or <strong>esptool.py</strong>.
</p>
<p><strong><em>Warning:</em></strong>
<em>Installing the TinyUF2 bootloader will erase everything that was previously on the board.
Save any files in <strong>CIRCUITPY</strong> for which you don't have backups.</em>
</p>
<p>There are several ways to install the TinyUF2 bootloader on your board.
Check to see if your board's manufacturer provides specific instructions.
For Adafruit boards, consult the <em>Factory Reset</em> page
in the Learn Guide for your particular board (<a href="https://learn.adafruit.com/adafruit-esp32-s3-feather/factory-reset">example</a>).
</p>
<p>The easiest way to install TinyUF2 is to use the <strong>OPEN INSTALLER</strong> button
(see above, in the CiruitPython sections).
You can also use the <a href="https://adafruit.github.io/Adafruit_WebSerial_ESPTool/">Adafruit WebSerial ESPTool</a>, or <strong>esptool.py</strong>,
as described in the Factory Reset page.
</p>
<li>If you are not using the <strong>OPEN INSTALLER</strong> button,
download the <strong>combined.bin</strong> file using the <strong>DOWNLOAD BOOTLOADER combined.bin</strong> button below.
(If you use <strong>OPEN INSTALLER</strong>, it will do the download itself.)</li>
<li>First, place board in ROM 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 <em>hold</em> the BOOT button (sometimes marked "B0").</li>
<li>Press and <em>release</em> the RESET button (sometimes marked "RST").</li>
<li>Release the BOOT button. This starts the ROM bootloader.</li>
</ul>
</li>
<li>Then proceed with <strong>OPEN INSTALLER</strong> or one of the other tools.</li>
<li>After the TinyUF2 firmware installation is complete, press the RESET button on the board.
A new drive <strong>BOOT</strong> drive should be visible in your file browser.</li>
</ul>
</li>
</ul>
{% if bootloader_instructions == nil %}
<p>
After installing TinyUF2, enter the UF2 bootloader by double-clicking the RESET button.
On boards with an RGB status LED, you usually 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>
{% else %}
<p>{{ bootloader_instructions }}</p>
{% endif %}
<p>
If you are updating TinyUF2, look at <strong>INFO_UF2.TXT</strong> to verify the new version of TinyUF2,
by checking the version number.
Then you will need to copy the CircuitPython<strong>.uf2</strong> file to the <strong>BOOT</strong> drive.
</p>
<div>
<a class="download-button" href="https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/{{ bootloader_id }}/tinyuf2-{{ bootloader_id }}-{{ bootloader_version }}-combined.bin">DOWNLOAD BOOTLOADER combined.bin<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 <strong>INFO_UF2.TXT</strong> file when the <strong>BOOT</strong> drive is visible (<strong>FEATHERBOOT</strong>, <strong>CPLAYBOOT</strong>, 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>
<strong>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 <strong>INFO_UF2.TXT</strong> when the <strong>BOOT</strong> drive is present.
</strong>
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 <strong>INFO_UF2.TXT</strong> 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 <strong>CIRCUITPY</strong>, just in case.
Then double-click the reset button to show the <strong>BOOT</strong> drive.
Drag the <strong>update-bootloader</strong> <strong>.uf2</strong> file to the <strong>BOOT</strong> drive.
Wait a few tens of seconds for the bootloader to update; the <strong>BOOT</strong> drive will reappear.
After you update, check <strong>INFO_UF2.TXT</strong> 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 %}