Modifications

Sauter à la navigation Sauter à la recherche
3 193 octets ajoutés ,  28 décembre 2017 à 18:00
Page créée avec « {{FEATHER-M0-EXPRESS-NAV}} == UF2 Bootloader Details == {{ambox|text=This is an information page for advanced users who are curious how we get code from your computer int... »
{{FEATHER-M0-EXPRESS-NAV}}

== UF2 Bootloader Details ==
{{ambox|text=This is an information page for advanced users who are curious how we get code from your computer into your Express board!}}

Adafruit Express and Gemma/Trinket M0 boards feature an improved bootloader that makes it easier than ever to flash different code onto the microcontroller. This bootloader makes it easy to switch between Microsoft MakeCode, CircuitPython and Arduino.

Instead of needing drivers or a separate program for flashing (say, {{fname|bossac}}, {{fname|jlink}} or {{fname|avrdude}}), one can simply '''drag a file onto a removable drive'''.

The format of the file is a little special. Due to 'operating system woes' you cannot just drag a binary or hex file (trust us, we tried it, it isn't cross-platform compatible). Instead, the format of the file has extra information to help the bootloader know where the data goes. The format is called UF2 (USB Flashing Format). Microsoft MakeCode generates UF2s for flashing and CircuitPython releases are also available as UF2. [https://github.com/Microsoft/uf2 You can also create your own UF2s from binary files using uf2tool, available here].

The bootloader is '''also BOSSA compatible''', so it can be used with the Arduino IDE which expects a BOSSA bootloader on ATSAMD-based boards

For more information about UF2, [https://makecode.com/blog/one-chip-to-flash-them-all you can read a bunch more at the MakeCode blog], then [https://github.com/Microsoft/uf2 check out the UF2 file format specification]. Visit [https://github.com/adafruit/uf2-samd21 Adafruit's fork of the Microsoft UF2-samd bootloader GitHub repository] for source code and r[https://github.com/adafruit/uf2-samd21/releases/latest eleases of pre-built bootloaders].

{{ambox|text=The bootloader is not needed when changing your CircuitPython code. Its only needed when upgrading the CircuitPython core or changing between CircuitPython, Arduino and Microsoft MakeCode.}}

== Activer le mode Booloader ==


The first step to loading new code onto your board is triggering the bootloader. It is easily done by double tapping the reset button. Once the bootloader is active you will see the small red LED fade in and out and a new drive will appear on your computer with a name ending in '''BOOT'''. For example, feathers show up as '''FEATHERBOOT''', while the new CircuitPlayground shows up as '''CPLAYBOOT''', Trinket M0 will show up as '''TRINKETBOOT''', and Gemma M0 will show up as '''GEMMABOOT'''

Furthermore, when the bootloader is active, it will change the color of one or more onboard neopixels to indicate the connection status, red for disconnected and green for connected. If the board is plugged in but still showing that its disconnected, try a different USB cable. Some cables only provide power with no communication.

For example, here is a Feather M0 Express running a colorful Neopixel swirl. When the reset button is double clicked (about half second between each click) the NeoPixel will stay green to let you know the bootloader is active. When the reset button is clicked once, the 'user program' (NeoPixel color swirl) restarts.


{{FEATHER-M0-EXPRESS-TRAILER}}
29 918

modifications

Menu de navigation