summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* 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
|
* README: Add explicit note that subdirs contain more READMEs.Paul Sokolovsky2016-05-14
|
* docs/esp8266/quickstart: remove i2c examples with stop=FalseRadomir Dopieralski2016-05-14
| | | | Since the ``stop`` parameter has been dropped.
* stmhal/sdcard: Allow to do unaligned read-from/write-to SD card.Damien George2016-05-13
| | | | | | | | | | | | For example, the following code now works with a file on the SD card: f = open('test', 'rb') # test must be 1024 bytes or more in size f.seek(511) f.read(513) Also works for writing. Fixes issue #1863.
* tools/make-frozen.py: Properly escape hex chars when making C strings.Damien George2016-05-13
|
* tests/basics/string_splitlines: Reinstate feature test for splitlines.Damien George2016-05-13
|
* py/objstr: Make dedicated splitlines function, supporting diff newlines.Damien George2016-05-13
| | | | | | | | It now supports \n, \r and \r\n as newline separators. Adds 56 bytes to stmhal and 80 bytes to unix x86-64. Fixes issue #1689.
* stmhal/i2c: Expose I2CHandle3 for use by custom C code.Damien George2016-05-13
| | | | | If custom C code uses the I2C busses then it needs access to these structures for i2c_init().
* stmhal/led: Allow LEDs to be in PWM mode with TIM1 and channels 1-4.Damien George2016-05-13
| | | | This allows PYBv3 to use PWM for LED(1) and LED(2).
* py/gc: gc_dump_alloc_table(): Dump heap offset instead of actual address.Paul Sokolovsky2016-05-13
| | | | | | Address printed was truncated anyway and in general confusing to outsider. A line which dumps it is still left in the source, commented, for peculiar cases when it may be needed (e.g. when running under debugger).
* gc: gc_dump_alloc_table(): Use '=' char for tail blocks.Paul Sokolovsky2016-05-13
| | | | | '=' is pretty natural character for tail, and gives less dense picture where it's easier to see what object types are actually there.
* py/moduerrno: Add EACCES, pretty common error on Unix.Paul Sokolovsky2016-05-13
|
* py/objexcept: Don't convert errno to str in constructor, do it in print.Damien George2016-05-12
| | | | | | | | OSError's are now printed like: OSError: [Errno 1] EPERM but only if the string corresponding to the errno is found.
* py/emitglue: Fix build on AArch64 (ARMv8, etc.) related to loading .mpy files.Paul Sokolovsky2016-05-12
| | | | Actual loading of .mpy files isn't tested.
* py/objfloat, py/modmath: Ensure M_PI and M_E defined.Colin Hogben2016-05-12
| | | | | | In some compliation enviroments (e.g. mbed online compiler) with strict standards compliance, <math.h> does not define constants such as M_PI. Provide fallback definitions of M_E and M_PI where needed.
* py: Add mp_errno_to_str() and use it to provide nicer OSError msgs.Damien George2016-05-12
| | | | | | | If an OSError is raised with an integer argument, and that integer corresponds to an errno, then the string for the errno is used as the argument to the exception, instead of the integer. Only works if the uerrno module is enabled.
* py/moduerrno: Add more constants to the errno module.Damien George2016-05-12
|
* esp8266: Change to use internal errno's.Damien George2016-05-12
|
* extmod/modlwip: Convert errno's to use MP_Exxx symbols.Damien George2016-05-12
|
* py/mperrno: Add some more MP_Exxx constants, related to networking.Damien George2016-05-12
|
* py/gc: Make (byte)array type dumping conditional on these types being enabled.Paul Sokolovsky2016-05-11
|
* py/gc: gc_dump_alloc_table(): Show byte/str and (byte)array objects.Paul Sokolovsky2016-05-11
| | | | | | These are typical consumers of large chunks of memory, so it's useful to see at least their number (how much memory isn't clearly shown, as the data for these objects is allocated elsewhere).
* py/repl: Fix handling of backslash in quotes when checking continuation.Damien George2016-05-11
|
* docs/esp8266/tutorial: Fix typo in do_connect() network example.Damien George2016-05-11
| | | | Fixes issue #2065.
* drivers/cc3000: Rename timeval to cc3000_timeval, to avoid clash.Damien George2016-05-10
| | | | The timeval struct can be defined by system C headers.
* stmhal: For network drivers, convert to use MP_Exxx errno symbols.Damien George2016-05-10
|
* py/mperrno: Add EAFNOSUPPORT definition.Damien George2016-05-10
|
* esp8266: Enable uerrno module, weak linked also as errno.Damien George2016-05-10
|
* esp8266: Convert to use new MP_Exxx errno symbols.Damien George2016-05-10
| | | | | | | These symbols are still defined in terms of the system Exxx symbols, and can be switched to internal numeric definitions at a later stage. Note that extmod/modlwip still uses many system Exxx symbols.
* stmhal: Convert to use internal errno symbols; enable uerrno module.Damien George2016-05-10
|
* unix: Enable uerrno module.Damien George2016-05-10
|
* py/parse: Add uerrno to list of modules to look for constants in.Damien George2016-05-10
|
* py: Add uerrno module, with errno constants and dict.Damien George2016-05-10
|
* py: Add mperrno.h file with uPy defined errno constants.Damien George2016-05-10
|
* esp8266/help: Add "sta_if.active(True)" command.Paul Sokolovsky2016-05-10
| | | | As reported on the forum by Roberthh.
* esp8266/mpconfigport: Reduce various parser-related allocation params.Paul Sokolovsky2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives noticeable result for parsing simple input (modelled on 32-bit unix port): Before: >>> micropython.mem_total() 3360 >>> micropython.mem_total() 4472 After: >>> micropython.mem_total() 3072 >>> micropython.mem_total() 4052 However, effect on parsing large input is much less conclusive, e.g.: Before: >>> micropython.mem_total() 3376 >>> import pystone_lowmem >>> micropython.mem_total() 33006 delta=29630 After: >>> micropython.mem_total() 3091 >>> import pystone_lowmem >>> micropython.mem_total() 32509 delta=29418
* stmhal: Fix clock configuration for STM32L476-discovery; also add I2C2.Tobias Badertscher2016-05-10
|
* docs/esp8266/quickref: New way to get MAC addressRadomir Dopieralski2016-05-10
|
* py/vstr: Change allocation policy, +16 to requested size, instead of *2.Paul Sokolovsky2016-05-10
| | | | | | | | | | | | | | | | | | | | Effect measured on esp8266 port: Before: >>> pystone_lowmem.main(10000) Pystone(1.2) time for 10000 passes = 44214 ms This machine benchmarks at 226 pystones/second >>> pystone_lowmem.main(10000) Pystone(1.2) time for 10000 passes = 44246 ms This machine benchmarks at 226 pystones/second After: >>> pystone_lowmem.main(10000) Pystone(1.2) time for 10000 passes = 44343ms This machine benchmarks at 225 pystones/second >>> pystone_lowmem.main(10000) Pystone(1.2) time for 10000 passes = 44376ms This machine benchmarks at 225 pystones/second
* Revert "py/objstr: .format(): Avoid call to vstr_null_terminated_str()."Paul Sokolovsky2016-05-09
| | | | | | This reverts commit 6de8dbb4880e58c68a08205cb2b9c15940143439. The change was incorrect (correct change would require comparing with end pointer in each if statement in the block).