1
- [ ![ Build Status] [ travis-img ]] [ travis-repo ] [ ![ Coverage Status] [ coveralls-img ]] [ coveralls-repo ]
2
- [ travis-img ] : https://travis-ci.org/micropython/micropython.png?branch=master
3
- [ travis-repo ] : https://travis-ci.org/micropython/micropython
4
- [ coveralls-img ] : https://coveralls.io/repos/micropython/micropython/badge.png?branch=master
5
- [ coveralls-repo ] : https://coveralls.io/r/micropython/micropython?branch=master
6
-
7
1
The MicroPython project
8
2
=======================
9
3
<p align =" center " >
@@ -57,76 +51,6 @@ The subdirectories above may include READMEs with additional info.
57
51
"make" is used to build the components, or "gmake" on BSD-based systems.
58
52
You will also need bash and Python (at least 2.7 or 3.3).
59
53
60
- The Unix version
61
- ----------------
62
-
63
- The "unix" port requires a standard Unix environment with gcc and GNU make.
64
- x86 and x64 architectures are supported (i.e. x86 32- and 64-bit), as well
65
- as ARM and MIPS. Making full-featured port to another architecture requires
66
- writing some assembly code for the exception handling and garbage collection.
67
- Alternatively, fallback implementation based on setjmp/longjmp can be used.
68
-
69
- To build (see section below for required dependencies):
70
-
71
- $ cd unix
72
- $ make axtls
73
- $ make
74
-
75
- Then to give it a try:
76
-
77
- $ ./micropython
78
- >>> list(5 * x + y for x in range(10) for y in [4, 2, 1])
79
-
80
- Use ` CTRL-D ` (i.e. EOF) to exit the shell.
81
- Learn about command-line options (in particular, how to increase heap size
82
- which may be needed for larger applications):
83
-
84
- $ ./micropython --help
85
-
86
- Run complete testsuite:
87
-
88
- $ make test
89
-
90
- Unix version comes with a builtin package manager called upip, e.g.:
91
-
92
- $ ./micropython -m upip install micropython-pystone
93
- $ ./micropython -m pystone
94
-
95
- Browse available modules on
96
- [ PyPI] ( https://pypi.python.org/pypi?%3Aaction=search&term=micropython ) .
97
- Standard library modules come from
98
- [ micropython-lib] ( https://github.com/micropython/micropython-lib ) project.
99
-
100
- External dependencies
101
- ---------------------
102
-
103
- Building Unix version requires some dependencies installed. For
104
- Debian/Ubuntu/Mint derivative Linux distros, install ` build-essential `
105
- (includes toolchain and make), ` libffi-dev ` , and ` pkg-config ` packages.
106
-
107
- Other dependencies can be built together with MicroPython. Oftentimes,
108
- you need to do this to enable extra features or capabilities. To build
109
- these additional dependencies, first fetch git submodules for them:
110
-
111
- $ git submodule update --init
112
-
113
- Use this same command to get the latest versions of dependencies, as
114
- they are updated from time to time. After that, in ` unix/ ` dir, execute:
115
-
116
- $ make deplibs
117
-
118
- This will build all available dependencies (regardless whether they
119
- are used or not). If you intend to build MicroPython with additional
120
- options (like cross-compiling), the same set of options should be passed
121
- to ` make deplibs ` . To actually enabled use of dependencies, edit
122
- ` unix/mpconfigport.mk ` file, which has inline descriptions of the options.
123
- For example, to build SSL module (required for ` upip ` tool described above),
124
- set ` MICROPY_PY_USSL ` to 1.
125
-
126
- In ` unix/mpconfigport.mk ` , you can also disable some dependencies enabled
127
- by default, like FFI support, which requires libffi development files to
128
- be installed.
129
-
130
54
The ESP32 version
131
55
-----------------
132
56
@@ -135,15 +59,15 @@ the Espressif website:
135
59
136
60
- for 64-bit Linux::
137
61
138
- https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-59 .tar.gz
62
+ https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0 .tar.gz
139
63
140
64
- for 32-bit Linux::
141
65
142
- https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-59 .tar.gz
66
+ https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-61-gab8375a-5.2.0 .tar.gz
143
67
144
68
- for Mac OS:
145
69
146
- https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-59 .tar.gz
70
+ https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0 .tar.gz
147
71
148
72
To use it, you will need to update your `` PATH `` environment variable in `` ~/.bash_profile `` file. To make `` xtensa-esp32-elf `` available for all terminal sessions, add the following line to your `` ~/.bash_profile `` file::
149
73
@@ -168,6 +92,10 @@ After cloning, make sure to checkout all the submodules:
168
92
Finally, before building, export the IDF_PATH variable
169
93
170
94
$ export IDF_PATH=~/pycom-esp-idf
95
+
96
+ Prior to building the main firmware, you need to build mpy-cross
97
+
98
+ $ cd mpy-cross && make clean && make
171
99
172
100
To build and flash your LoPy for 868MHz regions:
173
101
@@ -201,3 +129,7 @@ or the SiPy:
201
129
202
130
Make sure that your board is placed into programming mode, otherwise flahing will fail.
203
131
To do this, connect `` P2 `` to `` GND `` and then reset the board.
132
+
133
+ To specify a serial port other than /dev/ttyUSB0, use ESPPORT variable:
134
+
135
+ $ make BOARD=WIPY ESPPORT=/dev/tty.usbserial-DQ008HQY flash
0 commit comments