kopia lustrzana https://github.com/peterhinch/micropython-samples
Replace refs to PicoWeb with Microdot. Delete refs to upip and micropip.
rodzic
c5e7c6b82b
commit
c8aef81c5d
19
README.md
19
README.md
|
@ -12,7 +12,7 @@ and modules which are documented and supported.
|
||||||
1. [Installation guides](./README.md#1-installation-guides)
|
1. [Installation guides](./README.md#1-installation-guides)
|
||||||
1.1 [Installing MicroPython libraries](./README.md#11-installing-micropython-libraries)
|
1.1 [Installing MicroPython libraries](./README.md#11-installing-micropython-libraries)
|
||||||
1.2 [Fastbuild](./README.md#12-fastbuild) Build scripts and udev rules
|
1.2 [Fastbuild](./README.md#12-fastbuild) Build scripts and udev rules
|
||||||
1.3 [Installing PicoWeb](./README.md#13-installing-picoweb) For users of official firmware
|
1.3 [A web framework](./README.md#13-a-web-framework) Microdot.
|
||||||
1.4 [Buildcheck](./README.md#14-buildcheck) Check firmware build date
|
1.4 [Buildcheck](./README.md#14-buildcheck) Check firmware build date
|
||||||
1.5 [Pyboard USB pitfall](./README.md#15-pyboard-usb-pitfall) Read this if you're new to Pyboards
|
1.5 [Pyboard USB pitfall](./README.md#15-pyboard-usb-pitfall) Read this if you're new to Pyboards
|
||||||
2. [Hardware information and drivers](./README.md#2-hardware-information-and-drivers)
|
2. [Hardware information and drivers](./README.md#2-hardware-information-and-drivers)
|
||||||
|
@ -55,9 +55,10 @@ and modules which are documented and supported.
|
||||||
|
|
||||||
## 1.1 Installing MicroPython libraries
|
## 1.1 Installing MicroPython libraries
|
||||||
|
|
||||||
This is more involved since the advent of the pycopy fork of MicroPython.
|
Please read
|
||||||
[This doc](./micropip/README.md) describes the issues and provides a utility
|
[the official docs](http://docs.micropython.org/en/latest/reference/packages.html#packages).
|
||||||
to simplify installation for users of official MicroPython firmware.
|
[This doc](./micropip/README.md) describes a simple way to override modules
|
||||||
|
which have been incorporated in firmware as frozen bytecode.
|
||||||
|
|
||||||
## 1.2 Fastbuild
|
## 1.2 Fastbuild
|
||||||
|
|
||||||
|
@ -65,16 +66,14 @@ Scripts for building MicroPython for various target hardware types and for
|
||||||
updating your local source. Now detects and builds for Pyboard D. See
|
updating your local source. Now detects and builds for Pyboard D. See
|
||||||
[docs](./fastbuild/README.md)
|
[docs](./fastbuild/README.md)
|
||||||
|
|
||||||
## 1.3 Installing PicoWeb
|
## 1.3 A Web Framework
|
||||||
|
|
||||||
Paul Sokolovsk's [PicoWeb](https://github.com/pfalcon/picoweb) requires his
|
Paul Sokolovsk's [PicoWeb](https://github.com/pfalcon/picoweb) requires his
|
||||||
fork of MicroPython.
|
fork of MicroPython.
|
||||||
|
|
||||||
Some time ago I was asked what was involved to install it on official firmware.
|
This requires some modification to run under official MicroPython. The solution
|
||||||
Changes were minor. However it should be stressed that while the version here
|
preferred by MicroPython maintainers is
|
||||||
works, it is not up to date. See the [Easy installation](./PICOWEB.md) guide.
|
[Microdot](https://microdot.readthedocs.io/en/latest/).
|
||||||
|
|
||||||
PR's with updated versions of PicoWeb are welcome.
|
|
||||||
|
|
||||||
## 1.4 Buildcheck
|
## 1.4 Buildcheck
|
||||||
|
|
||||||
|
|
|
@ -1,59 +1,4 @@
|
||||||
# 0. Contents
|
# Overriding built in library modules
|
||||||
|
|
||||||
1. [Installing MicroPython library modules](./README.md#1-installing-micropython-library-modules)
|
|
||||||
2. [micropip](./README.md#2-micropip) upip alternative runs on a PC under CPython
|
|
||||||
3. [Overriding built in library modules](./README.md#3-overriding-built-in-library-modules)
|
|
||||||
|
|
||||||
# 1. Installing MicroPython library modules
|
|
||||||
|
|
||||||
MicroPython no longer uses PyPi for official software, so `upip` and `micropip`
|
|
||||||
are largely obsolete. Please read
|
|
||||||
[the official docs](http://docs.micropython.org/en/latest/reference/packages.html#packages)
|
|
||||||
for up to date instructions on installing official library modules.
|
|
||||||
|
|
||||||
## 1.1 Installing unofficial packages
|
|
||||||
|
|
||||||
PyPi hosts a wide variety of packages targeted at MicroPython. There is no
|
|
||||||
guarantee of their compatibility with the official MicroPython codebase and it
|
|
||||||
seems that some cannot even be downloaded by `upip`: e.g.
|
|
||||||
[this issue](https://github.com/peterhinch/micropython-samples/issues/27)
|
|
||||||
|
|
||||||
## 1.2 What micropip is and is not
|
|
||||||
|
|
||||||
Official `upip` cannot run under CPython. The purpose of `micropip` is to be a
|
|
||||||
straight port of `upip` for those who do not have access to the Unix build of
|
|
||||||
MicroPython. It aims to replicate the functinality of `upip`. Hence requests
|
|
||||||
for enhancements will be rejected. If `upip` is enhanced, I will port those
|
|
||||||
changes to `micropip`. Secondly, if I receive a report that `micropip` cannot
|
|
||||||
download a given unofficial package, I will check whether `upip` succceeds. If
|
|
||||||
`upip` also fails, either the package is faulty or there is a bug in `upip`.
|
|
||||||
|
|
||||||
###### [Main README](../README.md)
|
|
||||||
|
|
||||||
## 2. micropip
|
|
||||||
|
|
||||||
This runs under Python 3.2 or above. Library and user modules are installed to
|
|
||||||
the PC for transfer to the target. It is cross-platform and has been tested
|
|
||||||
under Linux, Windows and OSX.
|
|
||||||
|
|
||||||
Help may be accessed with
|
|
||||||
|
|
||||||
```
|
|
||||||
micropip.py --help
|
|
||||||
```
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
python3 -m micropip --help
|
|
||||||
```
|
|
||||||
Example invocation line to install the `copy` module to a PC:
|
|
||||||
```
|
|
||||||
$ micropip.py install -p ~/rats micropython-copy
|
|
||||||
```
|
|
||||||
|
|
||||||
###### [Contents](./README.md#0-contents)
|
|
||||||
|
|
||||||
# 3. Overriding built in library modules
|
|
||||||
|
|
||||||
Some firmware builds include library modules as frozen bytecode. On occasion it
|
Some firmware builds include library modules as frozen bytecode. On occasion it
|
||||||
may be necessary to replace such a module with an updated or modified
|
may be necessary to replace such a module with an updated or modified
|
||||||
|
@ -81,7 +26,3 @@ This has the following outcome:
|
||||||
```
|
```
|
||||||
Now modules in the filesystem will be compiled and executed in preference to
|
Now modules in the filesystem will be compiled and executed in preference to
|
||||||
those frozen as bytecode.
|
those frozen as bytecode.
|
||||||
|
|
||||||
###### [Contents](./README.md#0-contents)
|
|
||||||
|
|
||||||
###### [Main README](../README.md)
|
|
||||||
|
|
Ładowanie…
Reference in New Issue