- Nov 16, 2017
-
-
Damien George authored
This patch simplifies the str creation API to favour the common case of creating a str object that is not forced to be interned. To force interning of a new str the new mp_obj_new_str_via_qstr function is added, and should only be used if warranted. Apart from simplifying the mp_obj_new_str function (and making it have the same signature as mp_obj_new_bytes), this patch also reduces code size by a bit (-16 bytes for bare-arm and roughly -40 bytes on the bare-metal archs).
-
Damien George authored
-
- Nov 15, 2017
-
-
Damien George authored
-
Damien George authored
At the original frequency of 90MHz there's no way to get a 48MHz USB clock. These new setting mirror those of the STM32F429DISC board.
-
Christopher Arndt authored
Rationale: * Calling Python build tool scripts from makefiles should be done consistently using `python </path/to/script>`, instead of relying on the correct she-bang line in the script [1] and the executable bit on the script being set. This is more platform-independent. * The name/path of the Python executable should always be used via the makefile variable `PYTHON` set in `py/mkenv.mk`. This way it can be easily overwritten by the user with `make PYTHON=/path/to/my/python`. * The Python executable name should be part of the value of the makefile variable, which stands for the build tool command (e.g. `MAKE_FROZEN` and `MPY_TOOL`), not part of the command line where it is used. If a Python tool is substituted by another (non-python) program, no change to the Makefiles is necessary, except in `py/mkenv.mk`. * This also solves #3369 and #1616. [1] There are systems, where even the assumption that `/usr/bin/env` always exists, doesn't hold true, for example on Android (where otherwise the unix port compiles perfectly well).
-
Damien George authored
All the asm macro names that convert a particular architecture to a generic interface now follow the convention whereby the "destination" (usually a register) is specified first.
-
- Nov 14, 2017
-
-
Paul Sokolovsky authored
Recent vendor SDKs ship libs with code in .text section, which previously was going into .irom0.text. Adjust the linker script to route these sections back to iROM (follows upstream change).
-
- Nov 12, 2017
-
-
Christopher Cooper authored
The SHA1 hashing functionality is provided via the "axtls" library's implementation, and hence is unavailable when the "axtls" library is not being used. This change provides the same SHA1 hashing functionality when using the "mbedtls" library by using its implementation instead.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
stijn authored
-
- Nov 10, 2017
-
-
Paul Sokolovsky authored
As vars contains array of base types and its length, name them as such, avoid generic "items" and "len" names.
-
- Nov 09, 2017
-
-
Paul Sokolovsky authored
Doesn't list specific API calls yet, the purpose is to let user know that the module exists.
-
- Nov 08, 2017
-
-
Paul Sokolovsky authored
Macros to convert big-endian values to host byte order and vice-versa. These were defined in adhoc way for some ports (e.g. esp8266), allow reuse, provide default implementations, while allow ports to override.
-
- Nov 07, 2017
-
-
Paul Sokolovsky authored
Plus, additional descriptions/formatting.
-
- Nov 06, 2017
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Commented out by default.
-
- Nov 05, 2017
-
-
Paul Sokolovsky authored
-
- Nov 04, 2017
-
-
Paul Sokolovsky authored
In the vendor SDK 2.1.0, some of the functions which previously didn't have prototypes, finally acquired them. Change prototypes on our side to match those in vendor headers, to avoid warnings-as-errors.
-
- Nov 03, 2017
-
-
Paul Sokolovsky authored
-
- Nov 01, 2017
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
If SSL_EAGAIN is returned (which is a feature of MicroPython's axTLS fork), return EAGAIN. Original axTLS returns SSL_OK both when there's no data to return to user yet and when the underlying stream returns EAGAIN. That's not distinctive enough, for example, original module code works well for blocking stream, but will infinite-loop for non-blocking socket with EAGAIN. But if we fix non-blocking case, blocking calls to .read() will return few None's initially (while axTLS progresses thru handshake). Using SSL_EAGAIN allows to fix non-blocking case without regressing the blocking one. Note that this only handles case of non-blocking reads of application data. Initial handshake and writes still don't support non-blocking mode and must be done in the blocking way.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
The technique of using alloca is how dotted import names are composed in mp_import_from and mp_builtin___import__, so use the same technique in the compiler. This puts less pressure on the heap (only the stack is used if the qstr already exists, and if it doesn't exist then the standard qstr block memory is used for the new qstr rather than a separate chunk of the heap) and reduces overall code size.
-
Damien George authored
-
Damien George authored
-
- Oct 31, 2017
-
-
Paul Sokolovsky authored
-
Damien George authored
This reverts commit 3289b9b7. The commit broke building on MINGW because the filename became micropython.exe.exe. A proper solution to support more Windows build environments requires more thought and testing.
-
- Oct 30, 2017
-
-
Paul Sokolovsky authored
And describe an alternative of using uselect.poll().
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
Fixes a few C warnings. No functional changes.
-
Eric Poulsen authored
Per the comment found here https://github.com/micropython/micropython-esp32/issues/209#issuecomment-339855157, 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.
-
Yuval Langer authored
-
- Oct 29, 2017
-
-
Paul Sokolovsky authored
A step towards implementing non-blocking stream support for SSL.
-
- Oct 28, 2017
-
-
Paul Sokolovsky authored
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).
-
- Oct 27, 2017
-
-
Paul Sokolovsky authored
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.
-
Paul Sokolovsky authored
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.
-