-
v1.8.3e4e45269 · ·
Many small improvements and additions, with btree support in ESP8266 port This release brings various improvements and additions to the core, extended modules and the ESP8266 port, as well as enhancements to the docs. There is now a "threshold" function in the gc module for the user to configure the garbage collector to run earlier than usual, in order to help reduce fragmentation of the heap. The btree module is now available in the ESP8266 port, and there is improved WebREPL file transfer: get file is now non-blocking (this change requires an update of the client software). py core: - nlrx64.S: prefix mp_thread_get_state with an underscore on Mac - stream: implement 2- and 3-arg write() method as an extension to CPython - gc: implement GC running by allocation threshold, user configurable - fix nlrthumb.c when DEBUG=1 is defined - obj: issue a warning when str and bytes objects are compared - mpconfig.h: fix description for MICROPY_PY_STR_BYTES_CMP_WARN - objstrunicode: str_index_to_ptr: should handle bytes too - objstrunicode: str_index_to_ptr: implement positive indexing properly - stream: implement generic flush() method, in terms of C-level ioctl - objstringio: add MP_STREAM_FLUSH ioctl and flush() method - objstringio: implement MP_STREAM_SEEK ioctl and add seek() method - stream: add adapter methods with POSIX-compatible signatures - mpconfig.h: add MICROPY_STREAMS_POSIX_API setting - py.mk: extra switches to build "embedded" BerkeleyDB BTree lib - mkrules.mk: allow to add more items for "clean" target using CLEAN_EXTRA - objstr: make .partition()/.rpartition() methods configurable - mpconfig.h: define MP_ALWAYSINLINE for reuse extmod: - modussl: rename to modussl_axtls.c, to allow impl using other SSL libs - modussl_axtls: further changes to allow alternative SSL modules - modussl_axtls: add dummy setblocking() method - vfs_fat: implement rmdir() method (aliases to unlink) - modussl_axtls: use mp_stream_close() method - modwebrepl: use mp_stream_close() method - modbtree: check __bt_open() return value for error - modbtree: switch to accepting stream object instead of filename - modbtree: implement __contains__ operation - modwebrepl: factor out "GET" iteration to write_file_chunk() - modwebrepl: make GET_FILE operation non-blocking - modbtree: open(): add option kwargs - modwebsocket: add readline method - modwebsocket: make compatible with non-default object models - modwebsocket: use mp_rom_map_elem_t and friends - modwebrepl: add GET_VER operation to query MicroPython version lib: - axtls: upgrade to axTLS 1.5.4 + MicroPython patchset - axtls: update, fixes esp8266 build - utils/stdout_helpers: move from minimal/uart_extra.c for reuse - embed/abort_: implementation of abort_() function raising uPy exception - berkeley-db-1.xx: switch to "embedded" branch - berkeley-db-1.xx: update, sets default page size to 4096 tests: - add test for extended arguments to stream .write() method - extmod/machine_pinbase: skip if machine.PinBase is not available - bytes_compare: rework test for bytes <-> str comparison - extmod/btree1: close database at the end of test - unicode_subscr.py: detailed test for subscripting unicode strings - run-tests: make "regex'ed .exp" facility available to device tests - io/bytesio_ext: test for .seek()/.flush() on BytesIO - extmod/btree1: tests against in-memory DB (using io.BytesIO) - machine_mem.py: too non-portable, rework as an example for unix port - machine1: revamp to work with unix port (which has "umachine") - basics: bytes/str.partition/rpartition are now optional mpy-cross: - fix Makefile to handle gc-sections linker flags on OS X - use binary file translation mode for creating mpy files on windows - fix mingw and msys2 compilation minimal port: - disable MICROPY_GC_ALLOC_THRESHOLD unix port: - mpthreadport: adjust minimum thread stack, and stack limit check - cache libaxtls.a in local build dir - disable MICROPY_GC_ALLOC_THRESHOLD for minimal build - enable MICROPY_PY_STR_BYTES_CMP_WARN - mpconfigport.h: include stdio.h by default - file: implement MP_STREAM_FLUSH ioctl - file: ioctl(): check that file is open before operations - file: fdfile_ioctl(): fix argument to check_fd_is_open() - file: use generic stream flush() method - enable websocket module - moduselect: allow poll.register(), etc. accept fd-like objects stmhal port: - fix malloc when used with external libraries - make SPI NSS pin definition optional - fix I2C mappings for STM32F429DISC board esp8266 port: - select axTLS for SSL implementation, following recent refactor - moduos: add rmdir() function - cache Xtensa-built libaxtls.a in local build dir - enable MICROPY_PY_STR_BYTES_CMP_WARN - dupterm_task_init() should be called before running _boot.py, etc - _boot.py: set GC alloc threshold to half of heap size - _boot.py: decrease GC alloc threshold to quarter of heap size - modpybuart: fix UART parity setting - axtls_helpers: remove abort_(), now in lib/embed/ - mpconfigport.h: include sys/types.h for POSIX types definitions - esp_mphal: implement libc's errno - enable btree module - eagle.rom.addr.v6.ld: add Enable_QMode symbol from SDK 2.0.0 - make APA102 driver inclusion configurable - makeimg.py: store firmware size as last 4 bytes of padding area - makeimg.py: append md5 hash to the generated binary - modesp: add check_fw() function to check integrity of the firmware - scripts/port_diag.py: include esp.check_fw() call - flashbdev: reserve extra sysparam sector for SDK 2.0.0 compatibility - scripts/inisetup: add commented-out call to esp.osdebug(None) - modmachine: implement idle() function - esp_mphal.h: add mp_hal_ticks_cpu() for reuse - modutime: actually implement ticks_cpu() - modmachine: implement dummy sleep() function - tutorial/intro: reword para abou -fm dio switch - modules/flashbdev: start filesystem at 0x90000 - esp8266.ld: increase firmware image size to 0x90000 (576K) docs: - add DHT to ESP8266 Quick Ref and Tutorial - fix some spelling mistakes - array: document array module - library/index: include array module in ToC - esp8266/intro: rename to "Getting started" from "Introduction" - esp8266/intro: add troubleshooting section - esp8266/quickref: link to installation instructions - esp8266/tutorial/intro: add anchor for link from quickeref - esp8266/intro: focus on hazards of unearthed power wrt electronics - uio: mention seek()/flush() support for io.BytesIO misc: - logo/1bit-logo A black & white version of the logo examples: - http_server*: update for buffered-like streams (read line by line) - embedding: example for embedding MicroPython in an app - embedding: add README - http_client*: be sure to close socket - network: split recv- and read-based HTTP servers qemu-arm: - enable gcc LTO option for nlrthumb.c
-
v1.8.21459a8d5 · ·
Thread support, ESP8266 memory improvements, btree module, improved docs This release brings multi-threading support in the form of the _thread module, which closely matches the semantics of the corresponding CPython module. There is support for GIL and non-GIL builds; without the GIL enabled one must protect concurrent access to mutable Python state at the Python level using Lock objects. Threading with the GIL is enabled in the cc3200 port on the WiPy. Threading without the GIL is enabled on the unix port. The ESP8266 port has support for frozen bytecode (for scripts in the modules/ subdirectory), as well as optimisations for reduced memory usage and decreased memory fragmentation. The ESP8266 RTC also resumes correctly after a deepsleep. An initial "btree" module has been implemented for database support (unix port only), and the documentation has been further improved, with pre-built PDF versions of the docs now available. py core: - parse: treat constants that start with underscore as private - objdict: implemented OrderedDict equality check - support to build berkeley db 1.85 and "btree" module - mpconfig.h: MP_NOINLINE is universally useful, move from unix port - makeqstrdefs.py: remove restriction that source path can't be absolute - mkrules.mk: define "lib" outside conditional block - rename __QSTR_EXTRACT flag to NO_QSTR - objtype: instance: inherit protocol vtable from a base class - mphal.h: if virtpin API is used, automagically include its header - objtype: inherit protocol vtable from base class only if it exists - add MP_STATE_THREAD to hold state specific to a given thread - add basic _thread module, with ability to start a new thread - modthread: properly cast concrete exception pointer to an object - modthread: add stack_size() function - modthread: add exit() function - modthread: implement lock object, for creating a mutex - modthread: add with-context capabilities to lock object - gc: make memory manager and garbage collector thread safe - modthread: satisfy unused-args warning - gc: fix 2 cases of concurrent access to ATB and FTB - modthread: be more careful with root pointers when creating a thread - modthread: call mp_thread_start/mp_thread_finish around threads - gc: fix GC+thread bug where ptr gets lost because it's not computed - make interning of qstrs thread safe - implement a simple global interpreter lock (GIL) - don't use gc or qstr mutex when the GIL is enabled, there is no need - modthread: make Lock objects work when GIL is enabled - mpthread.h: move GIL macros outside MICROPY_PY_THREAD block - modthread: allow to properly set the stack limit of a thread - nlrthumb: convert NLR thumb funcs from asm to C with inline-asm - nlrsetjmp: update to take into account new location of nlr_top - mpthread: include mpstate.h when defining GIL macros - gc: be sure to count last allocated block at heap end in stats - gc: calculate (and report) maximum contiguous free block size - builtinimport: disable "imported as namespace package" warning - mpconfig.h: mention MICROPY_PY_BTREE config option - objarray: split out header to allow direct access to object - rename mp_obj_type_t::stream_p to "protocol" extmod: - modbtree: initial implementation of "btree" module based on BerkeleyDB - modbtree: handle default value and error check - modbtree: implement .items() iterator - modbtree: actually implement end key support for .items() - modbtree: items(): Implement "end key inclusive" flag - modbtree: items(): Implement DESC flag - modbtree: __getitem__() should raise KeyError for non-existing key - modbtree: open(): Support "in-memory" database with filename=None - machine_pinbase: implementation of PinBase class - machine_pinbase: fix nanbox build - modlwip: store a chain of incoming pbufs, instead of only one - modbtree: implement keys(), values(), items() iterators - modbtree: cleverly implement "for key in btree:" syntax - modwebsocket: add readinto() method - modwebrepl: add readinto() method - modbtree: fix unused argument warning - modbtree: fixes for nanbox build - moduos_dupterm: reserve buffer bytearray object for dupterm - moduos_dupterm: reuse dupterm_arr_obj for write operations lib: - berkeley-db-1.xx: add Berkeley DB 1.85 as a submodule - berkeley-db-1.xx: update to upstream which builds for uPy - fatfs/option/ccsbcs: follow uPy optional features model - libm: format code to pass gcc v6.1.1 warning - libm: remove unused definition of "one" drivers: - display/ssd1306: add width arg and support 64px wide displays tests: - recursive_iternext: clang/Linux is even more stack-frugal than MacOS - bench: add testcase to compare bytes(N) vs b"\0" * N - add testcase for OrderedDict equality - add a testcase for machine.PinBase class - extmod: add "btree" module test - btree1: add testcase for iterating btree object directly - add tests for _thread module - add 3 more tests for _thread module - thread: remove need to sleep to wait for completion in some tests - thread: add tests for running GC within a thread, and heap stress - thread: rename thread_stress_XXX.py to stress_XXX.py - thread: add tests that mutate shared objects - thread: add test for concurrent interning of strings - thread: add test for concurrent mutating of user instance - thread: make stack-size test run correctly and reliable on uPy - thread: make sure that thread tests don't rely on floating point - thread: allow thread_sleep1 to run without floating point - thread: allow some tests to run on ports with not much heap - meminfo: update for addition of "max free sz" output - run-tests: If running thread tests on unix, don't run mutate ones unix port: - unbreak "minimal" target by disabling FatFs - mpconfigport_minimal.h: clearly mark where user-define config ends - deprecate support for GNU Readline (MICROPY_USE_READLINE=2) - time to build with --gc-sections - move "utime" module config to C level instead of make level - Makefile: libffi: Build with -Os - alloc: add option to use uPy's alloc-exec implementation even for libffi - alloc: make coverage build and its overzealous warnings happy - disable FatFs VFS for normal build, keep enabled for coverage - modmachine: include PinBase class - modmachine: enable time_pulse_us() function - fix Makefile to handle gc-sections linker flags on Mac OS - add basic thread support using pthreads - file: if write syscall returns because of EINTR then try again - implement garbage collection with threading - mpthreadport: use SA_SIGINFO for GC signal handler - gccollect: provide declaration of exported function - mpthreadport: suppress compiler warning about unused arguments - modtime: release the GIL when sleeping - enable btree module - Makefile: make "minimal" build be minimal again - mpconfigport_minimal.h: allow to print a string within 1KB of heap - main: error out on unknown value of suffix in -X heapsize= option - main: improve help for -X options a bit - main: when preparing sys.path, allocate exact strings on uPy heap - disable the GIL to improve performance of non-thread code windows port: - follow unix port changes regarding "utime" module - msvc: include machine_pinbase.c in build and enable umachine module stmhal port: - add board definition files for Olimex STM32-E407 - port of f4 hal commit 1d7fb82 to l4 hal (SD card modifications) - correct DMA to allow SD card on L4 MCUs - enable SD card on L4 MCUs cc3200 port: - update FreeRTOS to v9.0.0 - define our own FreeRTOS heap so it can go in a special segment - add basic threading capabilities - fix call to new exception to be _msg instead of _arg1 - use xTaskCreateStatic instead of osi_TaskCreate - mpthreadport: make mutex statically allocated - mpthreadport: properly initialise the main thread's data - gccollect: use MP_STATE_THREAD(stack_top) to get top of stack - mpthreadport: scan more root pointers from thread data - mpthreadport: move mem alloc outside the thread_mutex lock - enable the GIL - in FreeRTOSConfig.h, comment on configSUPPORT_STATIC_ALLOCATION - remove .boot section attribute from osi_TaskCreate function - start the simplelink spawn task using the static task creator - shrink the FreeRTOS heap and place TCB+stack in freed location - allow to compile bootloader with threading enabled - remove obsolete singleton heart-beat object teensy port: - update the README with OSX specific information and tips esp8266 port: - modnetwork: use struct bss_info::ssid_len for ESSID length - let RTC work correctly after deepsleep - switch floating-point arith routines to BootROM - Makefile: enable --verify option for esptool.py write_flash - use RTC to set date & time stamps for files - main.c: clear the command line history when (re)booting - enable frozen bytecode, with scripts in modules/ subdir - README: describe how to build mpy-cross - websocket_helper.py: avoid extra string allocations - websocket_helper.py: fix typo in debug output - modpybuart: allow setting baudrate and other params - explicitly collect garbage in bootstrap scripts - switch webrepl_setup to use frozen bytecode - switch webrepl to use frozen bytecode - README: promote from "highly experimental" to "experimental" - main: init recently added dupterm_arr_obj port state var - esp_mphal: call_dupterm_read: Use readinto() method - esp_mphal: properly handle dupterm EOF after switching to readinto() qemu-arm port: - disable gcc LTO option for nlrthumb.c docs: - esp8266/tutorial/network_basics: minor typo fix, ap becomes ap_if - add link to PDF version of docs in sidebar - library/network: wipy: fix literal block indentation - esp.socket: remove unused file - ure: typo fix - usocket: there must be empty line after .only:: - library/machine.Pin: mention GPIO and cross-link .value() function - machine.*: add "currentmodule:: machine" directive - pyb.*: add "currentmodule:: pyb" directive - machine.Pin: remove explicit target - machine.UART: cleanup pyboard section - machine.*: use proper class case in method headers - machine.Pin: add class designator to all constants - pyb.CAN: mark CAN.initfilterbanks() as classmethod explicitly - pyb.Pin: af_list() is a normal method, not a class method - pyb.ExtInt,pyb.Pin: mark up class methods as such - pyb.*: use proper class case in method headers - pyb.Pin: sort .af() and .af_list() methods together - builtins: enumerate all builtin functions implemented - library/index: add builtins.rst - machine.Pin: disambiguate object call method - machine*: remove explicit targets and "machine." prefixes on classes - uctypes: improve documentation - sys: detailed description of print_exception() diff from traceback module - add sphinx_selective_exclude extension suite - conf.py: active sphinx_selective_exclude extensions - rebuild docs from scratch, as required for proper only:: handling - select: add an article - sys: print_exception: Fixes/clarifications - conf.py: exclude cmath from modindex for wipy - library: fix typo in docs for usocket.listen() examples: - unix/ffi_example.py: update for current "ffi" module API - unix/ffi_example.py: remove TODO, make output more clear
-
v1.8.19b39263b · ·
Many ESP8266 improvements, enhanced WebREPL, and support for STM32L4 MCUs This release brings general improvements and bug fixes, and some new features. There is now a uerror module for consistent errno handling across ports, as well as textual names of OS errors that are printed when an OSError is raised. There is support for frozen packages, via both frozen scripts and frozen bytecode. WebREPL on the ESP8266 is greatly improved with many bug fixes and now supports an unlimited (or very large) number of reconnects. The os module on the ESP8266 now has rename, chdir, getcwd and stat. The unix port now includes the ussl module by default. The stmhal port has support for STM32L4 MCUs including the STM32L476 Discovery board and the LimiFrog board. README: - add explicit note that subdirs contain more READMEs - add "make deplibs" to quick build section - "quick build": Use "make axtls" after all CODECONVENTIONS.md: - describe git commit messages conventions py core: - obj: add warning note about get_array return value and GC blocks - objstr: binary type of str/bytes for buffer protocol is 'B' - runtime: properly handle passing user mappings to ** keyword args - repl: if there're no better alternatives, try to complete "import" - mpz: fix bug with overflowing C-shift in division routine - mpz: do Python style division/modulo within bignum divmod routine - mpz: fix mpn_div so that it doesn't modify memory of denominator - vstr: vstr_null_terminated_str(): Extend string by at most one byte - vstr: change allocation policy, +16 to requested size, instead of *2 - add mperrno.h file with uPy defined errno constants - add uerrno module, with errno constants and dict - parse: add uerrno to list of modules to look for constants in - mperrno: add EAFNOSUPPORT definition - repl: fix handling of backslash in quotes when checking continuation - gc: gc_dump_alloc_table(): Show byte/str and (byte)array objects - gc: make (byte)array type dumping conditional on these types being enabled - gc: use '=' char for tail blocks when dumping heap - mperrno: add some more MP_Exxx constants, related to networking - moduerrno: add more constants to the errno module - add mp_errno_to_str() and use it to provide nicer OSError msgs - objfloat, py/modmath: ensure M_PI and M_E defined - emitglue: fix build on AArch64 (ARMv8, etc.) related to loading .mpy files - objexcept: don't convert errno to str in constructor, do it in print - moduerrno: add EACCES, pretty common error on Unix - gc: gc_dump_alloc_table(): dump heap offset instead of actual address - objstr: make dedicated splitlines function, supporting diff newlines - objstringio: add TODO comment about avoiding copying on .getvalue() - modstruct: raise ValueError on unsupported format char - stream: support both "exact size" and "one underlying call" operations - declare constant data as properly constant - stream: add mp_stream_close() helper function - mphal.h: provide default prototypes for mp_hal_delay_us/mp_hal_ticks_us - rework frozen modules support to support packages - objstr: implement str.center() - allow to stat and import frozen mpy files using new frozen "VFS" - makeqstrdata.py: allow to have double-quote characters in qstrs - objnamedtuple: allow passing field names as a tuple - moduerrno: add EEXIST, EISDIR, ECONNREFUSED - modstruct: allow to have "0s" in struct format extmod: - modlwip: convert errno's to use MP_Exxx symbols - modlwip: rework how Python accept callback is called - when including extmod headers, prefix path with extmod/ - modwebsocket: add close() method - modwebrepl: add close() method - moduos_dupterm: dumpterm subsystem is responsible for closing stream - modussl: make more compatible with non-default obj representations - machine_i2c: redo mp_hal_pin macros to use open_drain and od_low - virtpin: initial implementation of open-ended C-level Pin interface - vfs_fat: replace text error messages by POSIX error numbers - vfs_fat: add chdir() method - vfs_fat: add getcwd() method - vfs_fat: add vfs.stat() method - add machine time_pulse_us function (at C and Python level) - machine: add MICROPY_PY_MACHINE_PULSE config for time_pulse_us lib: - timeutils/timeutils: timeutils_mktime may accept negative time values drivers: - cc3000: rename timeval to cc3000_timeval, to avoid clash - add C-level function to read DHT11 and DHT22 devices - display/ssd1306: update SSD1306_SPI to work with new API tools: - make-frozen.py: properly escape hex chars when making C strings - make-frozen.py: quick fix to support package-modules - mpy-tool.py: add checks for critical configuration vars - make-frozen.py: update for latest changes in frozen modules support - mpy-tool.py: include .py extension in frozen filename - mpy-tool.py: don't strip directories from the frozen source name - upgrade upip to 0.7: SSL cert warning, use uerrno, better usage message tests: - run-tests: factor out list of supported external boards - disable memoryview tests that overflow int conversion - basics/string_splitlines: reinstate feature test for splitlines - struct1: add testcase for an unknown type char - add testcase for str.center() - extmod/vfs_fat_ramdisk: add testcases for chdir(), getcwd() - misc/recursive_iternext.py: increase depth N from 1000 to 2000 - misc/recursive_iternext.py: provide more fine-grained selection of N - pyb/rtc: make RTC test on pyboard more reliable by calling init() mpy-cross: - add -s option to specify the embedded source filename unix port: - mphalport: add mp_hal_delay_us() for consistency with other ports - enable uerrno module - add ability to include frozen bytecode in the build - mpconfigport_coverage.h: add dedicated config file for coverage build - unix_mphal: implement mp_hal_ticks_us() - support frozen packages - Makefile: nanbox build is not compatible with modussl, disable - enable "ussl" module - mpconfigport.mk: document MICROPY_STANDALONE make-level option - Makefile: "make axtls": automatically fetch submodules if missing windows port: - enable multi-processor compilation for msvc stmhal port: - l4: adapt DMA to be able to support STM32L4 MCU series - l4: adapt startup code, clock configuration and interrupts - l4: make CCM/DTCM RAM start-up conditional on MCU type - l4: add support for machine.sleep on STM32L4 MCUs - dma: make DAC DMA descriptors conditional on having a DAC - add board files for LIMIFROG board - for LIMIFROG board, add early-init function to get to DFU mode - dma: fix builds for boards with an F4 or F7 but no DAC - sdcard: fix initialisation of DMA TX so that writes work - can: allow to get existing CAN obj if constructed without args - fix clock configuration for STM32L476-discovery; also add I2C2 - convert to use internal errno symbols; enable uerrno module - for network drivers, convert to use MP_Exxx errno symbols - led: allow LEDs to be in PWM mode with TIM1 and channels 1-4 - i2c: expose I2CHandle3 for use by custom C code - sdcard: allow to do unaligned read-from/write-to SD card - support frozen packages using .mpy files - moduos: getcwd(): use mp_obj_new_exception_arg1() - dac: add DAC deinit() method - uart: fix wrong baudrate calculation for stm32l4 series esp8266 port: - scripts/: remove use of pin.PULL_NONE - scripts/inisetup: don't start WebREPL on boot in master branch - scripts/: add fill() to NeoPixel - scripts/webrepl: add optional password argument to webrepl.start() - scripts/webrepl: add start_foreground() method - main: bump heap size to 28K - mpconfigport: reduce various parser-related allocation params - help: add "sta_if.active(True)" command - convert to use new MP_Exxx errno symbols - enable uerrno module, weak linked also as errno - change to use internal errno's - moduos.c: addition of the rename method to module uos - scripts/port_diag: add network diagnostic output - scripts/webrepl_setup: show password placeholder char - scripts/webrepl_setup: add max password length check - README: add a very first start section - add APA102 serial individually controllable LEDs support - enable collections.OrderedDict - main: update _boot module loading for recent frozen modules refactors - scripts/port_diag: dump network interface IP settings - esp_mphal: fix NLR buffer leak in call_dupterm_read() - esp_mphal: handle Ctrl+C from dupterm (e.g. WebREPL) - esp_mphal: mp_uos_dupterm_deactivate() may raise exception - add mp_hal_pin_input() and mp_hal_pin_output() functions - modpybspi: configure pins when initialising an SPI object - xtirq: add xtirq.h for controlling xtensa irqs - ets_alt_task: don't run ets_loop_iter if irqs are disabled - modmachine: add disable_irq and enable_irq functions - enable DHT C-level driver - add dht.py script for high-level control of DHT11/DHT22 sensor - Makefile: document "disable" value for UART_OS - modnetwork: scan() is only supported by STA when it's enabled - modnetwork: protect scan() callback against memory errors - modnetwork: allow to press ctrl-C while scan() is running - uart: properly initialise UART0 RXD pin in uart_config - moduos: add chdir() and getcwd() functions - scripts/ntptime: allow to override NTP server - modmachine: add machine.time_pulse_us function - enable MICROPY_PY_IO_FILEIO to get compliant text/binary streams - moduos.c: add stat() to the module uos of esp8266 - rtc: set RTC user memory length to 0 on first boot - provide a dedicated variable to disable ets_loop_iter - modpybrtc: handle RTC overflow docs: - machine.UART: filter out unimplemented UART methods from esp8266 docs - esp8266/quickref: new way to get MAC address - esp8266/quickstart: remove i2c examples with stop=False - ustruct: describe supported type codes - ussl: add basic description of axTLS-based modussl - esp8266: Include ussl module in the docs - machine: make disable_irq and enable_irq docs available for all - library/machine: add documentation for machine.time_pulse_us - math, cmath: add port availability information - library/index: add intro paragraph regarding availability of modules - README: add some hints for PDF docs generation - wipy/tutorial: add note about screen key bindings on OS X - esp8266/quickref: update WebREPL section for 1.8.1 release - esp8266: fix ESP8266 Network tutorial - esp8266/quickref: use local image of Adafruit Huzzah board - esp8266/general: add note about RTC overflow travis: - install gcc-arm-none-eabi with --force-yes for now
-
v1.82c2fc070 · ·
First general release of ESP8266 port, and support for frozen bytecode This release marks the first general release of official ESP8266 support within the MicroPython code base. The ESP8266 port has many improvements and additions, including: websocket and webrepl modules, deep-sleep mode, reading on UART, enhanced I2C support, enhanced network configuration, full sequence of start-up scripts (built-in _boot.py, boot.py and main.py), improved filesystem support with automatic flash-size detection as well as documentation and a tutorial. Known issues with ESP8266 port are: - Basic SSL support is available but it works only with relatively short data lengths (a few kilobytes). - WebREPL over SSL is not supported. - Only 5 or so WebREPL sessions in succession can be started (including file transfer sessions), after that the board requires a hard reset. - File transfer over WebREPL has issues with large files (above a few tens of kilobytes). - By design, only one concurrent WebREPL connection is supported. - Soft reset doesn't reset the network stack. In addition to ESP8266 support, this release brings frozen bytecode which allows to compile bytecode offline and link it into the firmware, completely eliminating the need for compilation (and the associated RAM usage) at runtime. Basic async/await syntax is now supported, and qstrs are now auto-generated in the build system. A detailed list of changes is given below. README: - explicitly point to required dependencies section - promote "docs" and "tests" to "major components" - mention support "async" keyword from Python 3.5 ACKNOWLEDGEMENTS: - add list of 842 backers from the ESP8266 campaign py core: - modbuiltins: add comment about setting "_" special var - add async/await/async for/async with syntax - fix constant folding and inline-asm to work with new async grammar - emitglue: move typedef of mp_raw_code_t from .c to .h file - emitglue: make mp_raw_code_t* arguments constant pointers - makeqstrdata: factor out some code to functions that can be reused - add ability to have frozen persistent bytecode from .mpy files - makeqstrdata: add more names for escaped chars and esc non-printable - simplify "and" action within parser by making ident-rules explicit - makeqstrdata: fix rendering of qstrs that have non-printable ASCII - makeqstrdata: add special case to handle \n qstr - declare help, input, open builtins in core - map: change hash-table allocation policy to be less aggressive - makeqstrdefs: add script to automate extraction of qstr from sources - frozenmod: pass the source name of the frozen module to the lexer - rework QSTR extraction to work in simple and obvious way - divide "split" and "cat" phases of qstr extraction for better efficiency - fix bug passing a string as a keyword arg in a dict - move call_function_*_protected() functions to py/ for reuse - makeqstrdefs.py: windows compatibility - obj.h: when constructing a small-int cast to mp_uint_t for bit-shift - emitnative: use MP_OBJ_NEW_SMALL_INT instead of manual bit shifting - vm: "yield from" didn't handle MP_OBJ_STOP_ITERATION optimization - modio: rename module name to "uio" for consistency with other modules - modcollections: rename module name have "u" prefix for consistency extmod: - add initial framebuf module - add generic machine.I2C class, with bit-bang I2C - machine_i2c: fix I2C reading by sending ack/nack at end of byte - machine_i2c: implement I2C memory reading/writing - moduos_dupterm: don't swallow exceptions in dupterm's read()/write() - modlwip: lwip_tcp_receive(): Properly handle EOF for non-blocking sock - modlwip: more debug messages for various edge conditions - fsusermount: in mount/mkfs, deregister VFS object on error - modlwip: lwip_tcp_send(): full error handling - modlwip: lwip_tcp_receive(): full error handling - modlwip: add ability to run callback on "recv" and "accept" events - machine_i2c: allow mp_hal_pin_obj_t to be any type, not a ptr - modlwip: protect recv/accept Python callback against exceptions - modlwip: workaround esp8266 sendto issue where 1 is returned - modlwip: add print_pcbs() debug function - modwebsocket: handle CLOSE control frame - modussl: throw Python exceptions in case of errors - modussl: support server-side SSL sockets - modussl: SSL_OK from ssl_read() means "no user data so far" - modwebrepl: module to handle WebREPL protocol - modwebrepl: initial implementation of "get file" operation - modwebrepl: keep reading data when there's something to read - modwebrepl: GET_FILE: Send length-prefix chunk with one write() - modwebrepl: add rate-limiting workaround for broken network drivers - modwebrepl: set debugging by default to off - modwebrepl: add support for password - modlwip: implement sendall() method for TCP sockets - fix typo of macro that detects if float is enabled lib: - utils/printf: rework overriding printer of DEBUG_printf() - utils/pyexec: condition-out GC calls from pyexec - utils/pyhelp: extract implementation of help(obj) to a library function - axtls: update to the latest upstream, fix reported MacOSX build issue drivers: - add SSD1306 OLED driver, with I2C and SPI interfaces tools: - mpy-tool.py: new tool to work with .mpy files; currently it can freeze them - mpy-tool.py: add support for Python 2.7 tests: - add 6 tests for async await/for/with - add .exp files for async tests, so they can run with Python 3.4 - fix dict1.py so it doesn't rely on the order of dict elems - extmod: move split-on-empty-match tests to a separate test file - add testcase for yielding from a stopped generator - run-bench-tests: process tests in alphabetical order - update for _io/_collections module having been renamed minimal port: - add example of frozen persistent bytecode (.mpy file) - disable async/await syntax unix port: - build with MICROPY_PY_UHASHLIB_SHA1 if already building with axTLS - make sure build dir exists before accessing it for freezing upip - Makefile: make install more compatible (BSD, etc.) windows port: - msvc: implement automatic qstr generation using makeqstrdefs stmhal port: - implement basic C-level pin HAL - use new generic I2C object in machine module - enable framebuf module - properly handle RTS/CTS flow control for buf/unbuf transfers - add Makefile option FROZEN_MPY_DIR to support frozen bytecode - for frozen bytecode generation, add dependency of qstr file - l4: add CMSIS files to support STM32L476 - l4: add basic STM32L4xx HAL files - l4: adapt UART HAL to avoid 64-bit integer division - update HALCOMMITS due to change to hal - l4: add board definition files for STM32L476DISC - l4: add line to Makefile for building L4 series - l4: modify adc.c to add support for STM32L4 series - l4: modify uart.c to support L4 MCU - l4: modify usbd_conf.c to support L4 MCU - l4: modify rtc.c to support L4 MCU - l4: modify timer.c to support L4 MCU - fix machine.unique_id() function to work for all MCUs - l4: modify mphalport to support L4 MCU - l4: modify flash.c and storage.c to support L4 MCU - l4: add support for external interrupts/events - accel: raise an exception if the accel couldn't be initialised - use pyhelp_print_obj function - change i2c.scan() method to scan addresses 0x08-0x77 - fix typo of macro that detects if float is enabled cc3200 port: - use pyhelp_print_obj function - change i2c.scan() method to scan addresses 0x08-0x77 - disable async/await syntax esp8266 port: - enable websocket module - modnetwork: .config(): Check interface whose config is requested - modnetwork: .config(): Add "authmode" param - modnetwork: .config(): Add "password" param (W/O) - add Python modules for initial configuration - scripts/inisetup.py: set WPA/WPA2 AP mode with a predefined password - protect modpyb.h header file from multiple inclusions - implement basic C-level pin HAL - switch from using custom I2C driver to generic extmod one - enable framebuf module - in callback helpers, pop nlr_buf on successful call - esp_mphal: don't swallow exceptions in dupterm's read()/write() - esp_mphal: call_dupterm_read(): Fix order of deactivating on EOF - remove pin_id field from C pin object - add dummy entries for non-existing pins to simplify pin logic - add hard IRQ callbacks for pin change on GPIO0-15 - separate 1-wire timing funcs from Python module to save iRAM - switch integer arith routines to BootROM - scripts/port_diag.py: module to collect diagnostic info - enable input() builtin - scripts/_boot: mount block device on "" instead of "/" - moduos: add uos.mkdir function - modmachine: add reset_cause() function - adapt port to use new auto-qstr generation - moduos: add dupterm_notify() function - esp_mphal: protect dupterm_task_handler() from recursive exec - README.md: update feature list for current state of affairs - modesp: allow esp.deepsleep to take 2nd arg for RF wake opt - scripts/flashbdev: use all available space in 1MB FlashROM for FS - modesp: add flash_size() function - scripts: don't try to create filesystem on 512KB devices or less - modnetwork: .config(): Add "channel" param - scripts/flashbdev: disable debug output/checks - scripts/_boot: print notice when initial setup is executed - scripts/flashbdev: correct bootloader flash size to match real size - modnetwork: .config(): Add "hidden ESSID" param - implement basic deep-sleep capabilities - add uart_rx_wait and uart_rx_char functions - implement UART.read functionality - uart: remove obsolete UART rx buffering code - esp_mphal: remove mp_hal_feed_watchdog - convert mp_hal_pin_obj_t from pin ptr to simple integer - allow GPIO16 to be used as a pin in the uPy pin HAL - change software SPI driver to use general pin HAL - scripts/websocket_helper: module encapsulating handshake sequences - scripts/websocket_helper: disable debug output - scripts/webrepl: webREPL based on C-level websocket object - scripts/webrepl: convert to persistent daemon - scripts/webrepl: don't start on import - scripts/webrepl: allow to override port - scripts/webrepl: print connection address - scripts/webrepl: print client address for incoming connections - scripts/flashbdev: use all available Flash for filesystem - scripts/webrepl: add "ws://" to "daemon started at" message - Makefile: add target to build axTLS - esp8266.ld: put axTLS to FlashROM - Makefile: override abort() when building axtls - axtls_helpers: helper/wrapper functions for axTLS - tests/onewire.py: don't run test on import - Makefile: support linking with axTLS built from source - Makefile: enable "ussl" module; axTLS should be built first using "make axtls" - move pyb.info() function to esp module and remove pyb module - move onewire.py, neopixel.py drivers from tests/ to scripts/ - scripts/onewire.py: simplify and improve 1-wire driver - scripts/neopixel.py: remove test function from neopixel driver - set suitable values for axtls's RT_MAX_PLAIN_LENGTH & RT_EXTRA - README: add recently required step of 'make axtls' - modnetwork: make WLAN.ifconfig() read/write - help: implement help() builtin - help: add cheatsheet for basic WiFi configuration - enable WebREPL file transfer rate limiting - enable webrepl module - scripts: move all of initial setup to inisetup module - scripts/inisetup: create default boot.py in filesystem - scripts/webrepl: connection ack prompt is now printed by modwebrepl - scripts/webrepl: switch to using _webrepl object wrapper - scripts/webrepl: add "first connection" mode to setup password - README: mention WebREPL - Makefile: be sure to pass cross-compiling AR when building axtls - scripts/webrepl_setup: reject too short passwords - change platform name from ESP8266 to esp8266 - modnetwork: remove deprecated wifi_mode() - esp_mphal: add ets_esf_free_bufs(), etc. functions - modesp: add esf_free_bufs() debugging function - modesp: add malloc() and free() functions - scripts/inisetup: enable WebREPL auto-start on boot - modnetwork: remove .mac() method, move to .config("mac") - scripts/inisetup: update for nic.mac() method being gone - scripts/neopixel.py: swap red and green in pixel accessor - modpybpin: use enum+array instead of struct for parsing args - modpybpin: use None instead of PULL_NONE for no-pull config - modpybpin: make pin.irq() methods take keyword args - tutorial: mention that esptool is available via pip - scripts/ntptime: add simple NTP client docs: - esp: enumerate flash access functions - machine: start to update for esp8266 port - speed_python: clarify/generalize "Buffers" subsection - speed_python: generalize "Floating point" subsection - speed_python: add many more details on memoryviews - machine: reset_cause() has been implemented for esp8266 - topindex.html: esp8266: Enable quickref/general on the main page - esp8266/general: start "General information" for esp8266 - esp8266: add info about using deep-sleep mode to quickref - esp8266/tutorial: add tutorial placeholder page - ustruct: there's no complete "struct" module, only "ustruct" subset - esp8266: include usocket module reference - library/usocket: add link to CPython's socket module - usocket: socket-specific exceptions are for WiPy only - usocket: socket.IPPROTO_SEC is WiPy-specific - usocket: describe address format once at the beginning - network: esp8266: scan(): add note that bssid is bytes object - library: group MicroPython-specific modules under separate heading - library/index: move WiPy "micro-libraries" under corresponding heading - library/index: esp8266 has the same set of stdlibs as pyboard/unix - module "time" is actually "utime" - library/index: make single section for "micro-ified" modules - library/index: order sections from the most to least standard modules - Makefile: default BUILDDIR based on MICROPY_PORT - library: "os" module is actually "uos" - fix uos and utime heading underlines to be the correct length - library/utime: add more time functions for unix and esp8266 ports - utime: describe time() peculiarities in MicroPython - utime: describe sleep() peculiarities in MicroPython - library: consistently use admonitions for CPython differences - ubinascii: clean up grammar - network: esp8266: Add wlan.ifconfig() method - network: esp8266: Describe wlan.config() method - make the short port names in the port/version sidebar lowercase - esp8266: update quickref to reflect changes to 1-wire and NeoPixel - library/utime: elaborate on epochs and calendar time maintenance - esp8266/quickref: add info about WebREPL - ustruct: document pack_into(), unpack_from() - sys: document sys.modules - ustruct: fix argument formatting - sys: remove port-specific details from description of stdin/out/err - sys: clarify description of sys.exit() - sys: clean up print_exception() description - sys: describe sys.implementation - sys: describe sys.maxsize - sys: describe sys.platform is port-neutral manner - add _collections module reference - add _io module reference - _io and _collections were renamed to have standard "u" prefix - library/machine.I2C: update to reflect ESP8266 implementation - esp8266/general: webREPL is described in quickref for now - esp8266/general: add more points to "Multitude of boards" section - esp8266/general: fix list formatting - esp8266/general: add techspec section - esp8266/general: add "Boot process" section - esp8266_contents: reference general and tutorial docs - network: esp8266: MAC address is set via .config() method - esp8266: add ESP8266 tutorial - machine: generalize docs from just WiPy to other ports - machine: move WiPy-specific hardware details to its general reference - machine: more generic description of sleep's, WiPy details to its genref - machine: idle() description generalization - library/machine.Pin: update pin docs to reflect ESP8266 support - esp8266/tutorial: update pins tutorial to reflect changes in API examples: - http_server_ssl.py: add HTTPS server example
-
v1.79b0a150b · ·
New MicroPython cross-compiler, and vastly improved ESP8266 port This release adds the MicroPython cross-compiler that can generate .mpy files (pre-compiled bytecode) which can be executed within any MicroPython runtime/VM. The ESP8266 port is also vastly improved thanks to a hugely successful Kickstarter campaign. This port now has an alternative event loop implementation to allow proper Berkeley sockets using lwIP built from source, and a greatly improved network module. Many extension modules are now enabled (ujson, ubinascii, uctypes, uhashlib, urandom, uheapq, ure, uzlib) and the machine module includes Timer, Pin, PWM, ADC, I2C, SPI, and basic UART. Bignums are supported, along with 30-bit precision floating point, and normal error messages. There is FatFS support and uos.dupterm. Many other improvements and bug fixes have been made to the core and other ports. The basic test suite can now run within a 16k heap. Inline assembler functions now support 4 arguments. The Unix port has the -i option to start the REPL after a script is finished. The stmhal port now exposes the flash and SD card as proper objects with the block protocol. There is support for generic STM32F439 boards, the NUCLEO-F411RE board, and targets to deploy via ST-LINK and OpenOCD. py core: - mpprint: fix sign extension when printf'ing %u, %x and %X - vm: fix popping of exception block in UNWIND_JUMP opcode - objstr: for str.format, add nested/computed fields support - objstr: for str.format, don't allocate on the heap for field name - extend native type-sig to use 4 bits, so uint is separate to ptr - mpz: complete implementation of mpz_{and,or,xor} for negative args - mpz: add commented-out mpz_pow3_inpl function, to compute (x**y)%z - viper: allow casting of Python integers to viper pointers - viper: allow uint as index to load/store, and give better error msg - objarray: implement "in" operator for bytearray - mpstate.h: fs_user_mount is now standard, reusable uPy functionality - asmx64: add helper macro for generating REX_[WRXB] bits from a reg64 - asmx64: support all 16 regs in reg to memory move instructions - emitnative: add check that RHS of viper store is of integral type - repl: check for an identifier char after the keyword - vm: add macros to hook into various points in the VM - parse: use m_renew_maybe to ensure that memory is shrunk in-place - malloc: provide a proper malloc-based implementation of realloc_ext - emitinlinethumb: use qstrs instead of char* for names of asm ops - add MICROPY_DYNAMIC_COMPILER option to config compiler at runtime - stackctrl: add mp_stack_set_top() to explicitly set stack top value - emitglue: get persistent bytecode working on Linux ARM platform - objboundmeth: allocate arg state on stack if heap alloc fails - use MP_SMALL_INT_POSITIVE_MASK to check if uint fits in a small int - fix passing of some wide int types to printf varg format list - objarray: fix array slice assignment when array is reallocated - formatfloat: fix buffer overflow when formatting tiny numbers - objfun: allow inline-asm functions to be called with 4 arguments - frozenmod: allow port to override lexer to use for frozen modules - parse: don't allocate an extra parse node for power exponent - parse: when looking up consts, check they exist before checking type - stream: add mp_stream_writeall() helper function - stream: fix object vs ptr usecase in mp_stream_writeall() - modio: initial implementation of io.BufferedWriter class - modio: implement io.BufferedWriter.flush() - modio: io.BufferedWriter: describe flushing policy - formatfloat: fix case of float format where leading digit was "10" - formatfloat: fix further cases of buffer overflow in formatting - parsenum: use pow function to apply exponent to decimal number - ringbuf.h: add reusable ring buffer class - map: prevent map resize failure from destroying map - move stream-related declarations from obj.h to stream.h - combine continuous block of emit steps into with_cleanup emit call - implement basic with support in native emitter - objarray: fix array.append so it doesn't extend if append fails - stream: add bigger inventory of stream ioctl's - stream: add Python-level ioctl() method extmod: - update uzlib to 1.2.2 - fsusermount: introduce separate mkfs() function - fsusermount: implement separate umount() function - fsusermount: change block protocol to support ioctl method - modmachine: truncate integers that are to be stored using mem* - fsusermount: expose umount as a public function - fsusermount: support mounting of multiple block devices - vfs_fat: object-oriented encapsulation of FatFs VFS - vfs_fat_diskio: reusable FatFs module, move from stmhal/diskio - vfs_fat_file: reusable FatFs module, move from stmhal/file - vfs_fat_ffconf: reusable FatFs module, move from stmhal/ffconf - vfs_fat: move listdir() method from stmhal for reuse - vfs_fat: add .remove() method - vfs_fat: add .mkdir() method - vfs_fat: add fat_vfs_import_stat(), reusable import stat routine - vfs_fat: add .rename() method - vfs_fat: add lexer, move from stmhal port for reuse - vfs_fat_lexer: make conditional on FatFs support enabled - modlwip: add .print() method - modlwip: implement dummy setsockopt() - modlwip: add stream protocol read method - modlwip: add dummy .makefile() method - modlwip: add stream .read() and .readline() methods - modlwip: check for state change during recv busy-wait loop - modlwip: still process remaining incoming data of a closed socket - modlwip: add .write() stream method - modlwip: support non-blocking recv() - modlwip: factor out "socket connected" check to a function - modlwip: use MICROPY_EVENT_POLL_HOOK for event polling if defined - modlwip: rework getaddrinfo() data passing - modlwip: add socket.setblocking() method - modlwip: lwip_tcp_receive: Properly map lwIP error to POSIX errno - uctypes: use mp_binary_get_val helper when extracting value - uctypes: finish support for FLOAT32 and FLOAT64 types - modwebsocket: start module for WebSocket helper functions - modwebsocket: implement read support - modlwip: add SOL_SOCKET and SO_REUSEADDR constants for setsockopt() - modlwip: implement setsocketopt(SO_REUSEADDR) - modlwip: lwip_tcp_send: handle properly send buffer full condition - modlwip: add lwip->POSIX error map for lwIP 1.4.0 - modlwip: lwip_socket_setsockopt: handle option value properly - vfs_fat_diskio: actually support sectors != 512 with Python blockdevs - modwebsocket: properly check number of args to constructor - modure: re_exec() renamed to ure_exec() due to collison in 4.3BSD - modwebsocket: make sure to propagate EOF - modwebsocket: reset mask between packets - modwebsocket: add option for blocking writes to non-blk sockets - modwebsocket: record current fragment type (binary/text/etc.) - modwebsocket: allow to get type of last read data using ioctl() - modwebsocket: implement MP_STREAM_SET_DATA_OPTS ioctl - modwebsocket: split websocket-related defines for reuse - modlwip: fix for loss of data in unaccepted incoming sockets - modwebsocket: support write size beyond 125 bytes lib: - fatfs: add support for sector sizes larger than 512 bytes - axtls: update to the latest upstream master drivers: - sdcard: add support for multi-block read/write; add SD test tests: - open_plus: add tests for "r+", "w+" open modes - pyb: add simple test for stm module on pyboard - run-tests: add esp8266 target - bytearray1: add testcases for "in" operator - vfs_fat_ramdisk: add test for VfsFat - vfs_fat_ramdisk: switch to ioctl-based blockdev API - vfs_fat_ramdisk: allow to override sector size - vfs_fat_ramdisk: skip test if can't allocate ramdisk - skip uctypes and urandom tests not supported byt the WiPy - vfs_fat_ramdisk: add .listdir() testcase - vfs_fat_ramdisk: add testcase for .remove() - vfs_fat_ramdisk: add testcase for .mkdir() - vfs_fat_ramdisk: allow to run in native mode (don't use "with") - vfs_fat_ramdisk: add testcase for .rename() - reduce large object allocations so tests can run with small heap - print_exception: use exception which prints the same regardless of config - recursive_iternext.py: make low-heap friendly - run-tests: simplify handling of newline in output from tests - run-tests: add cmd line option "--heapsize" - split large tests into smaller files, to run with a small heap - add new subdir "stress/" specifically for stress tests - add a test for argument passing to inline-asm functions - add test for io.BufferedWriter - wipy: add Timer class tests - float2int_fp30: variant of float2int for 30-bit stuffed float - string_format_fp30: variant of string_format for 30-bit stuffed float mpy-cross: - add new component, a cross compiler for MicroPython bytecode - give a more sensible error message when file doesn't exist - remove setting of MICROPY_FORCE_32BIT=1 from Makefile unix port: - file: stop assuming that O_RDWR == O_RDONLY | O_WRONLY - enable VfsFat support - enabled importing of persistent bytecode (.mpy files) - modsocket: add comment regarding close() error checking (which is none) - unix_mphal: hack to make uos.dupterm() actually work - implement -i option (inspect - start REPL after script is finished) - file: parse "buffering" argument of open() builtin - file: "encoding" arg to open() isn't kw-only - djgpp errno.h have no ENOTSUP, so define it to Linux value - freedos: strip and size names for binaries stmhal port: - diskio: introduce MICROPY_HW_HAS_FLASH setting - move stmhal-specific FatFs routines/structs to fatfs_port.c - file: recast as "FatFs file" class, to support other VFS types - file: for self-contained usecase, don't define global types - improve NUCLEO-F401RE build, with UART2 as REPL - expose flash and SD card as proper objects with block protocol - add mount/umount/mkfs to os module - add a function for setting the pin alternate function - NUCLEO 401 - Add a bunch of missing pins and reorder the pins - CERB40 - Add pins defines for I2C3 - NUCLEO 401 - Add definitions for I2C2 and I2C3 - diskio: add provision for default returns for ioctl INIT/SEC_SIZE - improvements to the STM32F4DISC UART config settings - enabled importing of persistent bytecode (.mpy files) - make SPI use mp_hal_gpio_set_af - switch from dfu-util to tools/pydfu.py for default deploy method - add stmhal-specific README.md with extra details for this port - add makefile target to deploy stmhal build via ST-LINK - add support for generic STM32F439 board (non DISCO) - add makefile target and configuration to deploy via OpenOCD - add board definition files for NUCLEO_F411RE - rename STM32F401NUCLEO to NUCLEO_F401RE - NUCELO_F401RE cleanup - consistently enable USB SOF Irqs for all USB modes (FS and HS) qemu-arm port: - reinitialise uPy heap and runtime at start of each test - enable builtin override feature, and enable more tests cc3200 port: - add stmhal/builtin_open.c to build - fix breakage after VfsFat refactor - finally fix the Timer class API - improve robustness of the I2C driver - simplify the Timer API and correct the documents - fix "debug" build - improve robustness of WLAN during sleep modes - rename 'server' class to 'Server' for consistency - update WiPy software version to 1.2.0 esp8266 port: - modesp: implement flash_write(), flash_erase() - README: add hint about adding toolchain to PATH - modpybrtc: simplify multiplication by fixed-point value - switch bignum implementation from long-long to mpz - enable float support, using 30-bit stuffed floats - enable math module - allow Makefile's PORT variable to be overridden - change "soft reboot" message to work with pyboard.py - add network.ifconfig() - enable ujson, ubinascii, and uctypes modules - esp8266.ld: link in SDK version section - enable config settings helpful for debugging - enable uhashlib module - enable more features in mpconfigport.h - add mp_hal_delay_us function - add time.{sleep_ms,sleep_us,ticks_ms,ticks_us,ticks_diff} - reset "virtual RTC" on power on - modutime: support float argument to time.sleep() - add modmachine with mem* arrays - modmachine: basic implementation of Timer for OS virtual timers - modmachine: changing params of a timer requires disarming it first - etshal.h: add timer functions prototypes - modmachine: use etshal.h - modmachine: timer: Add ONE_SHOT and PERIODIC symbolic constants - add custom _assert() function - implement Pin.__call__() and Pin.OPEN_DRAIN mode - expose simple pin API at C level - modpybpin: add support for GPIO16 - modmachine: add Pin class from modpyb - etshal.h: more prototypes of ESP8266 SDK/BootROM functions - support raising KeyboardInterrupt on Ctrl+C - uart: add uart_flush() function - allow Makefile's BAUD variable to be overridden - enable stack overflow checking - don't gc-collect BSS - enable modlwip - Makefile: add define for ESP8266 lwIP - put more code in iROM section - main: module to run on boot is "boot", not "main" - move pyb.freq to machine.freq - modnetwork: allow to configure STA and AP interfaces separately - move wifi_mode() and phy_mode() to network module - modnetwork: add per-interface .active() method - modnetwork: move config defines to the top - modnetwork: introduce interface .config() method - modnetwork: add symbolic names for network interfaces: STA_IF & AP_IF - add alternative event loop implementation - feed WDT in ets_loop_iter() - ets_alt_task: be sure to "pop" event before calling its handler - ets_alt_task: update for vendor SDK 1.5.0 - esp_mphal: add higher-level event polling function - define MICROPY_EVENT_POLL_HOOK for the port - switch to lwIP built from source - store frozen modules in FlashROM - ets_alt_task: make FIRST_PRIO=0 to cover all task priorities - make mp_hal_delay_us work with new event framework - enable urandom module - add module weak link from json to ujson - enable more extmod's: uheapq, ure, uzlib - enable non-blocking stream support - add "socket" and "usocket" aliases for lwip module - enable auto-indent in REPL - expose pin object as a public structure for use as C pin API - add basic I2C driver, with init and writeto methods - modpybi2c: add missing include - clean up bit-bang I2C implementation - implement bit-bang I2C read, and add i2c.readfrom method - add onewire helper functions as C module - add tests/onewire.py as a driver and test code for ds18b20 dev - implement software SPI class - add PWM support - esppwm.c: fix IRQ handler prototype - put lexerstr32.o into FlashROM - put utils.o to FlashROM - link ADC class into machine module - add esp.neopixel_write function to bit-bang WS2812 data - tests: add neopixel.py test - put modpybi2c.o to FlashROM - set up UART handling task soon into init process - modesp: flash_write(): Writes in multiples of 4 bytes - modesp: flash_read(): Accept buffer to read to as a second argument - README: update for the current status of the port - enable FatFs support - esp8266.ld: put FatFs to FlashROM - deploy: Use --flash_size=8m option to esptool.py - moduos: add listdir() proxy for MP_STATE_PORT(fs_user_mount)[0] - moduos: factor out VFS method proxy helper - moduos: add os.remove(), proxying to VFS object - zero out fs_user_mount state on (soft) reset - support importing modules from filesystem - implement os.urandom function - add basic support for duplicating REPL output - enable uos.dupterm() method - esp_mphal: add support for debug UART-only output - let esp8266 "os" messages go to standard (REPL) UART - support synchronous wifi scanning - fix issue when current REPL line was garbage-collected - switch back to accumulating input data via ring buffer - implement input part of dupterm handling - reset term_obj on reboot - move PHY mode constants from modesp to modnetwork - disallow recursive calls to REPL - support dedicated REPL loop (aka pull-style) - switch to non event-driven REPL to support paste mode - uart: get ctrl-C working now that event-based REPL is disabled - use VM_HOOK to call ets_loop_iter within the VM - README: add link to docs - move .rodata where it belongs with -mforce-l32 help - bump iROM size to 512k - ets_alt_task: comment out debug output - minimize gap between Inst/DataRAM segments and FlashROM segment - switch back to flashing combined firmware (single file) - update flashing instructions in README - bump heap size to 24k - move pyb.hard_reset() to machine.reset() - move pyb.unique_id() to machine.unique_id() - modnetwork: require_if(): Report the actual interface required - make destination for vendor OS debug output soft-configurable - add initial implementation of machine.UART - README: add short troubleshooting section - switch from terse error messages to normal ones - implement multistage bootstrap sequence - add esp.freemem() and esp.meminfo() functions - implement mp_builtin_open() using vfs_proxy_call() examples: - http_client.py, http_server.py aren't just unix, move to network/ - http_client.py: improve CPython compatibility in stream mode - http_client.py: introduce main() function - http_server.py: refactor/simplify for Python 3.5 - http_server.py: introduce main() function - http_server.py: bind to 0.0.0.0, to be accessible from other hosts - http_client_ssl.py: HTTPS client example docs: - correct WiPy Timer docs - minor change to improve clarity in machine.Timer docs - add note on machine.Timer class regarding PWM output pins - correct machine.Timer code examples related to duty cycle - add esp8266 quick reference page, with basic info - esp8266: minor tweaks to quickref, Timer and I2C classes - add versions.html template and support code for a version sidebar - allow list of versions to be specified by environment variable - esp8266: fix indent errors, typos, and add info about REPL UART - update asm_thumb2_hints_tips re return type of asm funcs - update details on using ADCAll object for vref/vbat channels - add Python speed optimisation guide, including minimal viper ref - esp8266: update quick reference: i2c.readfrom and neopixel example - update asm tutorial, maximum number of allowed args is now 4 - update pyb.I2C constructor to reflect changes in Pyboard Lite - mention that pyb.SPI constructor accepts "X" and "Y" arguments - update pyb.UART.any() to mention that it returns character count - topindex.html: refer to "pyb" module only for pyboard - add standard modules list for esp8266 - network: esp8266: Update docs on WLAN constructor - more standard modules for esp8266 - esp: remove getaddrinfo(), now in socket module as expected - esp8266/quickref: note that timers supported are virtual ones - esp8266/quickref: add note about GPIO16 - esp8266: phy_mode() moved to network module - esp8266: esp.wifi_mode() replaced with network.WLAN.active() - esp8266: esp.mac() replaced with network.WLAN.mac() - correct pin interrupt example code for the WiPy - network: esp8266: status is WLAN object method - network: esp8266: .scan() is now synchronous and returns result list - update copyright notice - esp8266: esp.socket is deprecated, remove from docs - os: change wording to be a bit more port-neutral - machine: change wording to be a bit more port-neutral - ubinascii: document a2b_base64(), b2a_base64() - esp8266/quickref: add note about physical vs logical pin numbers - ubinascii: document non-standard "sep" argument to hexlify() - esp8266: Enable "machine" module docs
-
v1.6331a4819 · ·
IPv6 support in unix, bignum constant folding, urandom module, faster VCP In this release there are many bug fixes and consolidation of previous features. Constant folding in the parser can now operate on arbitrary precision integers, and the inline assembler is no longer restricted to using small-ints or 30-bits. The urandom module has been added with the most useful random functions included. The uhashlib module now implements SHA1. The Unix port supports IPv6. The stmhal port has much faster USB VCP for board to PC transfers, and Timer(3) is now freed up for general purpose use by the user. py core: - frozenmod: make frozen module content be 0-terminated - frozenmod: store frozen module names together, to quickly scan them - use polymorphic iterator type where possible to reduce code size - make dir report instance members - implement __dict__ for instances - objstr: in str.format, handle case of no format spec for string arg - parse: optimise away parse node that's just parenthesis around expr - change mp_obj_int_is_positive to more general mp_obj_int_sign - parse: improve constant folding to operate on small and big ints - inlinethumb: allow assembler to use big ints as args to instructions - inlinethumb: remove 30-bit restriction on movwt instruction - viper: truncate viper integer args so they can be up to 32-bit - emitglue: add more feature flags to .mpy persistent bytecode output - mpz: fix conversion of float to mpz so it works on big endian archs - objint: fix classification of float so it works for OBJ_REPR_D - change type of .make_new and .call args: mp_uint_t becomes size_t - change type signature of builtin funs that take variable or kw args - change first arg of type.make_new from mp_obj_t to mp_obj_type_t* - emitglue: use mp_obj_is_float instead of MP_OBJ_IS_TYPE - use new code pattern for parsing kw args with mp_arg_parse_all - add ustruct.pack_into and unpack_from - modmicropython: add stack_use, heap_lock and heap_unlock functions - inlineasm: add ability to specify return type of asm_thumb funcs - runtime: mp_stack_ctrl_init() should be called immediately on startup - formatfloat: add ability to format doubles with exponents > 99 - builtin property: accept keyword arguments extmod: - moduos_dupterm: make uos.dupterm() implementation reusable - moduos_dupterm: make mp_uos_dupterm_tx_strn() function reusable - moduos_dupterm: handle exceptions in call to dupterm's .write() - fix uctypes size calculation for bitfields - modurandom: add "urandom" module - modurandom: make yasmarang() function static - modurandom: add some extra random functions - moduhashlib: add support for SHA1 (based on axTLS) - moduhashlib: use MICROPY_PY_UHASHLIB_SHA1 config define - moductypes: implement assignment for scalar array tests: - uctypes: test item assignment for scalar arrays - object_dict.py: add test for obj.__dict__ - allow float tests to run when MATH_SPECIAL_FUNCTIONS is disabled - fix math_fun_special test so it passes with single prec float - remove builtin_dict test - add some tests for urandom module - update pyboard LED test - for pyboard, add test for I2C error handling and recovery minimal port: - add enough code to run minimal build on STM32F4xx hardware unix port: - unix_mphal: handle exceptions in call to dupterm's .read() - unix_mphal: be sure to wrap dupterm code with MICROPY_PY_OS_DUPTERM - modtime: strftime(): Support 2nd argument, but as time_t value - add socket.inet_ntop function - allow to build coverage build with OBJ_REPR_D - add option to build 64-bit NaN-boxing interpreter - modffi: allow to compile modffi in OBJ_REPR_D mode - modsocket: accept(): Make IPv6-clean - modsocket: sockaddr(): Handle AF_INET6 addresses windows port: - enable urandom module stmhal port: - make stm constants big ints when they don't fit in a small int - remove custom mod_machine_mem_get_{read,write}_addr functions - add os.statvfs - add support for building frozen files - add support for the STM32F401NUCLEO board - make USB CDC driver use SOF instead of TIM3 for outgoing data - make TIM3 available for use by the user - add PWM capability for LED(3) and LED(4) on pyboards - in HAL I2C driver, move DMA setup to after sending I2C address docs: - fix readthedocs build by updating Latex params - set author as 'Damien P. George and contributors' - add link from pyboard switch tutorial to ISR rules document - include extra functions in time documentation for pyboard - several minor changes: network, pyb, ADCAll and inline asm - update to say that Timer(3) is free, and detail LED intensity travis: - add unix NaN-boxing build to Travis builds - switch to Ubuntu 14.04 Trusty
-
v1.5.2ed584e2f · ·
64-bit NaN-boxing, FreeDOS target, and PYBv1.1 and PYBLITEv1.0 boards This release brings a new object model for 64-bit NaN-boxing on 32-bit architectures, while allows double precision floating point numbers to be used without allocating on the heap. Unix and Windows ports have better handling of Ctrl-C, and there is now a FreeDOS target within the unix Makefile. Windows (msvc) builds are now checked using Appveyor CI. The stmhal port has new board config files for then next version of the pyboard, PYBv1.1 and PYBLITEv1.0, as well as config files for the STM32F429 discovery kit. There is now delayed RTC initialisation with LSI fallback, and DMA support for the SD card. The DMA controllers are turned off if DMA is idle for 100 msec or more, saving power. py core: - mpconfig.h: allow to build without alloca() for ANSI C compliance - binary: make use of MP_ALIGN - asmx86: fix function definition to use int32_t instead of int - change mp_print_strn_t func type to use size_t for the str length - change qstr_* functions to use size_t as the type for str len arg - emit: change type of arg of load_const_obj from void* to mp_obj_t - make mp_setup_code_state take concrete pointer for func arg - use uintptr_t instead of mp_uint_t in MP_TAGPTR_* macros - gc: move away from using mp_uint_t, instead use uintptr_t and size_t - add MP_ROM_* macros and mp_rom_* types and use them - wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR - add support for 64-bit NaN-boxing object model, on 32-bit machine - mpprint: printing of doubles is now supported (by uPy own routine) - gc: make GC block size be configurable - mpconfig: actually allow to override MICROPY_BYTES_PER_GC_BLOCK - fix function calls that have positional and a star-arg-with-iterator - modsys: implement sys.modules - make it easy to build without MICROPY_PY_BUILTINS_COMPLEX - add MICROPY_PY_BUILTINS_MIN_MAX, disable for minimal ports - add min/max "default" keyword argument - don't try to optimise for+range when args are not simple expressions - fix calling of parent classmethod from instance of subclass - add mp_get_stream_raise to factor out check for stream methods - mkrules.mk: don't pass COPT to linker - emitinlinethumb: add support for MRS instruction - make UNARY_OP_NOT a first-class op, to agree with Py not semantics - fix compiler to handle lambdas used as default arguments - modmath: add domain error checking to sqrt, log, log2, log10 - objpolyiter: implement instance-polymorphic iterator type - gc: scan GC blocks as an array of pointers, not an array of objects - gc: for finaliser, interpret a pointer into the heap as concrete obj - gc: use size_t instead of mp_uint_t to count things related to heap - mpprint: implement %llu and %lld format specifiers for mp_printf - bc: use size_t instead of mp_uint_t to count size of state and args - qstr: use size_t instead of mp_uint_t when counting allocated bytes - qstr: change type of qstr from mp_uint_t to size_t - parse: replace mp_int_t/mp_uint_t with size_t etc, where appropriate - compile: use size_t or uintptr_t instead of mp_uint_t - parse: include stddef.h for definition of size_t - compile: simplify compilation of comprehension iterators - emitglue: add include of unistd.h for read function - add MICROPY_ENABLE_COMPILER and MICROPY_PY_BUILTINS_EVAL_EXEC opts - gc: when printing info, use %u instead of UINT_FMT for size_t args - obj: fix float constants for MICROPY_OBJ_REPR_C - mpprint: fix printing of 64bit integers for 64bit windows builds - objstr: make sure that b"%s" % b"foo" uses undecorated bytes value - objstr: applying % (format) operator to bytes should return bytes, not str - handle case of return within the finally block of try-finally - be more restrictive binding self when looking up instance attrs - map: add fast-path for hashing of map index when it is a qstr - gc: improve mark/sweep debug output - map: in map lookup, check for fixed map independent of ordered map - nlr: use single preprocessor symbol to check if building on Windows extmod: - move fsusermount.c from stmhal for cross-port reuse - fsusermount: make configurable with MICROPY_FSUSERMOUNT - modmachine: use uintptr_t instead of mp_uint_t for address type - moductypes: set_aligned(): Handle INT64/UINT64 - moductypes: sizeof operation depends on layout type of structure - moduhashlib: add namespace prefix for crypto-algorithms/sha256.h - modubinascii: add "separator" argument to hexlify() - modlwip: tcp_recv: Use more regular and responsive poll pattern - modlwip: mark some lwip_socket_obj_t's fields as volatile - modlwip: user proper field name and value names for socket state - modlwip: avoid magic numeric values in memcpy() - modlwip: use _ERR_BADF instead of magic number lib: - utils/printf: apply workaround for static linking with uclibc - utils/printf: add vsnprintf alias for Clang - libm: allow math funcs to be used by non-Thumb archs - utils: add pyexec_frozen_module to load and execute frozen module tools: - allow pyboard.py to work when boot.py prints things - add option to pyboard.py to wait for serial device to be ready - upgrade upip to 0.6.3; updated for _os -> uos builtin module rename - add C middle-processor to make builtin tables proper hash tables tests: - run-tests: improve robustness of REPL tests - extra_coverage: update for sys.modules addition - run-tests: allow to skip complex tests if it's not compiled in - add min/max "default" agrument test - builtin_minmax: add testcase for lazy iterable (generator) - add test for "not" of a user defined class - add tests for %-formatting of bytes - add tests for stream IO errors - add test which demonstrates uctypes LITTLE_ENDIAN packing failure unix port: - unix_mphal: use size_t instead of mp_uint_t in stdout_tx_strn decls - moduselect: fix bug in poll.poll() scanning loop - moduselect: poll.register(): Reuse freed entries in poll array - moduselect: support growing of poll array - modtime: sleep(): automatically restart after receiving EINTR - modtime: sleep(): return early if KeyboardInterrupt is pending - mpconfigport.h: for MICROPY_NO_ALLOCA=1, don't even include alloca.h - main: check pending exception at the end of code block execution - moduselect: register(): allow to call with duplicate file descriptor - modtermios: provide B57600 and B115200 constants only if defined - moduselect: implement "one-shot" flag for poll.poll() - rename "_os" module to "uos" for consistency with baremetal ports - move modmachine into unix directory - moduselect: make configurable with MICROPY_PY_USELECT - modtime: add strftime() function (only single argument is supported) - modos: implement ilistdir() - modos: allow to configure use of d_ino using _DIRENT_HAVE_D_INO - modos: add errno() function to get/set errno value - add FreeDos target - change define logic of _DIRENT_HAVE_D_INO to match other macros - unix_mphal: properly initialize struct sigaction - unix_mphal: just consistently set sigaction.sa_flags to 0 - machine_mem improvements - properly cancel REPL input when Ctrl-C is pressed - unix_mphal: raise KeyboardInterrupt straight from signal handler - implement uos.dupterm(), conditional on MICROPY_PY_OS_DUPTERM windows port: - cleanup makefile - support 64bit mingw-w64 builds - make keyboard_interrupt_obj available, it's standard feature - add basic support for raising KeyboardInterrupt - add Appveyor CI builds for msvc port - better handling of Ctrl-C - msvc: nicer handling of asserts and 'invalid' parameters - msvc: use different output directories depending on build type - msvc: use new modmachine infrastructure per changes in f925165 - msvc: add dirent.h/.c implementation stmhal port: - implement delayed RTC initialization with LSI fallback - put IRQs into priority order - turn off DMA clocks when idle for 100 msec - add dma support for sdcard - on SysTick IRQ, only process one DMA channel at a time - irq: add comment about SDIO priority being higher than DMA - irq: set all IRQ subpriorities to 0, since they aren't used - move flash storage idle tick handler from TIM3 to SysTick - in SysTick IRQ handler, make uwTick variable non-volatile - process storage idle tick handler in different slot to DMA - increase the priority of UART IRQ - add support for the STM32F429I-DISCO kit by STMicro - allow make DEBUG=1 to build - make stm.mem* support large integers - uart.any() function now returns number of bytes available - make uart.write() function correctly for timeout=0 - add board config files for PYBv1.1 and PYBLITEv1.0 - put all DMA channel & stream definitions in dma.h - add raise_irq_pri and restore_irq_pri functions - protect SD card DMA transactions against USB MSC contention - add rtc.init() method to force RTC to re-initialise - only use BASEPRI irq stuff if Cortex is M3 or higher - add option to free up TIM3 from USB VCP polling - fix uart off by 1 circular buffer size - execute boot.py and main.py when formatting the file system - print exception information in nlr_jump_failed - enable two USB phys to be supported together - timer: use mp_float_t instead of float - for SPI config, use HW_SPIx_SCK instead of HW_ENABLE_SPIx - make uart init use struct instead of array for parsing args - extend SPI support to fully support all SPI devices on STM32F429 - moduselect: implement "oneshot polling" flag - change PLL configuration for STM32F7DISC - add mem8/mem16/mem32 operations to machine module - add pyb.irq_stats() to get statistics about IRQ calls - add struct qstr to block of qstrs needed for MICROPY_PY_STRUCT - fix usbd_conf.c for devices which don't have USB_HS at all cc3200 port: - correct buffer offset in serial flash diskio module - add __get_BASEPRI and __set_BASEPRI inline function definitions esp8266 port: - modesp: implement flash_read(offset, size_bytes) function - mac() function belongs to network module per the latest API - modesp: allow to compile out proprietary espconn stuff docs: - library: add network server example - add discussion on interrupt handlers incl uPy specific techniques pic16bit: - use global MICROPY_NO_ALLOCA setting ports: - rename "machine" module to "umachine"
-
v1.5.14dea24e1 · ·
LwIP support, and preliminary implementation of persistent bytecode This release includes the lwip network stack module with slip support. There is a preliminary implementation of persistent bytecode which allows to save compiled bytecode to a .mpy file, to be loaded at a later time by another MicroPython instance. Double precision floating-point formatting is now provided by the core, and the bundled upip module is no longer dependent on FFI. stmhal port has improved RTC startup. There are many bug fixes and improvements to the documentation. py core: - makeversionhdr.py works with backslashes in paths - in inline asm, vldr and vstr offsets now in bytes not words - modstruct: support repetition counters for all types, not just string - add py/mphal.h and use it in all ports - adjust object repr C (30-bit stuffed float) to reduce code size - clear finalizer flag when calling gc_free - objint_longlong: instead of assert, throw OverflowError - asmthumb: allow to compile with -Wsign-compare and -Wunused-parameter - emitinlinethumb: allow to compile with -Wsign-compare - reorganise bytecode layout so it's more structured, easier to edit - put all bytecode state (arg count, etc) in bytecode - add constant table to bytecode - add MICROPY_PERSISTENT_CODE so code can persist beyond the runtime - add MICROPY_PERSISTENT_CODE_LOAD/SAVE to load/save bytecode - allow to import compiled bytecode files - modmath: make expm1() be in MICROPY_PY_MATH_SPECIAL_FUNCTIONS - compile: don't unnecessarily save state when compiling param list - implement default and star args for lambdas - modmath: make log2, log10 and hyperbolic funcs be SPECIAL_FUNCTIONS - in mp_state_ctx_t, make mp_pending_exception volatile - store key/value in earliest possible slot in hash table - add Cygwin support to py/nlrx86.S - add mp_compile_to_raw_code() to return raw code object - emitglue: add mp_raw_code_load_mem to load raw-code from memory - emitglue: host definition of mp_verbose_flag - formatfloat: convert to fully portable implementation - formatfloat: fix incorrect rounding for %f format - formatfloat: handle calculation of integer digit for %f format properly - mpz: normalize xor operation result to fix bugs in comparisons - emitglue: add feature-flag header to .mpy to detect bytecode compat - emitglue: implement persistent saving and loading of const objects - check that second argument to hasattr is actually a string - do proper checking of * and ** in function definition extmod: - modlwip: initial commit of the lwip network stack module - modlwip: slip: Use stream protocol and be port-independent - modlwip: lwip_tcp_send(): Common subexpression elimination, use MIN() - modlwip: socket->incoming changed by async callbacks, must be volatile - modlwip: change void pointers to unions, include new mphal.h file - moductypes: implement buffer protocol - moductypes: when dealing with UINT64, use mp_obj_new_int_from_ull() - re1.5: update to 0.8, implements ?: and ??, as well as improved robustness - re1.5: workaround issue with mingw32-gcc 4.2.1 - modure: make sure that errors in regexps are caught early lib: - lwip: add LwIP stack as a submodule in the library directory - pyexec: for paste mode use "Ctrl" as the name of the key, not "CTRL" - memzip: factor out memzip from teensy/ into lib/memzip - mp-readline: make it easy to exit auto-indent mode by pressing enter - fatfs: unify fatfs configuration - pyexec: move header pyexec.h from stmhal directory - utils/printf: move from stmhal/ tools: - pyboard.py: make -c (inline Python code) option compatible with python2 - pyboard.py: don't add terminating \x04 character to stdout output - update to upip 0.6.2: removes FFI dependency tests: - jni: test for basic object operations - make sure test output has \r\n line-ends when running on Windows - base/struct1.py: add test for repetition counters - jni: add test for working with container of List interface - float/string_format: add testcase for incorrect rounding for %f - int_big_xor: test that xor result is normalized - int_big_*: add more tests for result normalization minimal port: - use mp_hal_ticks_ms() - add an explicit comment on the gchelper.s line in the Makefile unix port: - modjni: don't pass Java object to a method which doesn't expect it - modjni: actually check argument type when doing method resolution - gccollect: fallback to setjmp-based register fetching automatically - modjni: add missing get_jclass_name() function - allow to override MICROPY_PY_MATH_SPECIAL_FUNCTIONS from command-line - switch stderr printing from ANSI C to native POSIX - modos: add getenv() - modos: add mkdir() - modos: getenv(): Handle non-existing envvar correctly - input: switch to POSIX I/O for history reading/writing - add "uselect" module, with poll() function - modsocket: implement sockaddr() function to decode raw socket address - modsocket: use snprintf(), as defined by lib/utils/printf.c - use printf() implementation in terms of mp_printf() - main: get rid of perror() which uses stdio windows port: - do not use wildcards when looking in dirs containing optional features - add usleep() implementation for msvc port - REPL: erase pre-calc'd number of chars instead of clearing whole line - rename "time" module to "utime" for consistency with others - call _set_output_format() only on Visual Studio versions 2013 or lower - use write() instead of fwrite() to avoid out-of-order output - README: deprecate mingw32, suggest using mingw64 - update build instructions in the README - fix project file for Visual Studio 2015 - allow specifying the python executable to use for msvc builds - define ssize_t and use renamed mphal header stmhal port: - ffconf.h: include py/mpconfig.h - fix USB_VCP.recv so that it returns actual amount of bytes read - pyexec: use mp_hal_ticks_ms() - moduselect: use mp_hal_ticks_ms() - make accel AVDD pin configurable via mpconfigboard.h - enable sdcard on STM32F7DISC board - add define for UNIQUE_ID address (differs per MCU) - make RTC init skip startup if LTE is already enabled and ready - update PYBv3 and PYBv4 pin defs to include MMA pins, and others - pyexec.c is common module, move to lib/utils/ - add symbolic #defines for interrupt levels in irq.h - can: fix a bug in filter handling - rtc: lSx oscillator is only initialized upon initial power up - add missing regex property for parsing header comments - print more information at HardFault time - fatFS configuration moved to the library folder - moduselect: expose POLLIN/OUT/ERR/HUP constants - modmachine: initial attempt to add I2C & SPI classes cc3200 port: - add created sockets to the registry - enable WLAN irq on creation - allow to read pin value when in OPEN_DRAIN mode - update README to change pyb to machine - set pin direction first, then value - fix bug in FTP command buffer, and set listening backlog to 0 - actually allow to specify a custom build directory - switch from HAL_Delay() to mp_hal_delay_ms() - switch from HAL_GetTick() to mp_hal_ticks_ms() - use common pyexec.c - fix SPI clock divider calculation - make telnet server ignore NULL characters - force SSL method to be TLSV1 - fatFS configuration moved to the library folder - unmount all user file systems after a soft reset - appsign.sh: use md5 if running under Darwin teensy port: - switch from HAL_* to mp_hal_* functions - switch over to using frozen modules instead of memzip esp8266 port: - switch to standard mp_hal_*() functions examples: - add example of I2C usage, taking PyBoard accelerometer as subject docs: - add remark about ssl sockets and standard sockets - correct machine.RTC examples - explicitly specify behavior of UART stream protocol methods on timeout - USB_VCP: Always in non-blocking mode, clarify stream method returns - wipy: fix error in WLAN quickref - wipy: fix several typos and change some pyboard to WiPy - wipy: fix bug in example code and add note regarding OTA - select: Describe poll.poll() return value in detail - actually add unix port indexes, so docs for it could be generated - library/index.rst: minimally adapt for unix port - move instructions on generating the documentation to docs/README.md - add docs about REPL paste-mode and Control-C - select: document POLLIN/OUT/ERR/HUP - update docs for WiPy wlan.connect() - wipy: add warning about losing wlan connection when changing mode - wipy: make wifi/wlan naming consistent with tutorial.rst
-
v1.5fe08e3a5 · ·
First-class REPL, ussl module, machine module for WiPy, stuffed-floats This release brings first-class REPL support, which now has tab completion, auto-indent, paste mode, history and _ to hold the last computed value. There is a new ussl module, and one can now build a standalone unix binary. The new machine API is implemented in cc3200, with the machine module and additions to time and os modules. stmhal contains the beginnings of this new API, while still retaining full backwards compatibility with the original pyb API. unix also includes the new time functions, sleep_ms, sleep_us, ticks_ms, ticks_us and ticks_diff. A new object representation is available which stores single-precision floats within a machine word (using 30-bit precision), and allows to use float objects without the heap (not enabled in any port). There are also bug fixes and general improvements. py core: - put compiler state on the C stack - objrange: bugfix for range_subscr() when index is a slice object - parsenum: provide detailed error for int parsing with escaped bytes - mpz: raise NotImplError instead of failing assertion - mpz: force rhs of mpz_shl_inpl/mpz_shr_inpl to be unsigned - mpz: fix bignum anding of large negative with smaller positive int - catch all cases of integer (big and small) division by zero - allocate parse nodes in chunks to reduce fragmentation and RAM use - allow to enable inline assembler without native emitter - fix edge case when constant-folding negation of integer - emitnative: raise ViperTypeError for unsupported unary ops - don't generate unnecessary parse nodes for assignment or kwargs - factor logic when creating parse node from and-rule - makeqstrdata.py: catch and report case of empty input file - rename MP_BOOL() to mp_obj_new_bool() for consistency in naming - add paste mode to friendly REPL, entered via CTRL-E - rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc - objarray: allow to create array of void pointers, as extension to CPython - move constant folding from compiler to parser - make parser error handling cleaner, less spaghetti-like - allow to to build MicroPython as a static library - add support to call __init__ from a builtin module on first import - implement ptr32 load and store in viper emitter - fix calc of qstr memory usage, due to new qstr chunk allocation - remove dependency on printf/fwrite in mp_plat_print - fix with+for+return bug by popping for-iter when unwinding exc stack - add option for inline assembler to support ARMv7-M instructions - add support for _ in REPL to hold last computed value - stream: allow to reuse is_nonblocking_error() - add lsl/lsr/asr opcode support to inline Thumb2 assembler - add mp_obj_is_float function (macro) and use it where appropriate - move float e/pi consts to objfloat and make mp_obj_float_t private - make float representation configurable with object representation - add object repr "C", where 30-bit floats are stuffed in obj word - nlrthumb: make compatible with Cortex-M0 (ARMv6M instr set) extmod: - add modussl, an SSL socket wrapper module based on axTLS lib: - axtls: add axtls git submodule, dependency of modussl - libffi: add libffi as a submodule - mp-readline: add n_chars argument to mp_hal_erase_line_from_cursor - make netutils.h available to all ports by default drivers: - sdcard: allow up to 5 retries to initialise SD card tools: - upip: update to 0.5.9 - pyboard: add -c argument to run a program passed as a string tests: - wipy: improve robustness of time test - wipy: improve robustness of rtc_irq test - wipy: add machine module tests - test slicing a range that does not start at zero - add further tests for mpz code - allow tests to pass against CPython 3.5 - add test for evaluation order of dictionary key/value pairs - in pyb RTC tests, check wakeup register values - add more tests for viper 16/32-bit load/store, and ellipsis - jni: start adding modjni tests - extmod: add tests for sleep_ms/us(), ticks_ms/us/diff() unix port: - modjni: new_jobject(): Handle null reference - modjni: call_method(): If name doesn't match, cleanup via goto next_method - modjni: call_method: Better resource release - modjni: call_method: Delete done local references in loop - modjni: implement len() for objects with java.util.List interface - modjni: fix method argument matching - modjni: propagate Java exceptions on list access - modjni: convert Java's IndexOutOfBoundsException to Python's IndexError - modjni: jobject.__str__/__repr__: Return Java .toString() value - modjni: jclass.__str__/__repr__: Return Java .toString() value - add support for building axtls dependency lib - modjni: after Call*Method(), Java exception should always be checked - modjni: allow to access fields of objects - modjni: py2jvalue: Support bool and None values - modsocket: fix usage of pointers to locals outside scope - add exit and paste-mode hints to shell startup banner - modtermios: tcsetattr: if 0 passed for "when" param, treat as TCSANOW - modjni: call_method: check for Java exception after method return - modjni: add iteration support for Java List objects - allow to build against Android down to 1.5 - modos: add statvfs() function - unix_mphal: implement HAL_Delay() and HAL_GetTick() - modtime: implement sleep_ms(), sleep_us() - modtime: implement ticks_ms(), ticks_us() and ticks_diff() - modos: android Bionic lacks statvfs(), has BSD statfs() stmhal port: - in RTC.wakeup, fix setting of wucksel to get correct period - fix RTC.wakeup so it correctly calculates WUT for large periods - fix USB CDC-only mode under Windows - enable REPL auto indent; document paste mode in help() - allow to set bits resolution for DAC; 8 is default, can have 12 - make USB serial number actually be unique - early version of machine module for stmhal - add sleep_{ms,us} and ticks_{ms,us,cpu,diff} to time module - implement os.dupterm (was pyb.repl_uart) - uart: if char is not received within timeout, return EAGAIN error - bring Pin class close to new machine module specification - rtc: init uses YMD rather than backup register to detect powerup - enable "all special methods" configuration option cc3200 port: - new irq API, affects all classes that provide the irq method - new WLAN API including test - implement support for os.dupterm() - rename pyb module to machine - disable uheapq and uhashlib - make auth param positional in wlan.connect - always reset WLAN after setting the mode - wiPy SW v1.0.0 release - in scan results rename 'auth' field to 'sec' - create wipy module, remove HeartBeat class - increase stack sizes a bit - refactor network module to make the server a propper object - WLAN class can retrieve the existing instance - enable REPL autoindent - uart.read() returns EGAIN if no chars available - make socket.listen([backlog]) compliant with Python 3.5 - enable "all special methods" configuration option - bump version to 1.1.0 docs: - update esp8266 documentation to match the code - describe properly how MCU can be woken from pyb.standby() state - wipy: update all WiPy docs to reflect the new API - wipy: add wipy and network.server documentation - wipy: add wipy tutorials section - wipy: add usocket and ussl modules' documentation - wipy: several corrections to the classes in the machine module - wipy: remove remaining references to 'af', which is now 'alt' - wipy: add more tutorials and examples misc: - travis: build "deplibs" in unix port - README: document "Ctrl-D" shell exit - README: document how to enable/build external dependencies
-
v1.4.65572f735 · ·
Auto-indent for REPL, jni module for unix, lots more tests py core: - make frozensets hashable - add MICROPY_PY_BUILTINS_FILTER to configure filter builtin - make slice attributes (start/stop/step) readable (enable via MICROPY_PY_BUILTINS_SLICE_ATTRS) - add support for array('q') and array('Q') - add stream_tell method, and use for unix and stmhal file tell - make string formatting 8-bit clean - treat escaped quotes correctly in REPL continuation - fix function args when a star-arg is followed by keyword args - properly classify floats that look like hex numbers (eg 0e0) - fix calculation of max digit storage for mpz; fix sys.maxsize - refine SyntaxError for repeated use of global/nonlocal - raise SyntaxError when unicode char point out of range - fix error reporting for unexpected end of modulo format str - fix error type for badly formatted format specifier (is now ValueError) - raise NotImplementedError for unicode name escape instead of assert - for str.endswith(s, start) raise NotImplementedError instead of assert - make str.rsplit(None,n) raise NotImplementedError instead of assert - handle 'raise X from Y' by issuing a warning that exception chaining is not supported - make it_iternext() recognize IndexError - only compile function annotations if really needed (for native emitter) - simplify dispatch of bool binary op - simplify printing of bytes objects when unicode enabled lib: - readline: add auto-indent support; 4 spaces are added at start of line to match previous indent, and if previous line ended in colon; backspace deletes 4 space if only spaces begin a line drivers: - nrf24l01: fix SPI phase setting to match specs of nRF chip tools: - upgrade upip to 0.5.8 (adds support for experimental ussl module) tests: - explain in README how tests get skipped - add feature_check dir to collect capability detection scripts - split byteorder-dependent tests to *_endian.py's - allow to skip byteorder-dependent tests - add escaped quotes tests for REPL - add tests for bool, bytearray, float, exceptions (to improve coverage) - add test for exception-chaining raise syntax - add test on set/frozenset equality - add tests for non-compliant behaviour (relative to CPython) - add test where __getitem__ raises IndexError to stop iteration - make io test cleanup after itself by removing 'testfile' - move int+unicode test to unicode-specific test directory - wipy: add I2C tests - wipy: additional tests for when the UART is un-initialized - wipy: improve UART tests with no pin assignment case - wipy: remove unneeded dependencies to pyb.Pin unix-cpy port: - port is removed (no longer needed), along with conditional code in core unix port: - bump default heap size to 1MB (2MB on 64-bit systems) - enable REPL auto-indent - allow to build libffi from source and link against it - add 'jni' module to interface to JNI-compliant JavaVM windows port: - make mpconfigport.h up-to-date with the unix port - make unistd.h more posix compatible stmhal port: - use polling, not DMA, for 1 byte SPI transfers - add 'opt' arg to pyb.main, to set mp_optimise_value - add option to query for the current usb mode - add support for STM32F411 Discovery Board (STM32F411E-DISCO) - enable I & D caches for Cortex-M7 - fix single precision float printing error cc3200 port: - implement new Pin API - implement new UART API - implement new I2C API - implement new SPI API - implement new ADC API - implement new WDT API - implement new SD and RTC API plus os and time modules' extensions - improve uniflash script and make it a bit more verbose - increase error led blynk period to 100ms - keep overwriting the same image on sequential updates - improve file system check routine - make sure to update sleep objects when registered - reduce servers cycle time to improve FTP transfer rate - remove unneeded loops in the FreeRTOS hooks - server side SSL socket requires both certfile and keyfile - don't clear the WDT special bit in the bootloader - disable some uPy features in debug mode to help code fit - change HeartBeat period from 5 to 4 seconds - add mphal error to raise hardware related exceptions esp8266 port: - add wifi_mode() to read and set WiFi operating mode - add wlan.isconnected() to maintain parity with other ports docs: - wipy: adapt ADC doc and quickref to the new API - wipy: update I2C and UART docs to match the new API - wipy: add pins to the I2C constructor
-
v1.4.5032b0e93 · ·
Lots of additions and improvements; support for STM32F2 and F7 MCUs. py core: - make showbc decode UNPACK_EX, and use correct range for unop/binop - use wrapper to check self argument of builtin methods, to prevent seg faults - remove mp_load_const_str and replace uses with inlined version - remove mp_load_const_bytes and instead load precreated bytes object - improve mp_import_name() debug logging - catch case when relative import happens without active package - fix running package submodule with -m - add TimeoutError exception subclassed from OSError - allow to build with debugging and bytearray but no array - modstruct: Raise NotImplementedError for unsupported repeat specification - REPL: Fix case where shorter names are shadowed by longer names - prevent many extra vstr allocations by preallocating room for null byte - improve allocation policy of qstr data (saves RAM) - modbuiltins: Implement round() to precision - make qstr hash size configurable, defaults to 2 bytes - implement memoryview slice assignment, eg m1[0:3] = m2[2:5] - viper: allow functions to take up to 4 arguments - vipre: issue an error when compiling functions with more than 4 args - raise SyntaxError when str hex escape sequence is malformed - fix handling of parsing empty input so it raises an exception - viper: compile errors now have traceback with function and filename - REPL: don't look inside strings for unmatched brackets/quotes - give more precise line number for compile errors (incl viper functions) - make list += accept all arguments and add test - makeversionhdr.py: Fallback to using docs version if no git repo extmod: - ubinascii: add a2b_base64 and b2a_base64 functions - machine: implement physical memory access using /dev/mem (Linux, etc) lib: - readline: add emacs control chars for cursor movement (disabled by default) drivers: - onewire: fix ds18x20.read_temp so it works when no rom given tools: - update upip to 0.5.4: recognize and handle "package not found" error - make-frozen.py: make Python2 compatibile - pydfu.py: fix to work with old and new versions of PyUSB - pyboard.py: fix parsing of returned error so last chr is not lost - pyboard.py: make enter_raw_repl stricter and more reliable - pyboard.py: speed up reading of chars by decreasing sleep period - pyboard.py: add telnet support - pyboard.py: make Python2 compatible tests: - add testcase for open(..., "a") - adapt basics/memoryerror.py for ports with lower heap sizes - adapt misc/features.py tests for ports without floating point - add support for the WiPy in run-tests script (use --target to specify it) - split out json float tests to separate files - add test for relative import without package context - skip parser test if "compile" builtin is not available - use PTY when running REPL tests - add test for pyboard SPI in slave mode, recv with no master - test REPL emacs keys, but only if present - always use forward slashes for paths (for Windows tests) - fix exceptions when running cmdline tests on Windows - Remove over-specification of startup banner unix port: - add O_WRONLY | O_CREAT to open call when opening file for append ("a") - socket.getaddrinfo: accept family & socktype arguments - socket.getaddrinfo: port is unsigned value - modsocket: implement sendto(), recvfrom(), inet_pton() - set MICROPY_PY_SYS_PLATFORM to "darwin" if compiled on OSX stmhal port: - modify dma_init() to accept init struct as an argument, making it more generic - add config option for storage to use second flash segment (disable by default) - add I2S support to make-pins.py - add qstr definition for ifconfig when building for WizNet - move HAL Cube files to f4/ subdir, keeping only those we use - add STM32CubeF2 version 1.1.0, in hal/f2 directory - add CMSIS device header files for STM32F2xx series - allow DAC.write_timed to take Timer object in place of freq - allow ADC.read_timed to take Timer object in place of freq - check if user block device is mounted before accessing it - put fs_user_mount pointer in root ptr section of global state (fixes crash) - add hal and cmsis files from STM32Cube_FW_F7_V1.1.0 - add STM32F7DISC support - factor out USRSW boot-up code and support boards with 1 LED - factor GPIO clock enable logic into mp_hal_gpio_clock_enable - add capability to print out info about a hard fault (disabled by default) - fix make-pins.py to allow Port K - add better support for UART having Tx and Rx on different ports - add support for USART1 and conditional pins in make-pins.py - add STM32F7 support for USB serial and storage - enable I2C support for F7 MCUs - enable SPI support for F7 MCUs - fix hardfault when configured as a SPI slave - generate modstm constants per build cc3200 port: - in Timer.callback() only use value param if in edge count mode - create tools folder and add update-wipy.py script - add deploy target and improve robustness of update-wipy.py - enable more features to improve compatibility with stmhal - add `Pin.name()` method - adapt update-wipy.py timing to improve stability - correct socket settimeout time format - add CA, certificate and key files to the updater list - add socket.timeout and socket.error exceptions - raise an exception if trying to scan for networks in AP mode - optimize check for WLAN AP mode - set WLAN date/time via the rtc.datetime method() - add modussl, ssl sockets subclassed from normal sockets - time.sleep() now receives seconds, like CPython - fix socket recv and recvfrom return value type - enable base64 methods from modubinascii - increment interrupt stack size from 2K to 3K - create /flash/sys and /flash/lib directories while booting - translate simplelink's socket error numbers to POSIX values - use alternative HAL_Delay also when interrupts are disabled - correct udelay us to ticks calculation - increment telnet Tx retry delay on every try - add struct weak link for ustruct - set simplelink time and date when enabling WLAN - refactor and clean-up socket closing code - implement new OTA mechanism with 2 firmware update slots - create /flash/cert folder if it doesn't exist - make socket stream methods return POSIX error codes - add socket.sendall() (aliases to send()) - rename pins from GPIO to just GP - add socket.makefile() - switch to 1 byte hash for QSTRs - on ssl.read() or ssl.readall() ignore ssl layer closed error - append last 2 bytes of the MAC address to the default SSID - make I2C and SPI API the same as in stmhal - add nic.iwconfig() to set/get WLAN configuration - improve support for WEP security - enable bootloader safe boot on latest firmware - fix bug in ffconf regarding '/flash' string length - add script to program the WiPy via UniFlash (windows only...) - add factory smoke test as part of the tools - speed up file system checking during start-up - on the first boot, always make AP ssid='wipy-wlan' - make ADC API compatible with the pyboard esp8266 port: - move scan() from esp module to network - update the README.md to reflect what works - move status() from esp module to network - make pyb.RTC a type, and pyb.RTC() constructs an RTC object - allow to easily override programming baudrate docs: - add more documentation for the CC3200 in the pyb module - add "reference" directory for putting docs about the language - add reference for Thumb2 inline assembler - make index link point to "index.html" irrespective of port - fix duplicate label error for network.WLAN - update safe boot comments to match actual behaviour - update pyb.Accel doc to reflect changes and explain filtered_xyz - correct nic.ifconfig() quickref example - add i2c keywork arguments only indication
-
v1.4.4e78a8c94 · ·
Unix binary gets tab completion and builtin upip, and more. py core: - allow to compile without needing git to extract version - conform to CPython's way of printing nan/inf with padding - wrap qstr defs in quotes to protect from C preprocessor - add stack check to mp_iternext to catch nested iterators - implement implicit cast to obj for viper load/store index/value - implement native multiply operation in viper emitter - expose KeyboardInterrupt in builtins module - fallback to stack alloca for Python-stack if heap alloc fails - support unicode (utf-8 encoded) identifiers in Python source - implement second arg for math.log (optional value for base) - support mpz bignums in divmod builtin extmod: - add ubinascii.unhexlify - swap address and descriptor args in uctypes constructor lib: - fix some issues with dates prior to 1 Mar 2000 - implemente delete key in readline tools: - pyboard.py: allow pyboard constructor to take a baudrate parameter - pyboard.py: change logic for when raw ">" prompt is parsed - add codestats.sh to compute code statistics such as size, speed unix port: - add option to use uPy readline and enable by default (adds tab completion) - include upip as frozen module within standard uPy executable; standard way to use is: micropython -m upip install <module> - allow to cat a script into stdin from the command line - make micropython -m <module> work for frozen modules windows port: - implement mp_hal_xxx functions and enable uPy readline stmhal port: - raise error if disk is full when writing a file - implement sys.stdin.buffer, sys.stdout.buffer for raw byte mode - remove all PYBVxx defines and use general config vars instead - add support for UART5 if MCU has it - fix slow SPI DMA transfers by removing wfi from DMA wait loop - break immediately from USB CDC busy wait loop if IRQs disabled - make I2C transfers use DMA when possible (when IRQs are enabled) cc3200 port: - add os.rename() - add Timer module - add uhashlib with SHA1 and SHA256 - add ubinascii module - implement full set of wake-on-WLAN features - remove NIC abstraction layer - improve WDT - make peripheral API more similar to stmhal's - improve reliability of ftp and telnet servers - add antenna selection feature to WLAN - add sendbreak method to UART esp8266 port: - add uos module - allow to set CPU frequency to 160MHz using pyb.freq - add pyb.ADC class - to esp module add: mac, phy_mode, sleep_type, deepsleep, flash_id - update SDK to version 1.1.0 (MIT licensed) - fix lost chars when transfering large amounts of data over UART - add skeleton "network" module with bare WLAN() constructor - add WLAN.connect/disconnect functions - change esp_scan to keep the current WiFi operating mode docs: - document esp module - allow to generate separate docs for each port (using ..only directive) - add initial docs for the WiPy
-
v1.4.3d7b7d5f6 · ·
Tab autocompletion, and various improvements and bug fixes. py core: - add attrtuple for space efficient tuples with attr access - add sys.implementation, with uPy name and version number - fix printing of "inf" and "nan" values - native: fix stack adjustment when erroring on binary op - mpz: fix bug with shl not truncating zero digits correctly - modify "with" implementation so it doesn't use any heap - add sys.exc_info() - implement conversion of bignum to bytes - implement struct.pack with 'q' and 'Q' args on 32-bit archs - replace py-version.sh with makeversiohdr.py, written in Python - implement tab autocompletion for REPL - rename struct module to ustruct - add NotImplemented builtin constant - handle user instance hash based on Python adhoc rules - fix naming of function arguments when function is a closure - fix printing of complex numbers with nan/inf extmod: - add machine module, with mem8, mem16, mem32 objects lib: - move common mod_network_* functions to lib/netutils - move common time functions to lib/timeutils tools: - pyboard.py: add "--follow" option to wait for output indefinitely - add script to install "upip" package manager tests: - add more viper tests, including for ViperTypeError - coverage at 94% unix port: - modffi: support passing float/double args - add special function to coverage build to improve coverage - print unhandled exceptions to stderr stmhal port: - implement os.uname() - reset timer counter to zero after changing auto reload - properly disable unhandled timer interrupts - automatically reenable IRQs when code drops to the USB REPL - allow to configure UART pins completely via mpconfigboard.h - make raw REPL work with event-driven version of pyexec - add rtc.calibration() method to get/set RTC fine-tuning value - add os.rename() - add readinto() and readlines() methods to sys.stdin and pyb.USB_VCP cc3200 port: - add WiPy specific info to README.md - fix byte order in MAKE_SOCKADDR and UNPACK_SOCKADDR - select NIC when the socket is created - add delays to allow ftp and telnet servers to start/stop - make telnet login work with Tera Term - implement os.uname() - make WLAN scan results a list of attrtuples - make WLAN.isconnected() also work in AP mode - implement Sleep.wake_reason() - make WLAN.ifconfig() return an attrtuple - enable MICROPY_MODULE_WEAK_LINKS esp8266 port: - export station status() constants - add esp.socket class, with ESP-style socket functionality - add raw REPL support and working soft reset - fix garbage collector by hard-coding stack end address - add socket.onsent() callback support - add support for frozen modules - implement time functions - add utime and pyb.RTC - add module weak links docs: - document pyb.stop, pyb.standby, pyb.RTC.wakeup - document USB_VCP read* and write methods
-
v1.4.243d56f9b · ·
Improved native codegen, better printf, support for F401 and F411 MCUs. py core: - implement delete for property and descriptors - add option to disable "enumerate" and "reversed" builtins - can call functions with *args in native emitter - implement full function arg passing for native emitter - combine load_attr and store_attr internal type methods into one - fix formatting of floating point numbers near 1.0 - support assignment of bytes to bytearray slices - overhaul and simplify printf/pfenv mechanism - fix builtin ord so that it can handle bytes values >= 0x80 - inlinethumb: add support for core floating point instructions - make viper code generator raise ViperTypeError on error lib: - string0.c now in lib/libc/ (was in stmhal/) - fatfs code size reduced (by 768 bytes on Thumb2 archs) tests: - more tests for builtins - tests for lexer - coverage increased to 93% stmhal: - make LED object print LED(x) for consistency with constructor - in USB HID driver, make polling interval configurable - allow sending CAN messages with timeout=0 - add support for sending and receiving CAN RTR messages - make board parameters more configurable (HSE PLL, LED4, TIMs, etc) - add support for F401 and F411 MCUs - add support for Espruino Pico board - make raw REPL mode 8-bit clean cc3200 port: - enable pull-ups for stdio UART pins - enable long filename support in fatfs - add WLAN.config_ip(), to assign a static IP - add IPPROTO_SEC so secure sockets can be made tools: - make pyboard.py 8-bit clean, so it works with unicode chars docs: - document pyb.main() function
-
v1.4.10f6424ef · ·
Stackless support, new 16-bit PIC port. py core: - builtin round() accepts second arg - add more special methods: __pos__, __neg__, __invert__ - support for stackless Python calls in VM, strict and non-strict - support for object representation that suits 16-bit archs - implement closures in native code emitter - implement str.splitlines() method lib: - fatfs library upgraded to R0.11 (fixes bugs with unlink) pic16bit port: - new port to 16-bit PIC (reference MCU is dsPIC33J256GP506) - heap is 4600 bytes - implement basic pyb module with delay - implement basic LED and Switch classes docs: - initial docs for micropython module - additional example for Timer callback usage - document instantiating struct objects in uctypes
-
v1.464e8b622 · ·
More Python features, reduced code size, coverage testing at 91%. py core: - add builtin setattr function - optimise exceptions for out-of-memory scenario - add some special methods: __mul__, __floordiv__, __truediv__ - implement array slice assignment - add support for start/stop/step attrs in range object - make builtin abs work with bools and bignums - add basic implementation of collections.OrderedDict - add support for a function's __name__ - refactor compiler code to reduce code size by up to 2k - support for descriptors __get__ and __set__ inline Thumb2 assembler: - more robust syntax checking - general bug fixes - better error messages - add "it" instructions - add bl, bx instructions - add bcc_n, bcc_w instructions extmod: - modure: bug fixes for groups - modure: add named classes lib: - libm: add erf, erfc, lgamma, tgamma drivers: - add onewire driver in pure Python - add ds18x20 temp sensor driver, using onewire - cc3100 driver upgraded to v1.1.0 tests: - lots of new tests, including many for SyntaxError - automated covage testing using coveralls, at 91% coverage unix port: - support for readline history saving to file stmhal port: - usbdev code cleanup - add Python-configurable USB HID mode - add CDC only USB option - improve USB descriptors (untested on Windows and Mac) - add UART.sendbreak() method to send break condition - add support for CAN rx callbacks - raise error if UART can't do requested baudrate within 5% - fix timing init when callback is passed as argument to init - add support for quadrature encoder mode in TimerChannel - fix ADC.read_timed so buffer store respects element size - add RTC.wakeup method to set wakeup timer (preliminary) - add compile-time config option for RTC to use LSE or LSI - bug fix related to unhandled channel interrupts - improved support for stop and standby mode - expose all PYBv1.0 pins, including SD and USB pins - optimise ADC.read_timed so it can sample at up to 750kHz - make pybstdio code usable by other ports cc3200 port: - add I2C module - add ADC module - add SD module - support for connecting to WEP secured networks - add WDT support - add low power support - add SPi module esp8266 port: - add basic pyb.Pin class miscellaneous: - add list of Kickstarter backers in ACKNOWLEDGEMENTS file size difference in bytes to previous version (a negative value means binary is smaller in this version): - bare-arm: -2448 - minimal: -3028 - unix: +574 - stmhal: +7996 - cc3200: -2984 - teensy: -10560 - esp8266: -936 - qemu-arm: -844
-
v1.3.1079dc0a08 · ·
Bug fixes, CC3200 port, improved inline assembler py core: - big-int bug fixes - support for floats in struct module - vstr no longer null-terminates buff by default - properly handle CR/LF in triple-quoted string - list.sort now has O(log(N)) stack usage - parse big-int/float constants directly in parser - allow to subclass native buffer objects - reduce stack size of VM by 8 bytes on stmhal, 16 on x86 - add ldrex, strex, push, pop, sdiv, udiv, clz, rbit to inline assembler - make inline assembler report line numbers on error extmod: - uzlib: raw deflate decoding support unix port: - add "coverage" makefile target for coverage testing stmhal port: - bug fixes in ADCAll object - bug fix in timer.deinit esp8266 port: - add esp module - add connect, disconnect, status functions cc3200 port: - new port to the CC3200 launchxl board
-
v1.3.9552f7c40 · ·
Internal changes, RAM and ROM reductions, new minimal port py core: - lots of small optimisations, cleanups and code size reduction - move away from Plan 9 headers to traditional guarded ones - improved and optimised float to int conversion - fix right-shifting edge cases in mpz - namedtuple: use sequence of strings for init - namedtuple: allow keyword arguments in constructor - ability to issue compile/runtime warnings - str.format now has kwargs support - put all global state togther in a state structure - optimisation to cache map lookup results in bytecode - fix handling of "0" in some mpz functions - implement equality check for all types - add qstr cfg capability - can now configure qstr len storage; defaults to using 1 byte - allow code to compile with lots more warnings enabled - add LOAD_CONST_OBJ bytecode, to directly load Python objects - never intern data of large str/bytes objects - fix handling of default except in compiler - add extra pass to bytecode compiler to compute stack size - implement very simple frozen modules support - implement __reversed__ slot - implement proper re-raising in native codegen's finally handler lib: - move readline code from stmhal to lib/mp-readline/ - readline refactored to support event-driven usage - add frexp and modf to libm minimal port: - new port, intended to represent minimal working code stmhal port: - collect root pointers together; improves GC speed - add MICROPY_HW_USB_VBUS_DETECT_PIN option - add MICROPY_HW_USB_OTG_ID_PIN option - add support for FEZ Cerb40 II board - bug fixes in network module and usocket.accept, setsockopt qemu-arm port: - enable GC and native code-gen - add working tests - get tests running under Travis CI esp8266 port: - use dedicated heap allocated as static array - implement task-based, event-driven interface with UART - implement pyb.hard_reset()
-
v1.3.8361909e3 · ·
Feature additions to core, unix and stmhal; general improvements. py core: - implement +, +=, .extend for bytarray and array objs - add mem_info, qstr_info to micropython module - bytes/bytearray/array can be init'd by buffer protocol objs - optimised lexer by exposing lexer type; gives ROM savings - add sys.print_exception - allow builtins to be overridden - fixed all semantic issues with range optimisation - compiler gives proper SyntaxError exceptions for bad global/nonlocal - reduce VM exception stack size by 1 machine word per exception - make bytes objs work with more str methods - refactor and make mp_bytecode_print and friends more useful - start transition to guarded includes - lots of code cleanup - some ROM savings extmod: - add ubinascii module, with hexlify unix port: - add _os.unlink, _os.system functions - 64-bit clean in ffi module - time module renamed to utime stmhal port: - add USB_VCP.setinterrupt method, to disable CTRL-C - make pyb.[u]delay work when irqs are disabled - overhaul of internal network driver interface - bug fixes to CC3K and WIZNET5K network drivers - use DMA for SPI transfers (only if irqs enabled) - allow SPI.init to specify prescaler directly - enhance pyb.freq to configure bus frequencies - add more math functions (acosh, asinh, atanh, tan) - add execfile function - upgrade to latest FatFs driver (now in lib/) - add ability to mount custom block device esp8266 port: - put more rodata in irom section - add README.md docs: - basic docs for uhashlib, ubinascii, ure, uzlib - links to LCD and AMP skin schematics - general improvements
-
v1.3.7722fab7c · ·
Port to ESP8266, add uhashlib, improved CAN driver. py core: - support more ops for bytes/bytarray - support __hash__ for user-defined types - support for float/double arrays in array module - shorter error messages for TERSE message option - add seek via ioctl to stream protocol extmod: - add uhashlib with sha256 unix port: - heapsize can take w specifier for word adjustment stmhal port: - CAN init now takes sjw, bs1, bs2 args - add CAN filter management - fix HAL error raising bug esp8266 port: - new port to ESP8266 wifi chip docs: - minor additions