summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* py/moduerrno: Add EEXIST, EISDIR.Paul Sokolovsky2016-05-25
| | | | Useful to check file/dir operations result, in particular used by upip.
* esp8266/esp_mphal: mp_uos_dupterm_deactivate() may raise exception.Paul Sokolovsky2016-05-24
| | | | So, keep call to it protected via NLR still.
* esp8266/esp_mphal: Handle Ctrl+C from dupterm (e.g. WebREPL).Paul Sokolovsky2016-05-24
|
* esp8266/esp_mphal: Fix NLR buffer leak in call_dupterm_read().Paul Sokolovsky2016-05-24
|
* esp8266/scripts/port_diag: Dump network interface IP settings.Paul Sokolovsky2016-05-24
|
* docs/esp8266/general: Grammar fixes.mad4742016-05-23
|
* py/objnamedtuple: Allow passing field names as a tuple.Antonin ENFRUN2016-05-23
| | | | | So the documentation's example works. Besides, a tuple can be more memory efficient.
* unix: Support frozen packages.Damien George2016-05-23
| | | | | | To use, put your directory structure with .py files in frozen/ and then: make FROZEN_MPY_DIR=frozen
* py/makeqstrdata.py: Allow to have double-quote characters in qstrs.Damien George2016-05-23
| | | | | When rendering the qstr for a C header file, the double-quate character must be escaped.
* stmhal: Support frozen packages using .mpy files.Damien George2016-05-23
| | | | See issue #1814.
* tools/mpy-tool.py: Don't strip directories from the frozen source name.Damien George2016-05-23
| | | | | Directories are now supported by the frozen import system (to implement frozen packages) so we should keep them.
* mpy-cross: Add -s option to specify the embedded source filename.Damien George2016-05-23
| | | | | | | | | | .mpy files contain the name of the source file that they were compiled from. This patch adds a way to change this name to an arbitrary string, specified on the command line with the -s option. The default is to use the full name of the input filename. This new -s option is useful to strip off a leading directory name so that mpy-tool.py can freeze packages.
* tools/mpy-tool.py: Include .py extension in frozen filename.Damien George2016-05-23
| | | | So that it can be correctly stat'd when looking for frozen files.
* py: Allow to stat and import frozen mpy files using new frozen "VFS".Damien George2016-05-23
| | | | Freezing mpy files using mpy-tool.py now works again.
* docs: esp8266: Include ussl module in the docs.Paul Sokolovsky2016-05-22
|
* docs/ussl: Add basic description of axTLS-based modussl.Paul Sokolovsky2016-05-22
| | | | | In particular, disclose the fact that server certificates are not validated.
* esp8266/main: Update _boot module loading for recent frozen modules refactors.Paul Sokolovsky2016-05-22
|
* esp8266: Enable collections.OrderedDict.Paul Sokolovsky2016-05-22
|
* py/objstr: Fix mix-signed comparison in str.center().Paul Sokolovsky2016-05-22
|
* py/objstr*: Properly ifdef str.center().Dave Hylands2016-05-22
|
* tests: Add testcase for str.center().Paul Sokolovsky2016-05-22
|
* py/objstr: Implement str.center().Paul Sokolovsky2016-05-22
| | | | | | Disabled by default, enabled in unix port. Need for this method easily pops up when working with text UI/reporting, and coding workalike manually again and again counter-productive.
* py/builtinimport: Unbreak bare-arm build.Paul Sokolovsky2016-05-21
|
* py/builtinimport: Unbreak minimal build.Paul Sokolovsky2016-05-21
| | | | | These are workarounds required until frozen .mpy loading following standard frozen modules code path.
* tools/make-frozen: Update for latest changes in frozen modules support.Paul Sokolovsky2016-05-21
| | | | | | Frozen modules are now stored with extensions and with '/' as path separator. In other words, frozen modules paths stored as they are in normal filesystem.
* py/{builtinimport,frozenmod}: Rework frozen modules support to support packages.Paul Sokolovsky2016-05-21
| | | | | | | | | | Now frozen modules is treated just as a kind of VFS, and all operations performed on it correspond to operations on normal filesystem. This allows to support packages properly, and potentially also data files. This change also have changes to rework frozen bytecode modules support to use the same framework, but it's not finished (and actually may not work, as older adhox handling of any type of frozen modules is removed).
* unix/unix_mphal: Implement mp_hal_ticks_us().Paul Sokolovsky2016-05-21
| | | | Similar to existing mp_hal_ticks_ms().
* py/mphal.h: Provide default prototypes for mp_hal_delay_us/mp_hal_ticks_us.Paul Sokolovsky2016-05-21
| | | | Similar to existing mp_hal_delay_ms/mp_hal_ticks_ms.
* extmod/moduos_dupterm: Dumpterm subsystem is responsible for closing stream.Paul Sokolovsky2016-05-20
| | | | | | | | Make dupterm subsystem close a term stream object when EOF or error occurs. There's no other party than dupterm itself in a better position to do this, and this is required to properly reclaim stream resources, especially if multiple dupterm sessions may be established (e.g. as networking connections).
* extmod/modwebrepl: Add close() method.Paul Sokolovsky2016-05-20
|
* extmod/modwebsocket: Add close() method.Paul Sokolovsky2016-05-20
|
* py/stream: Add mp_stream_close() helper function.Paul Sokolovsky2016-05-20
|
* extmod: When including extmod headers, prefix path with extmod/.Damien George2016-05-20
|
* py: Declare constant data as properly constant.Damien George2016-05-20
| | | | | Otherwise some compilers (eg without optimisation) will put this read-only data in RAM instead of ROM.
* esp8266: Add APA102 serial individually controllable LEDs support.misterdanb2016-05-19
| | | | APA102 is a new "smart LED", similar to WS2812 aka "Neopixel".
* esp8266/README: Add a very first start section.Torwag2016-05-19
| | | | | | Adding a very first start section to get people going after flashing. I tried to condense it to a minimum to avoid as much as possible redundancy and bloating.
* py/stream: Support both "exact size" and "one underlying call" operations.Paul Sokolovsky2016-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both read and write operations support variants where either a) a single call is made to the undelying stream implementation and returned buffer length may be less than requested, or b) calls are repeated until requested amount of data is collected, shorter amount is returned only in case of EOF or error. These operations are available from the level of C support functions to be used by other C modules to implementations of Python methods to be used in user-facing objects. The rationale of these changes is to allow to write concise and robust code to work with *blocking* streams of types prone to short reads, like serial interfaces and sockets. Particular object types may select "exact" vs "once" types of methods depending on their needs. E.g., for sockets, revc() and send() methods continue to be "once", while read() and write() thus converted to "exactly" versions. These changes don't affect non-blocking handling, e.g. trying "exact" method on the non-blocking socket will return as much data as available without blocking. No data available is continued to be signaled as None return value to read() and write(). From the point of view of CPython compatibility, this model is a cross between its io.RawIOBase and io.BufferedIOBase abstract classes. For blocking streams, it works as io.BufferedIOBase model (guaranteeing lack of short reads/writes), while for non-blocking - as io.RawIOBase, returning None in case of lack of data (instead of raising expensive exception, as required by io.BufferedIOBase). Such a cross-behavior should be optimal for MicroPython needs.
* unix/mpconfigport_coverage.h: Add dedicated config file for coverage build.Paul Sokolovsky2016-05-18
| | | | | This allows to enable the options which aren't enabled in the normal unix config (as unix port is no longer an enable-all port).
* esp8266/scripts/webrepl_setup: Add max password length check.Paul Sokolovsky2016-05-17
| | | | modwebrepl truncates password to 9 chars, and that led people to confusion.
* unix: Add ability to include frozen bytecode in the build.Damien George2016-05-16
| | | | | | | | | | To use frozen bytecode make a subdirectory under the unix/ directory (eg frozen/), put .py files there, then run: make FROZEN_MPY_DIR=frozen Be sure to build from scratch. The .py files will then be available for importing.
* tools/mpy-tool.py: Add checks for critical configuration vars.Damien George2016-05-16
| | | | | | | When an mpy file is frozen it must know the values of certain configuration variables. This patch provides an explicit check in the generated C file that the configuration variables are what they are supposed to be.
* esp8266/scripts/webrepl_setup: Show password placeholder char.Paul Sokolovsky2016-05-17
| | | | | That was the intent for the initial user setup, but didn't work before due to lwIP issues. Enable now that they're fixed.
* esp8266/scripts/port_diag: Add network diagnostic output.Paul Sokolovsky2016-05-16
|
* esp8266/moduos.c: Addition of the rename method to module uos.Robert HH2016-05-16
| | | | | | | | | | | | | | That one was missing in the module, even if it was available in the vfs object. The change consist of adding the name and preparing the call to the underlying vfs module, similar to what was already implemented e.g. for remove. Rename is useful by itself, or for instance for a safe file replace, consisting of the sequence: write to a temp file delete the original file rename the temp file to the original file's name
* extmod/modlwip: Rework how Python accept callback is called.Paul Sokolovsky2016-05-15
| | | | | | | | | | | Calling it from lwIP accept callback will lead incorrect functioning and/or packet leaks if Python callback has any networking calls, due to lwIP non-reentrancy. So, instead schedule "poll" callback to do that, which will be called by lwIP when it does not perform networking activities. "Poll" callback is called infrequently though (docs say every 0.5s by default), so for better performance, lwIP needs to be patched to call poll callback soon after accept callback, but when current packet is already processed.
* docs/ustruct: Describe supported type codes.Paul Sokolovsky2016-05-14
|
* tools/make-frozen.py: Quick fix to support package-modules.Paul Sokolovsky2016-05-14
| | | | It allows to "import foo.bar", but not "from foo import bar".
* tests/struct1: Add testcase for an unknown type char.Paul Sokolovsky2016-05-14
|
* py/modstruct: Raise ValueError on unsupported format char.Paul Sokolovsky2016-05-14
|
* py/objstringio: Add TODO comment about avoiding copying on .getvalue().Paul Sokolovsky2016-05-14
|