From 544f5c3fa43fad020e0cc55fbc32061fa2f66ae8 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 31 Aug 2017 14:52:02 -0700 Subject: [PATCH] docs: Add beginnings of troubleshooting doc. Fixes #172. Related to #214. --- docs/troubleshooting.rst | 40 ++++++++++++++++++++++++++++++++++++++++ index.rst | 7 ++++--- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 docs/troubleshooting.rst diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst new file mode 100644 index 0000000000..2829cee7bc --- /dev/null +++ b/docs/troubleshooting.rst @@ -0,0 +1,40 @@ +Troubleshooting +============================== + +From time to time, an error occurs when working with CircuitPython. Here are a +variety of errors that can happen, what they mean and how to fix them. + +File system issues +------------------------------ + +If your host computer starts complaining that your CIRCUITPY drive is corrupted +or files cannot be overwritten or deleted, then you will have to erase it completely. +When CircuitPython restarts it will create a fresh empty CIRCUITPY filesystem. + +This often happens on Windows when the CIRCUITPY disk is not safely ejected +before being reset by the button or being disconnected from USB. This can also +happen on Linux and Mac OSX but its less likely. + +.. danger:: This will erase all your files in CIRCUITPY! + +#. Download the appropriate flash erase uf2 from `here `_. +#. Double-click the reset button. +#. Copy the appropriate .uf2 to the xxxBOOT drive. +#. The on-board NeoPixel will turn blue, indicating the erase has started. +#. After about 15 seconds, the NexoPixel will start flashing green. If it flashes red, the erase failed. +#. Double-click again and load the appropriate `CircuitPython .uf2 `_. + +ValueError: Incompatible .mpy file. +------------------------------------- + +This error occurs when importing a module that is stored as a `mpy` binary file +(rather than a `py` text file) that was generated by a different version of +CircuitPython than the one its being loaded into. Most versions are compatible +but, rarely they aren't. In particular, the `mpy` binary format changed between +CircuitPython versions 1.x and 2.x. + +So, if you just upgraded to 2.x from 1.x you'll need to download a newer version +of the library. They are all available in the +`Adafruit bundle `_ +and the `Community bundle `_. +Make sure to download a version with 2.0.0 or higher in the filename. diff --git a/index.rst b/index.rst index 8f83c02085..9a0096aa4d 100644 --- a/index.rst +++ b/index.rst @@ -42,10 +42,11 @@ docs are low-level API docs and may link out to separate getting started guides. :maxdepth: 3 shared-bindings/index.rst - docs/drivers.rst - docs/common_hal - docs/design_guide docs/supported_ports.rst + docs/troubleshooting.rst + docs/drivers.rst + docs/design_guide + docs/common_hal docs/library/index.rst README CONTRIBUTING