Différences entre versions de « MicroPython.Pyboard.mise-a-jour »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 16 : Ligne 16 :
  
 
{{ambox-stop|text=Le pontage '''DFU''' doit rester en place durant toute l'opération de mise-à-jour.}}
 
{{ambox-stop|text=Le pontage '''DFU''' doit rester en place durant toute l'opération de mise-à-jour.}}
 +
 +
=== Installer dfu-util ===
 +
First, install dfu-util via your package manager.
 +
 +
== Mise-à-jour (Flashing) ==
 +
=== Lister les périphériques DFU ===
 +
 +
You can list all DFU-capable devices using the {{fname|-l}} argument:
 +
 +
<nowiki>$ sudo dfu-util -l
 +
dfu-util 0.5
 +
 +
(C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
 +
(C) 2010-2011 Tormod Volden (DfuSe support)
 +
This program is Free Software and has ABSOLUTELY NO WARRANTY
 +
 +
dfu-util does currently only support DFU version 1.0
 +
 +
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash  /0x08000000/04*016Kg,01*064Kg,07*128Kg"
 +
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=1, name="@Option Bytes  /0x1FFFC000/01*016 e"
 +
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e"
 +
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e"
 +
</nowiki>
 +
 +
=== Backup ===
 +
If desired, backup the original firmware (this doesn't work with dfu-util 0.5, but does with 0.7 or newer). Previous releases of micropython are available from: [http://micropython.org/download/ http://micropython.org/download/] so performing a backup shouldn't be necessary.
 +
 +
<nowiki>$ sudo dfu-util --alt 0 --upload pyboard-original.dat -s:524288
 +
(...)
 +
Starting upload: [#######] finished!</nowiki>
 +
 +
=== Un seul périphérique DFU autorisé! ===
 +
If you have other DFU capable devices connected to you machine (for example an Apple Magic Mouse), and you receive the following message:
 +
 +
More than one DFU capable USB device found, you might try '--list' and then disconnect all but one device
 +
 +
you may want to disconnet all other devices, or specify which device's firmware you want to edit by passing either --device or the shorter -d flag to dfu-util. Example:
 +
 +
$ sudo dfu-util --alt 0 -D pybv10-2014-05-19-v1.0.1-24-g5cdff5f.dfu -d 0483
 +
 +
=== Téléverser le nouveau FirmWare ===
 +
Then write the downloaded firmware to the pyboard:
 +
 +
<nowiki>$ sudo dfu-util --alt 0 -D pybv10-2014-05-19-v1.0.1-24-g5cdff5f.dfu
 +
(...)
 +
done parsing DfuSe file</nowiki>
 +
 +
After the the program finished, disconnect the pyboard from USB and remove the jumper between the DFU and the 3.3v ports.
 +
 +
=== Quitter le mode DFU ===
 +
After the the program finished, disconnect the pyboard from USB and remove the jumper between the DFU and the 3.3v ports.
 +
 +
== Restaurer un ancien FirmWare ==
 +
 +
If you need to restore the original firmware, use the following command:
 +
 +
$ sudo dfu-util --alt 0 -D pyboard-original.dat -d 0483:df11 -s 0x8000000
 +
 +
== Alternative: pydfu ==
 +
There is an alternative DFU programmer that is written in pure Python. It can be found here: [https://github.com/micropython/micropython/blob/master/tools/pydfu.py https://github.com/micropython/micropython/blob/master/tools/pydfu.py].
 +
 +
It requires the PyUSB package.
 +
 +
To use pydfu:
 +
 +
<nowiki>$ python pydfu.py -u <firmware.dfu></nowiki>
 +
 +
This will copy the given firmware file to the pyboard. pydfu is much faster than dfu-util.
 +
 +
This will restore everything, including the internal flash filesystem.
  
 
{{MicroPython.présentation-TRAILER}}
 
{{MicroPython.présentation-TRAILER}}

Version du 18 avril 2016 à 19:16


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Téléchargement

Vous pouvez télécharger la dernière version du FirmWare depuis http://micropython.org/download/

Préparatifs

  • First, disconnect everything from your pyboard.
  • Then connect the DFU pin with the 3.3V pin (they're right next to each other) to put the board into DFU (Device Firmware Update) mode.
  • Now connect the pyboard to your computer via USB.

MicroPython.Pyboard.mise-a-jour-00.png

Installer dfu-util

First, install dfu-util via your package manager.

Mise-à-jour (Flashing)

Lister les périphériques DFU

You can list all DFU-capable devices using the -l argument:

$ sudo dfu-util -l
dfu-util 0.5

(C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
(C) 2010-2011 Tormod Volden (DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash  /0x08000000/04*016Kg,01*064Kg,07*128Kg"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=1, name="@Option Bytes  /0x1FFFC000/01*016 e"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e"

Backup

If desired, backup the original firmware (this doesn't work with dfu-util 0.5, but does with 0.7 or newer). Previous releases of micropython are available from: http://micropython.org/download/ so performing a backup shouldn't be necessary.

$ sudo dfu-util --alt 0 --upload pyboard-original.dat -s:524288
(...)
Starting upload: [#######] finished!

Un seul périphérique DFU autorisé!

If you have other DFU capable devices connected to you machine (for example an Apple Magic Mouse), and you receive the following message:

More than one DFU capable USB device found, you might try '--list' and then disconnect all but one device

you may want to disconnet all other devices, or specify which device's firmware you want to edit by passing either --device or the shorter -d flag to dfu-util. Example:

$ sudo dfu-util --alt 0 -D pybv10-2014-05-19-v1.0.1-24-g5cdff5f.dfu -d 0483

Téléverser le nouveau FirmWare

Then write the downloaded firmware to the pyboard:

$ sudo dfu-util --alt 0 -D pybv10-2014-05-19-v1.0.1-24-g5cdff5f.dfu 
(...)
done parsing DfuSe file

After the the program finished, disconnect the pyboard from USB and remove the jumper between the DFU and the 3.3v ports.

Quitter le mode DFU

After the the program finished, disconnect the pyboard from USB and remove the jumper between the DFU and the 3.3v ports.

Restaurer un ancien FirmWare

If you need to restore the original firmware, use the following command:

$ sudo dfu-util --alt 0 -D pyboard-original.dat -d 0483:df11 -s 0x8000000

Alternative: pydfu

There is an alternative DFU programmer that is written in pure Python. It can be found here: https://github.com/micropython/micropython/blob/master/tools/pydfu.py.

It requires the PyUSB package.

To use pydfu:

$ python pydfu.py -u <firmware.dfu>

This will copy the given firmware file to the pyboard. pydfu is much faster than dfu-util.

This will restore everything, including the internal flash filesystem.



Source: Micro Python Python for microcontrollers écrit par/written by Damien P.George

Traduit par Meurisse D. pour MCHobby.be - Translated by Meurisse D. for MCHobby.be

Traduit avec l'autorisation de micropython.org - Translated with the authorisation of micropython.org

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.