λ ~ git/ λ git git clone https://github.com/micropython/micropython Cloning into 'micropython'... remote: Counting objects: 62739, done. remote: Compressing objects: 100% (22/22), done. remote: Total 62739 (delta 6), reused 16 (delta 5), pack-reused 62712 Receiving objects: 100% (62739/62739), 33.43 MiB | 111.00 KiB/s, done. Resolving deltas: 100% (45930/45930), done. λ git λ git cd micropython λ micropython master ll total 112 drwxr-xr-x 12 rook rook 4096 May 25 18:26 docs drwxr-xr-x 12 rook rook 4096 May 25 18:26 drivers drwxr-xr-x 7 rook rook 4096 May 25 18:26 examples drwxr-xr-x 6 rook rook 4096 May 25 18:26 extmod drwxr-xr-x 20 rook rook 4096 May 25 18:26 lib drwxr-xr-x 2 rook rook 4096 May 25 18:26 logo drwxr-xr-x 2 rook rook 4096 May 25 18:26 mpy-cross drwxr-xr-x 14 rook rook 4096 May 25 18:26 ports drwxr-xr-x 2 rook rook 4096 May 25 18:26 py drwxr-xr-x 24 rook rook 4096 May 25 18:26 tests drwxr-xr-x 2 rook rook 4096 May 25 18:26 tools -rw-r--r-- 1 rook rook 43254 May 25 18:26 ACKNOWLEDGEMENTS -rw-r--r-- 1 rook rook 7153 May 25 18:26 CODECONVENTIONS.md -rw-r--r-- 1 rook rook 305 May 25 18:26 CONTRIBUTING.md -rw-r--r-- 1 rook rook 1089 May 25 18:26 LICENSE -rw-r--r-- 1 rook rook 7548 May 25 18:26 README.md λ micropython master fh README.md [![Build Status](https://travis-ci.org/micropython/micropython.png?branch=master)](https://travis-ci.org/micropython/micropython) [![Coverage Status](https://coveralls.io/repos/micropython/micropython/badge.png?branch=master)](https://coveralls.io/r/micropython/micropython?branch=master) The MicroPython project =======================

MicroPython Logo

