Modifications

Sauter à la navigation Sauter à la recherche
3 003 octets supprimés ,  20 février 2016 à 15:39
Contenu remplacé par « {{MicroPython-Hack-Prepare-NAV}} {{MicroPython-Hack-safemode-core}} {{MicroPython-Hack-SafeMode-TRAILER}} »
Ligne 1 : Ligne 1 :  
{{MicroPython-Hack-Prepare-NAV}}
 
{{MicroPython-Hack-Prepare-NAV}}
   −
== Introduction ==
+
{{MicroPython-Hack-safemode-core}}
{{bloc-etroit|text=La carte dispose d'un '''Safe Mode''' et d'une réinitialisation d'usine (''factory reset'').
  −
 
  −
Ne vous inquiétez pas si votre pyboard ne fonctionne plus comme attendu (ou fonctionne mal). Il est presque impossible de détruire une carte PyBoard en la programmant mal.
  −
 
  −
La première chose à essayer est d'entrer en "safe mode": ce mode évite temporairement l'exécution de {{fname|boot.py}} et {{fname|main.py}} tout en activant la configuration USB par défaut.
  −
 
  −
Si vous avez rencontrez des problèmes avec le système de fichier, vous pouvez utiliser la réinitialisation d'usine (dit ''factory reset'') qui réinitialise le système de fichier à son état d'origine. }}
  −
 
  −
== Safe mode ==
  −
{{bloc-etroit|text=
  −
Le ''Safe Mode'' (mode de sécurité) this temporarily skips execution of {{fname|boot.py}} and {{fname|main.py}} and gives default USB settings.
  −
 
  −
To enter safe mode, do the following steps:
  −
# Connect the pyboard to USB so it powers up.
  −
# Hold down the USR switch.
  −
# While still holding down USR, press and release the RST switch.
  −
# The LEDs will then cycle green to orange to green+orange and back again.
  −
# Keep holding down USR until ''only the orange LED is lit'', and then let go of the USR switch.
  −
# The orange LED should flash quickly 4 times, and then turn off.
  −
# You are now in safe mode.
  −
 
  −
In safe mode, the {{fname|boot.py}} and {{fname|main.py}} files are not executed, and so the pyboard boots up with default settings. This means you now have access to the filesystem (the USB drive should appear), and you can edit {{fname|boot.py}} and {{fname|main.py}} to fix any problems.
  −
 
  −
Entering safe mode is temporary, and does not make any changes to the files on the pyboard.
  −
}}
  −
 
  −
== Réinitialisation d'usine ==
  −
{{bloc-etroit|text=If you pyboard’s filesystem gets corrupted (for example, you forgot to eject/unmount it), or you have some code in {{fname|boot.py}} or {{fname|main.py}} which you can’t escape from, then you can reset the filesystem.
  −
 
  −
Resetting the filesystem deletes all files on the internal pyboard storage (not the SD card), and restores the files {{fname|boot.py}}, {{fname|main.py}}, {{fname|README.txt}} and {{fname|pybcdc.inf}} back to their original state.
  −
 
  −
To do a factory reset of the filesystem you follow a similar procedure as you did to enter safe mode, but release USR on green+orange:
  −
}}
  −
# Connect the pyboard to USB so it powers up.
  −
# Hold down the USR switch.
  −
# While still holding down USR, press and release the RST switch.
  −
# The LEDs will then cycle green to orange to green+orange and back again.
  −
# Keep holding down USR until ''both the green and orange LEDs are lit'', and then let go of the USR switch.
  −
# The green and orange LEDs should flash quickly 4 times.
  −
# The red LED will turn on (so red, green and orange are now on).
  −
# The pyboard is now resetting the filesystem (this takes a few seconds).
  −
# The LEDs all turn off.
  −
# You now have a reset filesystem, and are in safe mode.
  −
# Press and release the RST switch to boot normally.
      
{{MicroPython-Hack-SafeMode-TRAILER}}
 
{{MicroPython-Hack-SafeMode-TRAILER}}
29 917

modifications

Menu de navigation