Modifications

Sauter à la navigation Sauter à la recherche
7 017 octets ajoutés ,  28 décembre 2017 à 20:40
Ligne 24 : Ligne 24 :     
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.
 
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.
 +
 
{{ADFImage|FEATHER-M0-Bootloader-UF2-01.gif}}
 
{{ADFImage|FEATHER-M0-Bootloader-UF2-01.gif}}
    +
If the bootloader couldn't start, you will get a red NeoPixel LED.
 +
 +
That could mean that your USB cable is no good, it isn't connected to a computer, or maybe the drivers could not enumerate. Try a new USB cable first. Then try another port on your computer!
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-02.gif}}
 +
 +
Once the bootloader is running, check your computer. You should see a USB Disk drive...
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-03.png}}
 +
 +
Once the bootloader is successfully connected you can open the drive and browse the virtual filesystem. This isn't the same filesystem as you use with CircuitPython or Arduino. It should have three files:
 +
 +
* '''CURRENT.UF2''' - The current contents of the microcontroller flash.
 +
* '''INDEX.HTM''' - Links to Microsoft MakeCode.
 +
* '''INFO_UF2.TXT''' - Includes bootloader version info. Please include it on bug reports.
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-04.png}}
 +
 +
== Utiliser le Bootloader Mass Storage ==
 +
To flash something new, simply drag any UF2 onto the drive. After the file is finished copying, the bootloader will automatically restart. This usually causes a warning about an unsafe eject of the drive. However, its not a problem. The bootloader knows when everything is copied successfully.
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-10.png}}
 +
 +
