Commits on Feb 27, 2018
  1. Add and

    dpgeorge committed Feb 27, 2018
    To direct users to the main MicroPython repository.
Commits on Feb 11, 2018
  1. update to indicate port merged back

    Nick Moore
    Nick Moore committed Feb 11, 2018
Commits on Nov 29, 2017
  1. esp32/modesp: Add osdebug() function to disable or change IDF logging.

    ak15199 authored and dpgeorge committed Jun 15, 2017
    Code lineage:
    osdebug() is based loosely on the version in esp8266, but there didn't
    seem to be an obvious way of choosing a particular UART. The basic
    behavior is the same, though: provide None, and logging is disabled;
    provide an integer and logging is restored to the default level.
    To build on that, and because the IDF provides more functionality, a
    second parameter has now been implemented which allows the active log
    level to be set:
       esp.osdebug(uart[, level])
    The module has a corresponding set of LOG_ values to set this accordingly.
Commits on Nov 28, 2017
Commits on Oct 31, 2017
  1. esp32: Implement wired Ethernet via network.LAN().

    MrSurly authored and dpgeorge committed Sep 27, 2017
    Updates to Makefile, modnetwork.c, and addition of network_lan.c to
    implement `network.LAN()` object for wired PHY objects.
  2. extmod/modussl_mbedtls: Clean up mbedtls state when error during setup.

    dpgeorge committed Oct 31, 2017
    Without this patch, if the SSL handshake fails (eg the connection was lost)
    then the mbedtls state (memory) will never be freed.
Commits on Oct 30, 2017
  1. extmod/modussl_mbedtls: Allow to compile with unix coverage build.

    dpgeorge committed Oct 30, 2017
    Fixes a few C warnings.  No functional changes.
  2. extmod/modussl: Add finaliser support for ussl objects.

    MrSurly authored and dpgeorge committed Oct 27, 2017
    Per the comment found here
    #209 (comment),
    this patch adds finaliser code to prevent memory leaks from ussl objects,
    which is especially useful when memory for a ussl context is allocated
    outside the uPy heap.  This patch is in-line with the finaliser code found
    in many modsocket implementations for various ports.
    This feature is configured via MICROPY_PY_USSL_FINALISER and is disabled by
    default because there may be issues using it when the ussl state *is*
    allocated on the uPy heap, rather than externally.
  3. esp32/modnetwork.c: Fix for setting DNS with network.WLAN.ifconfig().

    MrSurly authored and dpgeorge committed Oct 30, 2017
    When configuring a static set of values with ifconfig() the DNS was not
    being set.  This patch fixes that, and additionally uses the tcpip_adapter
    API to ensure it is thread safe.
    Further discussion is here:
Commits on Oct 29, 2017
  1. lib/axtls: Update, support for SSL_EAGAIN return code.

    pfalcon committed Oct 29, 2017
    A step towards implementing non-blocking stream support for SSL.
Commits on Oct 28, 2017

    pfalcon committed Oct 28, 2017
    With inplace methods now disabled by default, it makes sense to enable
    reverse methods, as they allow for more useful features, e.g. allow
    for datetime module to implement both 2 * HOUR and HOUR * 2 (where
    HOUR is e.g. timedelta object).
Commits on Oct 27, 2017

    pfalcon committed Oct 27, 2017
    This allows to configure support for inplace special methods separately,
    similar to "normal" and reverse special methods. This is useful, because
    inplace methods are "the most optional" ones, for example, if inplace
    methods aren't defined, the operation will be executed using normal
    methods instead.
    As a caveat, __iadd__ and __isub__ are implemented even if
    MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS isn't defined. This is similar
    to the state of affairs before binary operations refactor, and allows
    to run existing tests even if MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS
    isn't defined.
  2. py/objtype: Define all special methods if requested.

    pfalcon committed Oct 21, 2017
    If MICROPY_PY_ALL_SPECIAL_METHODS is defined, actually define all special
    methods (still subject to gating by e.g. MICROPY_PY_REVERSE_SPECIAL_METHODS).
    This adds quite a number of qstr's, so should be used sparingly.
  3. docs/library/network: Add dhcp_hostname parameter

    joar authored and pfalcon committed Oct 25, 2017
    I have not actually tested this, going by information available in
  4. extmod/vfs: Replace VLA in proxy func with small, static sized array.

    dpgeorge committed Oct 27, 2017
    VLAs can be expensive on stack usage due to stack alignment requirements,
    and also the fact that extra local variables are needed to track the
    dynamic size of the stack.  So using fixed-size arrays when possible can
    help to reduce code size and stack usage.
    In this particular case, the maximum value of n_args in the VLA is 2 and so
    it's more efficient to just allocate this array with a fixed size.  This
    reduces code size by around 30 bytes on Thumb2 and Xtensa archs.  It also
    reduces total stack usage of the function: on Thumb2 the usage with VLA is
    between 40 and 48 bytes, which is reduced to 32; on Xtensa, VLA usage is
    between 64 and 80 bytes, reduced to 32; on x86-64 it's at least 88 bytes
    reduced to 80.
