added in micropython external library for const feature.
it's returing valid attribute arrays, that just need converted on z2m side. it's also respecting the stop command from the console, which I will attempt to expose as just a button press.
This commit is contained in:
1
venv/Lib/site-packages/uflash-1.2.4.dist-info/INSTALLER
Normal file
1
venv/Lib/site-packages/uflash-1.2.4.dist-info/INSTALLER
Normal file
@@ -0,0 +1 @@
|
||||
pip
|
||||
18
venv/Lib/site-packages/uflash-1.2.4.dist-info/LICENSE
Normal file
18
venv/Lib/site-packages/uflash-1.2.4.dist-info/LICENSE
Normal file
@@ -0,0 +1,18 @@
|
||||
Copyright (c) 2015-2018 Nicholas H.Tollervey and others.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
329
venv/Lib/site-packages/uflash-1.2.4.dist-info/METADATA
Normal file
329
venv/Lib/site-packages/uflash-1.2.4.dist-info/METADATA
Normal file
@@ -0,0 +1,329 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: uflash
|
||||
Version: 1.2.4
|
||||
Summary: A module and utility to flash Python onto the BBC micro:bit.
|
||||
Home-page: https://github.com/ntoll/uflash
|
||||
Author: Nicholas H.Tollervey
|
||||
Author-email: ntoll@ntoll.org
|
||||
License: MIT
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 4 - Beta
|
||||
Classifier: Environment :: Console
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Intended Audience :: Education
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Operating System :: POSIX
|
||||
Classifier: Operating System :: Microsoft :: Windows
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3.3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Topic :: Education
|
||||
Classifier: Topic :: Software Development :: Embedded Systems
|
||||
License-File: LICENSE
|
||||
|
||||
uFlash
|
||||
======
|
||||
|
||||
**THIS MODULE ONLY WORKS WITH PYTHON 2.7 or 3.3+.**
|
||||
|
||||
A utility for flashing the BBC micro:bit with Python scripts and the
|
||||
MicroPython runtime. You pronounce the name of this utility "micro-flash". ;-)
|
||||
|
||||
It provides two services:
|
||||
|
||||
1. A library of functions to programatically create a hex file and flash it onto a BBC micro:bit.
|
||||
2. A command line utility called `uflash` that will flash Python scripts onto a BBC micro:bit.
|
||||
|
||||
Several essential operations are implemented:
|
||||
|
||||
* Encode Python into the hex format.
|
||||
* Embed the resulting hexified Python into the MicroPython runtime hex.
|
||||
* Extract an encoded Python script from a MicroPython hex file.
|
||||
* Discover the connected micro:bit.
|
||||
* Copy the resulting hex onto the micro:bit, thus flashing the device.
|
||||
* Specify the MicroPython runtime hex in which to embed your Python code.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
To install simply type::
|
||||
|
||||
$ pip install uflash
|
||||
|
||||
...and the package will download from PyPI. If you wish to upgrade to the
|
||||
latest version, use the following command::
|
||||
|
||||
$ pip install --no-cache --upgrade uflash
|
||||
|
||||
**NB:** You must use a USB *data* cable to connect the micro:bit to your
|
||||
computer (some cables are power only). You're in good shape if, when plugged
|
||||
in, the micro:bit appears as a USB storage device on your file system.
|
||||
|
||||
Linux users: For uflash to work you must ensure the micro:bit is mounted as a
|
||||
USB storage device. Usually this is done automatically. If not you've probably
|
||||
configured automounting to be off. If that's the case, we assume you
|
||||
have the technical knowledge to mount the device yourself or to install the
|
||||
required kernel modules if they're missing. Default installs of popular Linux
|
||||
distros "should just work" (tm) out of the box given a default install.
|
||||
|
||||
Command Usage
|
||||
-------------
|
||||
|
||||
To read help simply type::
|
||||
|
||||
$ uflash --help
|
||||
|
||||
or::
|
||||
|
||||
$ uflash -h
|
||||
|
||||
To discover the version information type::
|
||||
|
||||
$ uflash --version
|
||||
|
||||
If you type the command on its own then uflash will attempt to find a connected
|
||||
BBC micro:bit and flash an unmodified default version of the MicroPython
|
||||
runtime onto it::
|
||||
|
||||
$ uflash
|
||||
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
|
||||
|
||||
To flash a version of the MicroPython runtime with a specified script embedded
|
||||
within it (so that script is run when the BBC micro:bit boots up) then pass
|
||||
the path to the Python script in as the first argument to the command::
|
||||
|
||||
$ uflash my_script.py
|
||||
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
|
||||
|
||||
You can let uflash watch for changes of your script. It will be flashed
|
||||
automatically every time you save it::
|
||||
|
||||
$ uflash -w my_script.py
|
||||
|
||||
or::
|
||||
|
||||
$ uflash --watch my_script.py
|
||||
|
||||
At this point uflash will try to automatically detect the path to the device.
|
||||
However, if you have several devices plugged in and/or know what the path on
|
||||
the filesystem to the BBC micro:bit already is, you can specify this as a
|
||||
second argument to the command::
|
||||
|
||||
$ uflash myscript.py /media/ntoll/MICROBIT
|
||||
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
|
||||
|
||||
You can even flash multiple devices at once::
|
||||
|
||||
$ uflash myscript.py /media/ntoll/MICROBIT /media/ntoll/MICROBIT1
|
||||
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
|
||||
Flashing Python to: /media/ntoll/MICROBIT1/micropython.hex
|
||||
|
||||
To extract a Python script from a hex file use the "-e" flag like this::
|
||||
|
||||
$ uflash -e something.hex myscript.py
|
||||
|
||||
This will save the Python script recovered from "something.hex" into the file
|
||||
"myscript.py". If you don't supply a target the recovered script will emit to
|
||||
stdout.
|
||||
|
||||
If you're developing MicroPython and have a custom runtime hex file you can
|
||||
specify that uflash use it instead of the built-in version of MicroPython in
|
||||
the following way::
|
||||
|
||||
$ uflash -r firmware.hex
|
||||
|
||||
or::
|
||||
|
||||
$ uflash --runtime=firmware.hex
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
||||
The source code is hosted in GitHub. Please feel free to fork the repository.
|
||||
Assuming you have Git installed you can download the code from the canonical
|
||||
repository with the following command::
|
||||
|
||||
$ git clone https://github.com/ntoll/uflash.git
|
||||
|
||||
Ensure you have the correct dependencies for development installed by creating
|
||||
a virtualenv and running::
|
||||
|
||||
$ pip install -r requirements.txt
|
||||
|
||||
To locally install your development version of the module into a virtualenv,
|
||||
run the following command::
|
||||
|
||||
$ python setup.py develop
|
||||
|
||||
There is a Makefile that helps with most of the common workflows associated
|
||||
with development. Typing ``make`` on its own will list the options thus::
|
||||
|
||||
$ make
|
||||
|
||||
There is no default Makefile target right now. Try:
|
||||
|
||||
make clean - reset the project and remove auto-generated assets.
|
||||
make pyflakes - run the PyFlakes code checker.
|
||||
make pep8 - run the PEP8 style checker.
|
||||
make test - run the test suite.
|
||||
make coverage - view a report on test coverage.
|
||||
make check - run all the checkers and tests.
|
||||
make package - create a deployable package for the project.
|
||||
make publish - publish the project to PyPI.
|
||||
make docs - run sphinx to create project documentation.
|
||||
|
||||
|
||||
Release History
|
||||
===============
|
||||
|
||||
1.2.4
|
||||
-----
|
||||
|
||||
* Updated to the latest version of MicroPython for micro:bit (1.0.1)
|
||||
* This is the version of uflash to be used in Mu 1.0.2.
|
||||
|
||||
1.2.3
|
||||
-----
|
||||
|
||||
* Update to the latest version of MicroPython for micro:bit (1.0.0).
|
||||
* This is the version of uflash to be used in Mu 1.0.1.
|
||||
|
||||
1.2.2
|
||||
-----
|
||||
|
||||
* Update to latest version of MicroPython for micro:bit (1.0.0-rc.3).
|
||||
|
||||
1.2.1
|
||||
-----
|
||||
|
||||
* Update to latest version of MicroPython. Thanks to Damien George and Carlos
|
||||
Pereira Atencio for their hard work.
|
||||
* This is the version of uflash to be used in Mu 1.0.0 (final).
|
||||
|
||||
1.2.0
|
||||
-----
|
||||
|
||||
* Update to latest version of MicroPython. Thanks to Damien George.
|
||||
* Add attribute called MICROPYTHON_VERSION to report the version of MicroPython
|
||||
bundled with uflash.
|
||||
|
||||
1.1.1
|
||||
-----
|
||||
|
||||
* Update to the latest version of MicroPython for the BBC micro:bit -- fixes a
|
||||
bug relating to flooding and the radio module. As always, many thanks to
|
||||
Damien George for his work on MicroPython.
|
||||
|
||||
1.1.0
|
||||
-----
|
||||
|
||||
* Update to latest version of MicroPython for the BBC micro:bit (many thanks to Damien George for his amazing efforts!).
|
||||
* Add a --version flag to uflash that causes it to print the current version number (many thanks to Lenz Grimmer for this work).
|
||||
* Allow uflash to accept the content of a script as well as the path to a script (many thanks to Zander Brown for this work).
|
||||
* Ensure uflash works nicely / better with external tools (many thanks to Lex Robinson for this work).
|
||||
* Added copyright and license information to the start of the script.
|
||||
|
||||
1.0.8
|
||||
-----
|
||||
|
||||
* Refactor hex extraction to not depend on extended address record before script (thanks Carlos).
|
||||
* Refactor tox tests to fix Windows related Gremlin (thanks again, Carlos).
|
||||
|
||||
1.0.7
|
||||
-----
|
||||
|
||||
* Watch for changes in a script. Automatically flash on save.
|
||||
|
||||
1.0.5
|
||||
-----
|
||||
|
||||
* Update runtime to include latest bug fixes and inclusion of input() builtin.
|
||||
* Detecting drives on Windows 10 no longer causes pop-ups in certain situations.
|
||||
* Documentation updates.
|
||||
|
||||
1.0.4
|
||||
-----
|
||||
|
||||
* Add support for flash multiple microbits.
|
||||
|
||||
1.0.3
|
||||
-----
|
||||
|
||||
* Update runtime to include audio and speech modules.
|
||||
|
||||
1.0.2
|
||||
-----
|
||||
|
||||
* Update runtime to include the new radio module.
|
||||
|
||||
1.0.1
|
||||
-----
|
||||
|
||||
* Update runtime to include file system related changes.
|
||||
|
||||
1.0.0.final.0
|
||||
-------------
|
||||
|
||||
* Runtime updated to version 1.0 of MicroPython for the BBC micro:bit.
|
||||
|
||||
1.0.0.beta.7
|
||||
------------
|
||||
|
||||
* Runtime update to fix display related bug.
|
||||
|
||||
1.0.0.beta.6
|
||||
------------
|
||||
|
||||
* Runtime update to latest version of the DAL (swaps pins 4 and 5).
|
||||
|
||||
1.0.0.beta.5
|
||||
------------
|
||||
|
||||
* Runtime update to fix error reporting bug.
|
||||
|
||||
1.0.0.beta.4
|
||||
------------
|
||||
|
||||
* Documentation update.
|
||||
* Help text update.
|
||||
|
||||
1.0.0.beta.3
|
||||
------------
|
||||
|
||||
* Add ability to specify a MicroPython runtime to use.
|
||||
* Test fixes.
|
||||
|
||||
1.0.0.beta.2
|
||||
------------
|
||||
|
||||
* Updated to latest version of MicroPython runtime.
|
||||
|
||||
1.0.0.beta.1
|
||||
------------
|
||||
|
||||
* Works with Python 2.7 (thanks to @Funkyhat).
|
||||
* Updated to the latest build of MicroPython for the BBC micro:bit.
|
||||
* Minor refactoring and updates to the test suite due to MicroPython updates.
|
||||
|
||||
0.9.17
|
||||
------
|
||||
|
||||
* Minor code refactor.
|
||||
* Documentation update.
|
||||
|
||||
0.9.14
|
||||
------
|
||||
|
||||
* Feature complete.
|
||||
* Comprehensive test suite - 100% coverage.
|
||||
* Tested on Linux and Windows.
|
||||
* Documentation.
|
||||
* Access via the "uflash" command.
|
||||
|
||||
0.0.1
|
||||
-----
|
||||
|
||||
* Initial release. Basic functionality.
|
||||
|
||||
|
||||
11
venv/Lib/site-packages/uflash-1.2.4.dist-info/RECORD
Normal file
11
venv/Lib/site-packages/uflash-1.2.4.dist-info/RECORD
Normal file
@@ -0,0 +1,11 @@
|
||||
../../Scripts/uflash.exe,sha256=XxjHBjQDD4_POihLy1FC6sDLyaDWbRRDszPQnzkhw-4,106360
|
||||
__pycache__/uflash.cpython-39.pyc,,
|
||||
uflash-1.2.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
uflash-1.2.4.dist-info/LICENSE,sha256=TlWqb3p3_tRIAfRhdhx34L9zDEm0qOOb-oDePhQGT-4,1081
|
||||
uflash-1.2.4.dist-info/METADATA,sha256=ak7DVMByp5iblz9JOY7JazyUQ0fjWXmuJkMkCXv8LPA,9319
|
||||
uflash-1.2.4.dist-info/RECORD,,
|
||||
uflash-1.2.4.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
uflash-1.2.4.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92
|
||||
uflash-1.2.4.dist-info/entry_points.txt,sha256=vqls4Fzbj32kCjm1GR235wexZXdSEKU3yyLwJQ-IhyQ,40
|
||||
uflash-1.2.4.dist-info/top_level.txt,sha256=bSg_NqG-Ynm6SI58zflwmsrEbpsXJPg3DuSnfHOqzPQ,7
|
||||
uflash.py,sha256=pwASDDNd1GTwh1EDcsOM6L9n1qTlNEoCDCzwTsnsENo,653754
|
||||
5
venv/Lib/site-packages/uflash-1.2.4.dist-info/WHEEL
Normal file
5
venv/Lib/site-packages/uflash-1.2.4.dist-info/WHEEL
Normal file
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.36.2)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[console_scripts]
|
||||
uflash = uflash:main
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uflash
|
||||
Reference in New Issue
Block a user