You may get an alert from the OS that the file is being copied without it's properties. You can just click '''Yes''' .
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-11.png}}
 +
 +
You may also get get a complaint that the drive was ejected without warning. Don't worry about this. The drive only ejects once the bootloader has verified and completed the process of writing the new code
 +
 +
== Utiliser le Bootloader BOSSA ==
 +
As mentioned before, the bootloader is also compatible with BOSSA, which is the standard method of updating boards when in the Arduino IDE. It is a command-line tool that can be used in any operating system. We won't cover the full use of the '''bossac''' tool, suffice to say it can do quite a bit! More information is available at [http://www.shumatech.com/web/products/bossa ShumaTech].
 +
 +
=== Pilotes pour Windows 7 ===
 +
If you are running Windows 7 (or, goodness, something earlier?) You will need a Serial Port driver file. Windows 10 users do not need this so skip this step.
 +
 +
You can download our full driver package here:
 +
 +
{{download-box|Télécharger le dernier installeur de pilote Adafruit|https://github.com/adafruit/Adafruit_Windows_Drivers/releases/download/2.0.0.0/adafruit_drivers_2.0.0.0.exe}}
 +
 +
Download and run the installer. We recommend just selecting all the serial port drivers available (no harm to do so) and installing them.
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-20.png}}
 +
 +
Verifying Serial Port in Device Manager
 +
 +
If you're running Windows, its a good idea to verify the device showed up. Open your Device Manager from the control panel and look under '''Ports (COM & LPT)''' for a device called '''Feather M0''' or '''Circuit Playground''' or whatever!
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-21.png}}
 +
 +
If you see something like this, it means you did not install the drivers. Go back and try again, then remove and re-plug the USB cable for your board
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-22.png}}
 +
 +
=== Running bossac on the command line ===
 +
If you are using the Arduino IDE, this step is not required. But sometimes you want to read/write custom binary files, say for loading CircuitPython or your own code. We recommend using bossac v 1.7.0 (or greater), which has been tested. The Arduino branch is most recommended.
 +
 +
You can download the latest builds here. The {{fname|mingw32}} version is for Windows, {{fname|apple-darwin}} for Mac OSX and various {{fname|linux}} options for Linux. Once downloaded, extract the files from the zip and open the command line to the directory with {{fname|bossac}}
 +
 +
For example here's the command line you probably want to run:
 +
 +
<nowiki>bossac -e -w -v -R ~/Downloads/adafruit-circuitpython-feather_m0_express-0.9.3.bin</nowiki>
 +
 +
This will {{fname|-e}}rase the chip, {{fname|-w}}rite the given file, {{fname|-v}}erify the write and {{fname|-R}}eset the board. After reset, CircuitPython should be running. Express boards may cause a warning of an early eject of a USB drive but just ignore it. Nothing important was being written to the drive. A hard power-reset is also  recommended after '''bossac''', just in case.
 +
 +
{{ADFImage|FEATHER-M0-Bootloader-UF2-23.png}}
 +
 +
== Faire une mise-à-jour du bootloader ==
 +
The UF2 bootloader is a new bootloader, and while we've done a ton of testing, it may contain bugs. Usually these bugs effect reliability rather than fully preventing the bootloader from working. If the bootloader is flaky then you can try updating the bootloader itself to potentially improve reliability.
 +
 +
Updating the bootloader is as easy as flashing CircuitPython, Arduino or MakeCode. Simply enter the bootloader as above and then drag the update bootloader uf2 file below. This uf2 contains a program which will unlock the bootloader section, update the bootloader, and re-lock it. It will overwrite your existing code such as CircuitPython or Arduino so make sure everything is backed up!
 +
 +
After the file is copied over, the bootloader will be updated and appear again. The '''INFO_UF2.TXT''' file should show the newer version number inside.
 +
 +
For example:
 +
<nowiki>UF2 Bootloader v1.20.0 SFHR
 +
Model: Adafruit Feather M0
 +
Board-ID: SAMD21G18A-Feather-v0</nowiki>
 +
 +
Lastly, reload your code from Arduino or MakeCode or flash the latest CircuitPython core.
 +
 +
The latest updaters for various boards:
 +
 +
{{download-box|Circuit Playground Express v1.23 update-bootloader.uf2|https://cdn-learn.adafruit.com/assets/assets/000/045/717/original/update-bootloader.uf2?1503523524}}
 +
 +
{{download-box|Feather M0 Express v1.23 update-bootloader.uf2|https://cdn-learn.adafruit.com/assets/assets/000/045/718/original/update-bootloader.uf2?1503523551}}
 +
 +
{{download-box|Metro M0 Express v1.23 update-bootloader.uf2|https://cdn-learn.adafruit.com/assets/assets/000/045/719/original/update-bootloader.uf2?1503523594}}
 +
 +
{{download-box|Gemma M0 v1.23 update-bootloader.uf2|https://cdn-learn.adafruit.com/assets/assets/000/045/720/original/update-bootloader.uf2?1503523609}}
 +
 +
{{download-box|Trinket M0 v1.23 update-bootloader.uf2|https://cdn-learn.adafruit.com/assets/assets/000/045/721/original/update-bootloader.uf2?1503523622}}
 +
 +
== Eliminer les popups Windows ==
 +
If you do a lot of development on Windows with the UF2 bootloader, you may get annoyed by the constant "Hey you inserted a drive what do you want to do" pop-ups.
 +
 +
<small>Toutes les images ci-dessous sont créditées à [http://www.adafruit.com Adafruit Industries] - All images here under are credited to [http://www.adafruit.com Adafruit Industries]</small>
 +
 +
{{asm-begin}}
 +
 +
{{asm-row|img=part-item-pi.jpg}}
 +
{{asm-text}} Le texte de description ici
 +
 +
{{asm-row|img=afficheur-lcd-afficheur.jpg}}
 +
{{asm-img|img=part-item-pi.jpg}}
 +
{{asm-text}} Blablabla
 +
 +
Autre ligne
 +
* Et bullet list :-)
 +
{{asm-end}}
    
{{FEATHER-M0-EXPRESS-TRAILER}}
 
{{FEATHER-M0-EXPRESS-TRAILER}}
29 917

modifications

Menu de navigation