aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-29py/objstr: startswith, endswith: Check arg to be a string.Paul Sokolovsky
Otherwise, it will silently get incorrect result on other values types, including CPython tuple form like "foo.png".endswith(("png", "jpg")) (which MicroPython doesn't support for unbloatedness).
2017-08-28docs/library/network: Fix ref to "socket" module (should be "usocket").Paul Sokolovsky
2017-08-28docs: More xrefs to "MicroPython port" in glossary.Paul Sokolovsky
2017-08-24stmhal/boards/pllvalues.py: Make script work with both Python 2 and 3.Damien George
2017-08-24stmhal/Makefile: Use GEN_PINS_HDR var instead of writing it explicitly.Damien George
2017-08-24stmhal/modmachine: For F7 MCU, save power by reducing internal volt reg.Damien George
2017-08-24stmhal: Compute PLL freq table during build instead of at run time.Damien George
Allows for simpler, smaller and faster code at run time when selecting the boards frequency, and allows more customisation opportunities for the PLL values depending on the target MCU.
2017-08-23docs/pyboard/tutorial: Add "timeout=0" to UART in pass-through example.Damien George
Without this the pass-through will pause for 1 second at each character.
2017-08-23stmhal/modmachine: Improve support for sleep/deepsleep on F7 MCUs.Damien George
Changes for F7 are: - machine.reset_cause() now reports DEEPSLEEP_RESET correctly; - machine.sleep() is further optimised to reduce power consumption; - machine.deepsleep() is now implemented and working.
2017-08-23stmhal/modmachine: Make machine.bootloader() work when MPU is enabled.Damien George
2017-08-23docs: Bump version to 1.9.2.Damien George
2017-08-23py/asmthumb: Use existing macro to properly clear the D-cache.Damien George
This macro is provided by stmhal/mphalport.h and makes sure the addr and size arguments are correctly aligned.
2017-08-22docs: Consistently link to micropython-lib in glossary.Paul Sokolovsky
2017-08-21esp8266: Fix UART stop bit constants.Ein Terakawa
As per the "ESP8266 Technical Reference".
2017-08-21extmod/modubinascii: Don't post-increment variable that won't be used.Damien George
2017-08-21py/formatfloat: Don't post-increment variable that won't be used again.Damien George
2017-08-21py/objcomplex: Remove unnecessary assignment of variable.Damien George
2017-08-21py/compile: Remove unused pn_colon code when compiling func params.Damien George
2017-08-21all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George
2017-08-21extmod,unix: For uos.stat interpret st_size member as an unsigned int.Damien George
This prevents large files (eg larger than 2gb on a 32-bit arch) from showing up as having a negative size. Fixes issue #3227.
2017-08-21py/mkrules.mk: Use "find -path" when searching for frozen obj files.Damien George
This allows the command to succeed without error even if there is no $(BUILD)/build directory, which is the case for mpy-cross.
2017-08-20py/stream: seek: Consistently handle negative offset for SEEK_SET.Paul Sokolovsky
Per POSIX, this is EINVAL, so raises OSError(EINVAL).
2017-08-20py/objstringio: Fix regression with handling SEEK_SET.Paul Sokolovsky
For SEEK_SET, offset should be treated as unsigned, to allow full-width stream sizes (e.g. 32-bit instead of 31-bit). This is now fully documented in stream.h. Also, seek symbolic constants are added.
2017-08-20py/objstringio: Prevent offset wraparound for io.BytesIO objects.Tom Collins
Too big positive, or too big negative offset values could lead to overflow and address space wraparound and thus access to unrelated areas of memory (a security issue).
2017-08-20docs/glossary: Fix typos in micropython-lib paragraph.Paul Sokolovsky
2017-08-20docs/glossary: Elaborate on possible MicroPython port differences.Paul Sokolovsky
State that this doc describes generic, "core" MicroPython functionality, any particular port may diverge in both directions, by both omitting some functionality, and adding more, both cases described outside the generic documentation.
2017-08-20docs/library/usocket: Describe complete information on address formats.Paul Sokolovsky
Describe that the only portable way to deal with addresses is by using getaddrinfo(). Describe that some ports may support tuple addresses using "socket" module (vs "usocket" of native MicroPython).
2017-08-20docs/library/usocket: Move socket.error to its own section.Paul Sokolovsky
It's too minor a point to start the module description with it.
2017-08-20zephyr/modzephyr: Add shell_net_iface() function.Paul Sokolovsky
Calls out to Zephyr's shell, submodule "net", command "iface", and shows network interface information (if CONFIG_NET_SHELL is enabled).
2017-08-19zephyr/prj_96b_carbon.conf: Re-enable networking on Carbon.Paul Sokolovsky
The original issue leading to crash on startup if no default network interface was presented, was resolved some time ago. Note that this enables generic networking subsystem, not networking on Carbon.
2017-08-19zephyr/modusocket: Update struct sockaddr family field name.Paul Sokolovsky
Was changed to "sa_family" for POSIX compatibility.
2017-08-17docs/library/ubinascii: Update base64 docs.Alex Robbins
This clarifies return values and the handling of invalid (e.g. newline) characters. Encoding conforms to RFC 3548, but decoding does not, as it ignores invalid characters in base64 input. Instead, it conforms to MIME handling of base64 (RFC 2045). Note that CPython doesn't document handling of invalid characters in a2b_base64() docs: https://docs.python.org/3/library/binascii.html#binascii.a2b_base64 , so we specify it more explicitly than it, based on CPython's actual behavior (with which MicroPython now compliant).
2017-08-17extmod/modubinascii: Rewrite mod_binascii_a2b_base64.Alex Robbins
This implementation ignores invalid characters in the input. This allows it to decode the output of b2a_base64, and also mimics the behavior of CPython.
2017-08-17py/binary: Change internal bytearray typecode from 0 to 1.Damien George
The value of 0 can't be used because otherwise mp_binary_get_size will let a null byte through as the type code (intepreted as byterray). This can lead to invalid type-specifier strings being let through without an error in the struct module, and even buffer overruns.
2017-08-16tools/mpy-tool.py: Fix missing argument in dump() functionstijn
This makes the -d commandline argument usable again. Pass empty string as parent name as listing starts from the root.
2017-08-16zephyr/prj_base.conf: Enable CONFIG_INIT_STACKS.Paul Sokolovsky
As required for zephyr.stack_analyze().
2017-08-16zephyr/modzephyr: Add current_tid() and stacks_analyze() functions.Paul Sokolovsky
current_tid() returns current thread ID. stacks_analyze() calls k_call_stacks_analyze() which, with CONFIG_INIT_STACKS enabled, will print stack usage for some well-known threads in the system.
2017-08-16extmod/modussl_mbedtls.c: Add ussl.getpeercert() method.Eric Poulsen
Behaviour is as per CPython but only the binary form is implemented here. A test is included.
2017-08-15py: Add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE.Stefan Naumann
It enables all the DEBUG_printf outputs in the py/ source code.
2017-08-15py/binary.c: Fix bug when packing big-endian 'Q' values.Bas van Sisseren
Without bugfix: struct.pack('>Q', 16) b'\x00\x00\x00\x10\x00\x00\x00\x00' With bugfix: struct.pack('>Q', 16) b'\x00\x00\x00\x00\x00\x00\x00\x10'
2017-08-14docs/library/machine.RTC.rst: Fix typo.Javier Candeira
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
2017-08-12tools/mpy-tool.py: Don't generate const_table if it's empty.Damien George
2017-08-11py/modsys: Initial implementation of sys.getsizeof().Paul Sokolovsky
Implemented as a new MP_UNARY_OP. This patch adds support lists, dicts and instances.
2017-08-11all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
2017-08-11minimal,esp8266,pic16bit: Remove unused stmhal include from Makefile.Damien George
2017-08-09zephyr/modusocket: Fully switch to native Zephyr sockets.Paul Sokolovsky
2017-08-09py/objstr: Raise an exception for wrong type on RHS of str binary op.Damien George
The main case to catch is invalid types for the containment operator, of the form str.__contains__(non-str).
2017-08-09py/objtuple: Allow to use inplace-multiplication operator on tuples.Damien George
2017-08-09zephyr/modusocket: recv: Switch to native sockets.Paul Sokolovsky