This is the MicroPython project, which aims to put an implementation of Python 3.x on microcontrollers and small embedded systems. You can find the official website at [micropython.org](http://www.micropython.org). WARNING: this project is in beta stage and is subject to changes of the code-base, including project-wide name changes and API changes. MicroPython implements the entire Python 3.4 syntax (including exceptions, `with`, `yield from`, etc., and additionally `async`/`await` keywords from Python 3.5). The following core datatypes are provided: `str` (including basic Unicode support), `bytes`, `bytearray`, `tuple`, `list`, `dict`, `set`, `frozenset`, `array.array`, `collections.namedtuple`, classes and instances. Builtin modules include `sys`, `time`, and `struct`, etc. Select ports have support for `_thread` module (multithreading). Note that only a subset of Python 3 functionality is implemented for the data types and modules. MicroPython can execute scripts in textual source form or from precompiled bytecode, in both cases either from an on-device filesystem or "frozen" into the MicroPython executable. See the repository http://github.com/micropython/pyboard for the MicroPython board (PyBoard), the officially supported reference electronic circuit board. Major components in this repository: - py/ -- the core Python implementation, including compiler, runtime, and core library. - mpy-cross/ -- the MicroPython cross-compiler which is used to turn scripts into precompiled bytecode. - ports/unix/ -- a version of MicroPython that runs on Unix. - ports/stm32/ -- a version of MicroPython that runs on the PyBoard and similar STM32 boards (using ST's Cube HAL drivers). - ports/minimal/ -- a minimal MicroPython port. Start with this if you want to port MicroPython to another microcontroller. - tests/ -- test framework and test scripts. - docs/ -- user documentation in Sphinx reStructuredText format. Rendered HTML documentation is available at http://docs.micropython.org (be sure to select needed board/port at the bottom left corner). Additional components: - ports/bare-arm/ -- a bare minimum version of MicroPython for ARM MCUs. Used mostly to control code size. - ports/teensy/ -- a version of MicroPython that runs on the Teensy 3.1 (preliminary but functional). - ports/pic16bit/ -- a version of MicroPython for 16-bit PIC microcontrollers. - ports/cc3200/ -- a version of MicroPython that runs on the CC3200 from TI. - ports/esp8266/ -- an experimental port for ESP8266 WiFi modules. - extmod/ -- additional (non-core) modules implemented in C. - tools/ -- various tools, including the pyboard.py module. - examples/ -- a few example Python scripts. The subdirectories above may include READMEs with additional info. "make" is used to build the components, or "gmake" on BSD-based systems. You will also need bash, gcc, and Python (at least 2.7 or 3.3). The Unix version ---------------- The "unix" port requires a standard Unix environment with gcc and GNU make. x86 and x64 architectures are supported (i.e. x86 32- and 64-bit), as well as ARM and MIPS. Making full-featured port to another architecture requires writing some assembly code for the exception handling and garbage collection. Alternatively, fallback implementation based on setjmp/longjmp can be used. To build (see section below for required dependencies): $ git submodule update --init $ cd ports/unix $ make axtls $ make Then to give it a try: $ ./micropython >>> list(5 * x + y for x in range(10) for y in [4, 2, 1]) Use `CTRL-D` (i.e. EOF) to exit the shell. Learn about command-line options (in particular, how to increase heap size which may be needed for larger applications): $ ./micropython --help Run complete testsuite: $ make test Unix version comes with a builtin package manager called upip, e.g.: $ ./micropython -m upip install micropython-pystone $ ./micropython -m pystone Browse available modules on [PyPI](https://pypi.python.org/pypi?%3Aaction=search&term=micropython). Standard library modules come from [micropython-lib](https://github.com/micropython/micropython-lib) project. External dependencies --------------------- Building MicroPython ports may require some dependencies installed. For Unix port, `libffi` library and `pkg-config` tool are required. On Debian/Ubuntu/Mint derivative Linux distros, install `build-essential` (includes toolchain and make), `libffi-dev`, and `pkg-config` packages. Other dependencies can be built together with MicroPython. This may be required to enable extra features or capabilities, and in recent versions of MicroPython, these may be enabled by default. To build these additional dependencies, first fetch git submodules for them: $ git submodule update --init Use the same command to get the latest versions of dependencies, as they are updated from time to time. After that, in the port directory (e.g. `ports/unix/`), execute: $ make deplibs This will build all available dependencies (regardless whether they are used or not). If you intend to build MicroPython with additional options (like cross-compiling), the same set of options should be passed to `make deplibs`. To actually enable/disable use of dependencies, edit `ports/unix/mpconfigport.mk` file, which has inline descriptions of the options. For example, to build SSL module (required for `upip` tool described above, and so enabled by dfeault), `MICROPY_PY_USSL` should be set to 1. For some ports, building required dependences is transparent, and happens automatically. They still need to be fetched with the git submodule command above. The STM32 version ----------------- The "stm32" port requires an ARM compiler, arm-none-eabi-gcc, and associated bin-utils. For those using Arch Linux, you need arm-none-eabi-binutils, arm-none-eabi-gcc and arm-none-eabi-newlib packages. Otherwise, try here: https://launchpad.net/gcc-arm-embedded To build: $ git submodule update --init $ cd ports/stm32 $ make You then need to get your board into DFU mode. On the pyboard, connect the 3V3 pin to the P1/DFU pin with a wire (on PYBv1.0 they are next to each other on the bottom left of the board, second row from the bottom). Then to flash the code via USB DFU to your device: $ make deploy This will use the included `tools/pydfu.py` script. If flashing the firmware does not work it may be because you don't have the correct permissions, and need to use `sudo make deploy`. See the README.md file in the ports/stm32/ directory for further details. Contributing ------------ MicroPython is an open-source project and welcomes contributions. To be productive, please be sure to follow the [Contributors' Guidelines](https://github.com/micropython/micropython/wiki/ContributorGuidelines) and the [Code Conventions](https://github.com/micropython/micropython/blob/master/CODECONVENTIONS.md). Note that MicroPython is licenced under the MIT license, and all contributions should follow this license. λ micropython master ll total 112 drwxr-xr-x 12 rook rook 4096 May 25 18:26 docs drwxr-xr-x 12 rook rook 4096 May 25 18:26 drivers drwxr-xr-x 7 rook rook 4096 May 25 18:26 examples drwxr-xr-x 6 rook rook 4096 May 25 18:26 extmod drwxr-xr-x 20 rook rook 4096 May 25 18:26 lib drwxr-xr-x 2 rook rook 4096 May 25 18:26 logo drwxr-xr-x 2 rook rook 4096 May 25 18:26 mpy-cross drwxr-xr-x 14 rook rook 4096 May 25 18:26 ports drwxr-xr-x 2 rook rook 4096 May 25 18:26 py drwxr-xr-x 24 rook rook 4096 May 25 18:26 tests drwxr-xr-x 2 rook rook 4096 May 25 18:26 tools -rw-r--r-- 1 rook rook 43254 May 25 18:26 ACKNOWLEDGEMENTS -rw-r--r-- 1 rook rook 7153 May 25 18:26 CODECONVENTIONS.md -rw-r--r-- 1 rook rook 305 May 25 18:26 CONTRIBUTING.md -rw-r--r-- 1 rook rook 1089 May 25 18:26 LICENSE -rw-r--r-- 1 rook rook 7548 May 25 18:26 README.md λ micropython master git submodule update --init Submodule 'lib/axtls' (https://github.com/pfalcon/axtls) registered for path 'lib/axtls' Submodule 'lib/berkeley-db-1.xx' (https://github.com/pfalcon/berkeley-db-1.xx) registered for path 'lib/berkeley-db-1.xx' Submodule 'lib/libffi' (https://github.com/atgreen/libffi) registered for path 'lib/libffi' Submodule 'lib/lwip' (https://git.savannah.gnu.org/r/lwip.git) registered for path 'lib/lwip' Submodule 'lib/stm32lib' (https://github.com/micropython/stm32lib) registered for path 'lib/stm32lib' Cloning into '/home/rook/git/micropython/lib/axtls'... ^C λ micropython master git submodule update --init Cloning into '/home/rook/git/micropython/lib/axtls'... Cloning into '/home/rook/git/micropython/lib/berkeley-db-1.xx'... Cloning into '/home/rook/git/micropython/lib/libffi'... Cloning into '/home/rook/git/micropython/lib/lwip'... Cloning into '/home/rook/git/micropython/lib/stm32lib'... Submodule path 'lib/axtls': checked out '43a6e6bd3bbc03dc501e16b89fba0ef042ed3ea0' Submodule path 'lib/berkeley-db-1.xx': checked out '35aaec4418ad78628a3b935885dd189d41ce779b' Submodule path 'lib/libffi': checked out 'e9de7e35f2339598b16cbb375f9992643ed81209' Submodule path 'lib/lwip': checked out '92f23d6ca0971a32f2085b9480e738d34174417b' Submodule path 'lib/stm32lib': checked out '90b9961963b625db0f2aabfe8e5e508b1f4fb7f1' λ micropython master cd ports/unix λ unix master ll total 284 drwxr-xr-x 4 rook rook 4096 May 25 18:26 coverage-frzmpy drwxr-xr-x 4 rook rook 4096 May 25 18:26 coverage-frzstr drwxr-xr-x 2 rook rook 4096 May 25 18:26 modules -rw-r--r-- 1 rook rook 3610 May 25 18:26 alloc.c -rw-r--r-- 1 rook rook 15247 May 25 18:26 coverage.c -rw-r--r-- 1 rook rook 71 May 25 18:26 fatfs_port.c -rw-r--r-- 1 rook rook 1587 May 25 18:26 fdfile.h -rw-r--r-- 1 rook rook 9650 May 25 18:26 file.c -rw-r--r-- 1 rook rook 5270 May 25 18:26 gccollect.c -rw-r--r-- 1 rook rook 3736 May 25 18:26 input.c -rw-r--r-- 1 rook rook 206 May 25 18:26 input.h -rw-r--r-- 1 rook rook 22736 May 25 18:26 main.c -rw-r--r-- 1 rook rook 9586 May 25 18:26 Makefile -rw-r--r-- 1 rook rook 16569 May 25 18:26 modffi.c -rw-r--r-- 1 rook rook 23471 May 25 18:26 modjni.c -rw-r--r-- 1 rook rook 3491 May 25 18:26 modmachine.c -rw-r--r-- 1 rook rook 7658 May 25 18:26 modos.c -rw-r--r-- 1 rook rook 5612 May 25 18:26 modtermios.c -rw-r--r-- 1 rook rook 6567 May 25 18:26 modtime.c -rw-r--r-- 1 rook rook 2877 May 25 18:26 moduos_vfs.c -rw-r--r-- 1 rook rook 11052 May 25 18:26 moduselect.c -rw-r--r-- 1 rook rook 21101 May 25 18:26 modusocket.c -rw-r--r-- 1 rook rook 2139 May 25 18:26 mpconfigport_coverage.h -rw-r--r-- 1 rook rook 1815 May 25 18:26 mpconfigport_fast.h -rw-r--r-- 1 rook rook 1563 May 25 18:26 mpconfigport_freedos.h -rw-r--r-- 1 rook rook 11849 May 25 18:26 mpconfigport.h -rw-r--r-- 1 rook rook 5436 May 25 18:26 mpconfigport_minimal.h -rw-r--r-- 1 rook rook 1285 May 25 18:26 mpconfigport.mk -rw-r--r-- 1 rook rook 1621 May 25 18:26 mpconfigport_nanbox.h -rw-r--r-- 1 rook rook 2255 May 25 18:26 mphalport.h -rw-r--r-- 1 rook rook 7127 May 25 18:26 mpthreadport.c -rw-r--r-- 1 rook rook 1374 May 25 18:26 mpthreadport.h -rw-r--r-- 1 rook rook 1231 May 25 18:26 qstrdefsport.h -rw-r--r-- 1 rook rook 6146 May 25 18:26 unix_mphal.c λ unix master make axtls Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. mkdir -p build/ mkdir -p build/build/ mkdir -p build/extmod/ mkdir -p build/lib/berkeley-db-1.xx/btree/ mkdir -p build/lib/berkeley-db-1.xx/mpool/ mkdir -p build/lib/embed/ mkdir -p build/lib/mp-readline/ mkdir -p build/lib/oofatfs/ mkdir -p build/lib/oofatfs/option/ mkdir -p build/lib/timeutils/ mkdir -p build/lib/utils/ mkdir -p build/py/ cd ../../lib/axtls; cp config/upyconfig config/.config cd ../../lib/axtls; make oldconfig -B make[1]: Entering directory '/home/rook/git/micropython/lib/axtls' make -C config/scripts/config conf make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/config/scripts/config' cp ../../scripts/config/zconf.tab.h_shipped zconf.tab.h gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I. -c ../../scripts/config/conf.c -o conf.o ../../scripts/config/conf.c: In function ‘conf_string’: ../../scripts/config/conf.c:164:20: warning: variable ‘help’ set but not used [-Wunused-but-set-variable] const char *def, *help; ^~~~ ../../scripts/config/conf.c: In function ‘conf_sym’: ../../scripts/config/conf.c:198:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable] int type; ^~~~ ../../scripts/config/conf.c: In function ‘conf_choice’: ../../scripts/config/conf.c:273:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable] int type; ^~~~ cp ../../scripts/config/zconf.tab.c_shipped zconf.tab.c cp ../../scripts/config/lex.zconf.c_shipped lex.zconf.c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I../../scripts/config -I. -c zconf.tab.c -o zconf.tab.o In file included from zconf.tab.c:2123:0: lex.zconf.c:2969:16: warning: ‘input’ defined but not used [-Wunused-function] static int input (void) ^~~~~ gcc conf.o zconf.tab.o -o conf make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/config/scripts/config' # # using defaults found in config/.config # config/.config:46: trying to assign nonexistent symbol CONFIG_SSL_ENABLE_V23_HANDSHAKE * * axTLS Configuration * Platform > 1. Linux (CONFIG_PLATFORM_LINUX) 2. Cygwin (CONFIG_PLATFORM_CYGWIN) 3. Win32 (CONFIG_PLATFORM_WIN32) choice[1-3]: 1 * * General Configuration * axTLS installation prefix (PREFIX) [/usr/local] /usr/local Build axTLS with Debugging symbols (CONFIG_DEBUG) [N/y/?] n Strip unwanted sections from elf binaries (CONFIG_STRIP_UNWANTED_SECTIONS) [N/y/?] n Any extra CFLAGS options for the compiler? (CONFIG_EXTRA_CFLAGS_OPTIONS) [] Any extra LDFLAGS options for the compiler? (CONFIG_EXTRA_LDFLAGS_OPTIONS) [] * * SSL Library * Mode 1. Server only - no verification (CONFIG_SSL_SERVER_ONLY) 2. Server only - with verification (CONFIG_SSL_CERT_VERIFICATION) 3. Client/Server enabled with diagnostics (CONFIG_SSL_FULL_MODE) > 4. Skeleton mode - the smallest server mode (CONFIG_SSL_SKELETON_MODE) choice[1-4]: 4 Server enabled (CONFIG_SSL_ENABLE_SERVER) [Y/n/?] y Client enabled (CONFIG_SSL_ENABLE_CLIENT) [Y/n/?] y Diagnostic messages (CONFIG_SSL_DIAGNOSTICS) [N/y/?] n Protocol Preference > 1. Low (CONFIG_SSL_PROT_LOW) 2. Medium (CONFIG_SSL_PROT_MEDIUM) 3. High (CONFIG_SSL_PROT_HIGH) choice[1-3]: 1 Enable AES cipher (CONFIG_SSL_AES) [Y/n/?] y Enable default key (CONFIG_SSL_USE_DEFAULT_KEY) [Y/n/?] y Generate X.509 Certificate (CONFIG_SSL_GENERATE_X509_CERT) [N/y/?] n Maximum number of certificate authorites (CONFIG_X509_MAX_CA_CERTS) [0] 0 Maximum number of chained certificates (CONFIG_SSL_MAX_CERTS) [3] 3 Enable SSL_CTX mutexing (CONFIG_SSL_CTX_MUTEXING) [N/y/?] n Use /dev/urandom (CONFIG_USE_DEV_URANDOM) [N/y/?] n Enable openssl API compatibility (CONFIG_OPENSSL_COMPATIBLE) [N/y/?] n Enable axtlswrap (CONFIG_AXTLSWRAP) [N/y/?] n Enable HTTP/HTTPS Web Server (CONFIG_AXHTTPD) [N/y/?] n * * Language Bindings * Create language bindings (CONFIG_BINDINGS) [N/y/?] n * * Samples * Create Samples (CONFIG_SAMPLES) [N/y/?] n make[1]: Leaving directory '/home/rook/git/micropython/lib/axtls' cd ../../lib/axtls; make clean make[1]: Entering directory '/home/rook/git/micropython/lib/axtls' make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/crypto' make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/crypto' make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/ssl' make -C test clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/ssl/test' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/ssl/test' make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/ssl' make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/httpd' make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/httpd' make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/axtlswrap' make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/axtlswrap' make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/samples' make -C c clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/samples/c' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/samples/c' make -C csharp clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/samples/csharp' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/samples/csharp' make -C vbnet clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/samples/vbnet' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/samples/vbnet' make -C java clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/samples/java' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/samples/java' make -C perl clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/samples/perl' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/samples/perl' make -C lua clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/samples/lua' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/samples/lua' make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/samples' make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/docsrc' make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/docsrc' make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/bindings' make -C csharp clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/bindings/csharp' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/bindings/csharp' make -C vbnet clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/bindings/vbnet' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/bindings/vbnet' make -C java clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/bindings/java' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/bindings/java' make -C perl clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/bindings/perl' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/bindings/perl' make -C lua clean make[3]: Entering directory '/home/rook/git/micropython/lib/axtls/bindings/lua' make[3]: Leaving directory '/home/rook/git/micropython/lib/axtls/bindings/lua' make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/bindings' make[1]: Leaving directory '/home/rook/git/micropython/lib/axtls' cd ../../lib/axtls; make all CC="gcc" LD="ld" make[1]: Entering directory '/home/rook/git/micropython/lib/axtls' make -C crypto make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/crypto' gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o aes.o aes.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o bigint.o bigint.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o crypto_misc.o crypto_misc.c crypto_misc.c: In function ‘RNG_initialize’: crypto_misc.c:126:5: warning: ‘i’ is used uninitialized in this function [-Wuninitialized] memcpy(entropy_pool, &i, ENTROPY_POOL_SIZE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o hmac.o hmac.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o md5.o md5.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o rc4.o rc4.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o rsa.o rsa.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o sha1.o sha1.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o sha256.o sha256.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o sha384.o sha384.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o sha512.o sha512.c make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/crypto' make -C ssl make[2]: Entering directory '/home/rook/git/micropython/lib/axtls/ssl' gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o asn1.o asn1.c asn1.c:88:22: warning: ‘sig_key_usage’ defined but not used [-Wunused-const-variable=] static const uint8_t sig_key_usage[] = ^~~~~~~~~~~~~ asn1.c:83:22: warning: ‘sig_basic_constraints’ defined but not used [-Wunused-const-variable=] static const uint8_t sig_basic_constraints[] = ^~~~~~~~~~~~~~~~~~~~~ asn1.c:78:22: warning: ‘sig_subject_alt_name’ defined but not used [-Wunused-const-variable=] static const uint8_t sig_subject_alt_name[] = ^~~~~~~~~~~~~~~~~~~~ gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o gen_cert.o gen_cert.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o loader.o loader.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o openssl.o openssl.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o os_port.o os_port.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o p12.o p12.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o tls1.o tls1.c tls1.c: In function ‘process_certificate’: tls1.c:2019:9: warning: unused variable ‘i’ [-Wunused-variable] int i = 0; ^ tls1.c:2015:15: warning: variable ‘chain’ set but not used [-Wunused-but-set-variable] X509_CTX *chain = 0; ^~~~~ gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o tls1_svr.o tls1_svr.c tls1_svr.c:39:22: warning: ‘g_asn1_sha256’ defined but not used [-Wunused-const-variable=] static const uint8_t g_asn1_sha256[] = ^~~~~~~~~~~~~ gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o tls1_clnt.o tls1_clnt.c gcc -I../config -I../ssl -I../crypto -Wall -Wstrict-prototypes -Wshadow -g -Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -c -o x509.o x509.c ar -rcs .././_stage/libaxtls.a ../crypto/aes.o ../crypto/bigint.o ../crypto/crypto_misc.o ../crypto/hmac.o ../crypto/md5.o ../crypto/rc4.o ../crypto/rsa.o ../crypto/sha1.o ../crypto/sha256.o ../crypto/sha384.o ../crypto/sha512.o asn1.o gen_cert.o loader.o openssl.o os_port.o p12.o tls1.o tls1_svr.o tls1_clnt.o x509.o make[2]: Leaving directory '/home/rook/git/micropython/lib/axtls/ssl' make[1]: Leaving directory '/home/rook/git/micropython/lib/axtls' cp ../../lib/axtls/_stage/libaxtls.a build/libaxtls.a λ unix master make -j4 Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. mkdir -p build/genhdr make[1]: Entering directory '/home/rook/git/micropython/mpy-cross' Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. mkdir -p build/genhdr mkdir -p build/ mkdir -p build/extmod/ mkdir -p build/lib/embed/ mkdir -p build/lib/utils/ mkdir -p build/py/ GEN build/genhdr/mpversion.h GEN build/genhdr/qstr.i.last GEN build/genhdr/qstr.split GEN build/genhdr/qstrdefs.collected.h QSTR updated GEN build/genhdr/qstrdefs.generated.h CC ../py/mpstate.c CC ../py/nlrx86.c CC ../py/nlrx64.c CC ../py/nlr.c CC ../py/nlrthumb.c CC ../py/nlrxtensa.c CC ../py/nlrsetjmp.c CC ../py/malloc.c CC ../py/gc.c CC ../py/pystack.c CC ../py/vstr.c CC ../py/qstr.c CC ../py/mpprint.c CC ../py/unicode.c CC ../py/mpz.c CC ../py/reader.c CC ../py/lexer.c CC ../py/parse.c CC ../py/scope.c CC ../py/compile.c CC ../py/emitcommon.c CC ../py/emitbc.c CC ../py/asmbase.c CC ../py/asmx64.c CC ../py/emitnx64.c CC ../py/asmx86.c CC ../py/emitnx86.c CC ../py/asmthumb.c CC ../py/emitnthumb.c CC ../py/emitinlinethumb.c CC ../py/asmarm.c CC ../py/emitnarm.c CC ../py/asmxtensa.c CC ../py/emitnxtensa.c CC ../py/emitinlinextensa.c CC ../py/formatfloat.c CC ../py/parsenumbase.c CC ../py/parsenum.c CC ../py/emitglue.c CC ../py/persistentcode.c CC ../py/runtime.c CC ../py/runtime_utils.c CC ../py/scheduler.c CC ../py/nativeglue.c CC ../py/stackctrl.c CC ../py/argcheck.c CC ../py/warning.c CC ../py/map.c CC ../py/objarray.c CC ../py/obj.c CC ../py/objattrtuple.c CC ../py/objboundmeth.c CC ../py/objcell.c CC ../py/objbool.c CC ../py/objclosure.c CC ../py/objcomplex.c CC ../py/objdeque.c CC ../py/objdict.c CC ../py/objenumerate.c CC ../py/objexcept.c CC ../py/objfilter.c CC ../py/objfloat.c CC ../py/objfun.c CC ../py/objgenerator.c CC ../py/objgetitemiter.c CC ../py/objint.c CC ../py/objint_longlong.c CC ../py/objint_mpz.c CC ../py/objlist.c CC ../py/objmap.c CC ../py/objmodule.c CC ../py/objobject.c CC ../py/objpolyiter.c CC ../py/objproperty.c CC ../py/objnone.c CC ../py/objnamedtuple.c CC ../py/objrange.c CC ../py/objreversed.c CC ../py/objset.c CC ../py/objsingleton.c CC ../py/objslice.c CC ../py/objstr.c CC ../py/objstrunicode.c CC ../py/objstringio.c CC ../py/objtuple.c CC ../py/objtype.c CC ../py/objzip.c CC ../py/opmethods.c CC ../py/sequence.c CC ../py/stream.c CC ../py/binary.c CC ../py/builtinimport.c CC ../py/builtinevex.c CC ../py/builtinhelp.c CC ../py/modarray.c CC ../py/modbuiltins.c CC ../py/modcollections.c CC ../py/modgc.c CC ../py/modmath.c CC ../py/modio.c CC ../py/modcmath.c CC ../py/modmicropython.c CC ../py/modstruct.c CC ../py/modsys.c CC ../py/moduerrno.c CC ../py/modthread.c CC ../py/vm.c CC ../py/bc.c CC ../py/showbc.c CC ../py/repl.c CC ../py/smallint.c CC ../py/frozenmod.c CC ../extmod/moductypes.c CC ../extmod/modujson.c CC ../extmod/modure.c CC ../extmod/moduzlib.c CC ../extmod/moduheapq.c CC ../extmod/modutimeq.c CC ../extmod/moduhashlib.c CC ../extmod/modubinascii.c CC ../extmod/virtpin.c CC ../extmod/machine_mem.c CC ../extmod/machine_pinbase.c CC ../extmod/machine_signal.c CC ../extmod/machine_pulse.c CC ../extmod/machine_i2c.c CC ../extmod/machine_spi.c CC ../extmod/modussl_axtls.c CC ../extmod/modussl_mbedtls.c CC ../extmod/modurandom.c CC ../extmod/moduselect.c CC ../extmod/modwebsocket.c CC ../extmod/modwebrepl.c CC ../extmod/modframebuf.c CC ../extmod/vfs.c CC ../extmod/vfs_reader.c CC ../extmod/vfs_fat.c CC ../extmod/vfs_fat_diskio.c CC ../extmod/vfs_fat_file.c CC ../extmod/utime_mphal.c CC ../extmod/uos_dupterm.c CC ../lib/embed/abort_.c CC ../lib/utils/printf.c CC main.c CC gccollect.c LINK mpy-cross text data bss dec hex filename 140382 12960 864 154206 25a5e mpy-cross make[1]: Leaving directory '/home/rook/git/micropython/mpy-cross' GEN build/frozen.c MPY modules/upip_utarfile.py MPY modules/upip.py GEN build/genhdr/mpversion.h GEN build/genhdr/qstr.i.last GEN build/genhdr/qstr.split GEN build/genhdr/qstrdefs.collected.h QSTR updated GEN build/genhdr/qstrdefs.generated.h CC ../../py/mpstate.c CC ../../py/nlr.c CC ../../py/nlrx86.c CC ../../py/nlrx64.c CC ../../py/nlrthumb.c CC ../../py/nlrxtensa.c CC ../../py/nlrsetjmp.c CC ../../py/malloc.c CC ../../py/gc.c CC ../../py/pystack.c CC ../../py/qstr.c CC ../../py/vstr.c CC ../../py/mpprint.c CC ../../py/unicode.c CC ../../py/mpz.c CC ../../py/reader.c CC ../../py/lexer.c CC ../../py/parse.c CC ../../py/scope.c CC ../../py/compile.c CC ../../py/emitcommon.c CC ../../py/emitbc.c CC ../../py/asmbase.c CC ../../py/asmx64.c CC ../../py/emitnx64.c CC ../../py/asmx86.c CC ../../py/emitnx86.c CC ../../py/asmthumb.c CC ../../py/emitnthumb.c CC ../../py/emitinlinethumb.c CC ../../py/asmarm.c CC ../../py/emitnarm.c CC ../../py/asmxtensa.c CC ../../py/emitnxtensa.c CC ../../py/emitinlinextensa.c CC ../../py/formatfloat.c CC ../../py/parsenumbase.c CC ../../py/parsenum.c CC ../../py/emitglue.c CC ../../py/persistentcode.c CC ../../py/runtime.c CC ../../py/runtime_utils.c CC ../../py/scheduler.c CC ../../py/nativeglue.c CC ../../py/stackctrl.c CC ../../py/argcheck.c CC ../../py/warning.c CC ../../py/map.c CC ../../py/obj.c CC ../../py/objarray.c CC ../../py/objattrtuple.c CC ../../py/objbool.c CC ../../py/objboundmeth.c CC ../../py/objcell.c CC ../../py/objcomplex.c CC ../../py/objclosure.c CC ../../py/objdeque.c CC ../../py/objdict.c CC ../../py/objenumerate.c CC ../../py/objexcept.c CC ../../py/objfilter.c CC ../../py/objfloat.c CC ../../py/objfun.c CC ../../py/objgenerator.c CC ../../py/objgetitemiter.c CC ../../py/objint.c CC ../../py/objint_longlong.c CC ../../py/objint_mpz.c CC ../../py/objlist.c CC ../../py/objmap.c CC ../../py/objmodule.c CC ../../py/objobject.c CC ../../py/objpolyiter.c CC ../../py/objproperty.c CC ../../py/objnone.c CC ../../py/objnamedtuple.c CC ../../py/objrange.c CC ../../py/objreversed.c CC ../../py/objset.c CC ../../py/objsingleton.c CC ../../py/objslice.c CC ../../py/objstr.c CC ../../py/objstrunicode.c CC ../../py/objstringio.c CC ../../py/objtuple.c CC ../../py/objtype.c CC ../../py/objzip.c CC ../../py/opmethods.c CC ../../py/sequence.c CC ../../py/stream.c CC ../../py/builtinimport.c CC ../../py/binary.c CC ../../py/builtinevex.c CC ../../py/builtinhelp.c CC ../../py/modarray.c CC ../../py/modbuiltins.c CC ../../py/modcollections.c CC ../../py/modgc.c CC ../../py/modio.c CC ../../py/modmath.c CC ../../py/modcmath.c CC ../../py/modmicropython.c CC ../../py/modstruct.c CC ../../py/modsys.c CC ../../py/moduerrno.c CC ../../py/modthread.c CC ../../py/vm.c CC ../../py/bc.c CC ../../py/showbc.c CC ../../py/repl.c CC ../../py/smallint.c CC ../../py/frozenmod.c CC ../../extmod/moductypes.c CC ../../extmod/modujson.c CC ../../extmod/modure.c CC ../../extmod/moduzlib.c CC ../../extmod/moduheapq.c CC ../../extmod/modutimeq.c CC ../../extmod/moduhashlib.c CC ../../extmod/modubinascii.c CC ../../extmod/virtpin.c CC ../../extmod/machine_mem.c CC ../../extmod/machine_pinbase.c CC ../../extmod/machine_signal.c CC ../../extmod/machine_i2c.c CC ../../extmod/machine_pulse.c CC ../../extmod/modussl_axtls.c CC ../../extmod/machine_spi.c CC ../../extmod/modussl_mbedtls.c CC ../../extmod/modurandom.c CC ../../extmod/moduselect.c CC ../../extmod/modwebsocket.c CC ../../extmod/modwebrepl.c CC ../../extmod/modframebuf.c CC ../../extmod/vfs.c CC ../../extmod/vfs_reader.c CC ../../extmod/vfs_fat.c CC ../../extmod/vfs_fat_diskio.c CC ../../extmod/vfs_fat_file.c CC ../../extmod/utime_mphal.c CC ../../extmod/uos_dupterm.c CC ../../lib/embed/abort_.c CC ../../lib/utils/printf.c CC build/frozen.c GEN build/frozen_mpy.c CC main.c CC gccollect.c CC unix_mphal.c CC mpthreadport.c CC input.c CC file.c CC modmachine.c CC modos.c CC moduos_vfs.c CC modtime.c CC moduselect.c CC alloc.c CC coverage.c CC fatfs_port.c CC ../../extmod/modbtree.c CC ../../lib/berkeley-db-1.xx/btree/bt_close.c CC ../../lib/berkeley-db-1.xx/btree/bt_conv.c CC ../../lib/berkeley-db-1.xx/btree/bt_debug.c CC ../../lib/berkeley-db-1.xx/btree/bt_delete.c CC ../../lib/berkeley-db-1.xx/btree/bt_get.c CC ../../lib/berkeley-db-1.xx/btree/bt_open.c CC ../../lib/berkeley-db-1.xx/btree/bt_overflow.c CC ../../lib/berkeley-db-1.xx/btree/bt_page.c CC ../../lib/berkeley-db-1.xx/btree/bt_put.c CC ../../lib/berkeley-db-1.xx/btree/bt_search.c CC ../../lib/berkeley-db-1.xx/btree/bt_seq.c CC ../../lib/berkeley-db-1.xx/btree/bt_split.c CC ../../lib/berkeley-db-1.xx/btree/bt_utils.c CC ../../lib/berkeley-db-1.xx/mpool/mpool.c CC modtermios.c CC modusocket.c CC modffi.c CC ../../lib/mp-readline/readline.c CC ../../lib/timeutils/timeutils.c CC ../../lib/oofatfs/ff.c CC ../../lib/oofatfs/option/unicode.c CC build/frozen_mpy.c LINK micropython text data bss dec hex filename 2046 6695 0 8741 2225 build/build/frozen_mpy.o 2 0 0 2 2 build/build/frozen.o 422155 53664 2072 477891 74ac3 micropython λ unix master ll total 1940 drwxr-xr-x 8 rook rook 4096 May 25 19:20 build drwxr-xr-x 4 rook rook 4096 May 25 18:26 coverage-frzmpy drwxr-xr-x 4 rook rook 4096 May 25 18:26 coverage-frzstr drwxr-xr-x 2 rook rook 4096 May 25 18:26 modules -rw-r--r-- 1 rook rook 3610 May 25 18:26 alloc.c -rw-r--r-- 1 rook rook 15247 May 25 18:26 coverage.c -rw-r--r-- 1 rook rook 71 May 25 18:26 fatfs_port.c -rw-r--r-- 1 rook rook 1587 May 25 18:26 fdfile.h -rw-r--r-- 1 rook rook 9650 May 25 18:26 file.c -rw-r--r-- 1 rook rook 5270 May 25 18:26 gccollect.c -rw-r--r-- 1 rook rook 3736 May 25 18:26 input.c -rw-r--r-- 1 rook rook 206 May 25 18:26 input.h -rw-r--r-- 1 rook rook 22736 May 25 18:26 main.c -rw-r--r-- 1 rook rook 9586 May 25 18:26 Makefile -rwxr-xr-x 1 rook rook 482432 May 25 19:20 micropython -rw-r--r-- 1 rook rook 1207151 May 25 19:20 micropython.map -rw-r--r-- 1 rook rook 16569 May 25 18:26 modffi.c -rw-r--r-- 1 rook rook 23471 May 25 18:26 modjni.c -rw-r--r-- 1 rook rook 3491 May 25 18:26 modmachine.c -rw-r--r-- 1 rook rook 7658 May 25 18:26 modos.c -rw-r--r-- 1 rook rook 5612 May 25 18:26 modtermios.c -rw-r--r-- 1 rook rook 6567 May 25 18:26 modtime.c -rw-r--r-- 1 rook rook 2877 May 25 18:26 moduos_vfs.c -rw-r--r-- 1 rook rook 11052 May 25 18:26 moduselect.c -rw-r--r-- 1 rook rook 21101 May 25 18:26 modusocket.c -rw-r--r-- 1 rook rook 2139 May 25 18:26 mpconfigport_coverage.h -rw-r--r-- 1 rook rook 1815 May 25 18:26 mpconfigport_fast.h -rw-r--r-- 1 rook rook 1563 May 25 18:26 mpconfigport_freedos.h -rw-r--r-- 1 rook rook 11849 May 25 18:26 mpconfigport.h -rw-r--r-- 1 rook rook 5436 May 25 18:26 mpconfigport_minimal.h -rw-r--r-- 1 rook rook 1285 May 25 18:26 mpconfigport.mk -rw-r--r-- 1 rook rook 1621 May 25 18:26 mpconfigport_nanbox.h -rw-r--r-- 1 rook rook 2255 May 25 18:26 mphalport.h -rw-r--r-- 1 rook rook 7127 May 25 18:26 mpthreadport.c -rw-r--r-- 1 rook rook 1374 May 25 18:26 mpthreadport.h -rw-r--r-- 1 rook rook 1231 May 25 18:26 qstrdefsport.h -rw-r--r-- 1 rook rook 6146 May 25 18:26 unix_mphal.c λ unix master ./micropython MicroPython v1.9.4-89-gdfeaea14 on 2018-05-25; linux version Use Ctrl-D to exit, Ctrl-E for paste mode >>> print(3 + 7 * 5) 38 >>> λ unix master