Commits on Oct 26, 2017
  1. docs/usocket: Elaborate descriptions.

    pfalcon committed Oct 26, 2017
    Use the "usocket" module name everywhere. Use "MicroPython port"
    terminology. Suggest to avoid using IPPROTO_* constants in socket()
  2. esp32: Update to latest ESP IDF.

    dpgeorge committed Oct 26, 2017
    This update requires the xtensa-esp32-elf to be upgraded to the latest
    version, 1.22.0-73-ge28a011-5.2.0.
  3. tests/net_inet: Update tls test to work with CPython and incl new site.

    dpgeorge committed Oct 26, 2017
    CPython only supports the server_hostname keyword arg via the SSLContext
    object, so use that instead of the top-level ssl.wrap_socket.  This allows
    the test to run on CPython the same as uPy.
    Also add the "Host:" header to correctly make a GET request (for URLs that
    are hosted on other servers).  This is not strictly needed to test the SSL
    connection but helps to debug things when printing the response.
Commits on Oct 25, 2017
Commits on Oct 24, 2017
  1. unix/modusocket: Remove #if MICROPY_SOCKET_EXTRA code blocks.

    pfalcon committed Oct 24, 2017
    These defined couple of functions added during initial experimentation,
    which aren't part of MicroPython API and no longer used or needed.
  2. all: Use NULL instead of "" when calling mp_raise exception helpers.

    dpgeorge committed Oct 24, 2017
    This is the established way of doing it and reduces code size by a little
Commits on Oct 23, 2017
  1. unix: Rename modsocket.c to modusocket.c.

    pfalcon committed Oct 23, 2017
    Unix naming is historical, before current conventions were established.
    All other ports however have it as "modusocket.c", so rename for
    consistency and to avoid confusion.
Commits on Oct 21, 2017
  1. py/objtype: Fit qstrs for special methods in byte type.

    pfalcon committed Oct 21, 2017
    Update to sort strings starting with "__" to the beginning
    of qstr list, so they get low qstr id's, guaranteedly fitting in 8 bits.
    Then use this property to further compact op_id => qstr mapping arrays.
Commits on Oct 19, 2017
  1. py/objtype: Use CPython compatible method name for sizeof.

    pfalcon committed Oct 19, 2017
    getsizeof() calls the object’s __sizeof__ method. Previously, "getsizeof"
    was used mostly to save on new qstr, as we don't really support calling
    this method on arbitrary objects (so it was used only for reporting).
    However, normalize it all now.
  2. py/argcheck: Remove #if guard around terse error message helper func.

    dpgeorge committed Oct 19, 2017
    Not all compilers/analysers are smart enough to realise that this function
    is never called if MICROPY_ERROR_REPORTING is not TERSE, because the logic
    in the code uses if statements rather than #if to select whether to call
    this function or not (MSC in debug mode is an example of this, but there
    are others).  So just unconditionally compile this helper function.  The
    code-base anyway relies on the linker to remove unused functions.
  3. stm32: Make uos.dupterm() conform to specs by using extmod version.

    dpgeorge committed Oct 19, 2017
    The legacy function pyb.repl_uart() is still provided and retains its
    original behaviour (it only accepts a UART object).  uos.dupterm() will now
    accept any object with write/readinto methods.  At the moment there is just
    1 dupterm slot.
  4. stm32/mphalport: Improve efficiency of mp_hal_stdout_tx_strn_cooked.

    dpgeorge committed Oct 19, 2017
    Also simplifies the code by removing the specialised (and inefficient)
    cooked functions from UART and USB_VCP.