summaryrefslogtreecommitdiff
path: root/unix
AgeCommit message (Collapse)Author
2016-09-17unix/modjni: Add array() top-level function to create Java array.Paul Sokolovsky
Takes element primitive type encoded as a char per standard JNI encoding, and array size. TODO: Support object arrays.
2016-09-16unix/modjni: Implement subscription for object arrays.Paul Sokolovsky
2016-09-12unix: Fix build for when MICROPY_PY_SOCKET=0.Renato Aguiar
2016-09-05unix,stmhal,esp8266: When find'ing frozen files follow symbolic links.Damien George
It's useful to be able to use symbolic links to add files and directories to the set of scripts to be frozen.
2016-09-05py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled.Delio Brignoli
This new config option allows to control whether MicroPython uses its own internal printf or not (if not, an external one should be linked in). Accompanying this new option is the inclusion of lib/utils/printf.c in the core list of source files, so that ports no longer need to include it themselves.
2016-09-04tests/extmod: Add a test for framebuf module, tested by coverage build.Damien George
2016-09-02tests/unix/extra_coverage: Add test for str/bytes with invalid hash.Damien George
2016-09-01py/mpprint: Fail an assertion with unsupported format specifiers.Delio Brignoli
Arguments of an unknown type cannot be skipped and continuing to parse a format string after encountering an unknown format specifier leads to undefined behaviour. This patch helps to find use of unsupported formats.
2016-08-31unix,stmhal,esp8266: When find'ing frozen files don't use extra slash.Damien George
This extra forward slash for the starting-point directory is unnecessary and leads to additional slashes on Max OS X which mean that the frozen files cannot be imported. Fixes #2374.
2016-08-24extmod/modubinascii: Make crc32() support configurable.Paul Sokolovsky
Disable by default, enable in unix port.
2016-08-15ports: Remove typedef of machine_ptr_t, it's no longer needed.Damien George
This type was used only for the typedef of mp_obj_t, which is now defined by the object representation. So we can now remove this unused typedef, to simplify the mpconfigport.h file.
2016-08-10unix/mpconfigport.h: Don't include stdio.h on MacOS.ilovezfs
Fixes build errors such as "../lib/utils/printf.c:43:5: error: expected parameter declarator"
2016-08-07py/objstr: Make .partition()/.rpartition() methods configurable.Paul Sokolovsky
Default is disabled, enabled for unix port. Saves 600 bytes on x86.
2016-08-07unix/moduselect: Allow poll.register(), etc. accept fd-like objects.Paul Sokolovsky
This includes file and socket objects, backed by Unix file descriptor. This improves compatibility with stmhal's uselect (and convenience of use), though not completely: return value from poll.poll() is still raw file descriptor.
2016-08-06unix: Enable websocket module.Paul Sokolovsky
2016-07-31unix/Makefile: And note why btree module is disabled for coverage build.Paul Sokolovsky
2016-07-30py/mpconfig.h: Add MICROPY_STREAMS_POSIX_API setting.Paul Sokolovsky
To filter out even prototypes of mp_stream_posix_*() functions, which require POSIX types like ssize_t & off_t, which may be not available in some ports.
2016-07-28unix/file: Use generic stream flush() method.Paul Sokolovsky
2016-07-27unix/file: fdfile_ioctl(): Fix argument to check_fd_is_open().Paul Sokolovsky
2016-07-27unix/file: ioctl(): Check that file is open before operations.Paul Sokolovsky
2016-07-27unix/file: Implement MP_STREAM_FLUSH ioctl.Paul Sokolovsky
2016-07-26unix/mpconfigport.h: Include stdio.h by default.Paul Sokolovsky
This allows to use printf() in a any source file with unix port, for quick debugging.
2016-07-22unix: Enable MICROPY_PY_STR_BYTES_CMP_WARN.Paul Sokolovsky
Also, fix a warning text (remove "duplicate" BytesWarning).
2016-07-21unix: Disable MICROPY_GC_ALLOC_THRESHOLD for minimal build.Paul Sokolovsky
2016-07-16unix: Cache libaxtls.a in local build dir.Paul Sokolovsky
Allows to build the library variant for other ports in parallel.
2016-07-13extmod/modussl_axtls: Further changes to allow alternative SSL modules.Paul Sokolovsky
Make variable MICROPY_SSL_AXTLS=1 should be defined to activate modussl_axtls and link with -laxtls.
2016-07-11unix/mpthreadport: Adjust minimum thread stack, and stack limit check.Damien George
The minimum thread stack size is set by pthreads (16k bytes) so we must use that value for our minimum. The stack limit check is also adjusted to work correctly for 32-bit builds.
2016-07-09unix: Disable the GIL to improve performance of non-thread code.Damien George
Threading support is still very new so stay conservative at this point and enable threading without the GIL. This requires users to protect concurrent access of mutatable Python objects (eg lists) with locks at the Python level (something you should probably do anyway). The advantage is that there is less of a performance hit for non-threaded code, because the VM does not need to constantly release/acquire the GIL. In the future the GIL will be made more efficient. There is also room to improve the efficiency of non-GIL code by not using mutex's if there is only one thread active.
2016-07-09unix/main: When preparing sys.path, allocate exact strings on uPy heap.Paul Sokolovsky
Due to the way modern compilers work (allocating space for stack vars once at tha start of function, and deallocating once on exit from), using intermediate stack buffer of big size caused blockage of 4K (PATH_MAX) on stack for the entire duration of MicroPython execution.
2016-07-08unix/main: Improve help for -X options a bit.Paul Sokolovsky
2016-07-08unix/main: Error out on unknown value of suffix in -X heapsize= option.Paul Sokolovsky
E.g. -X heapsize=16Kfoo, -X heapsize=1G will lead to error.
2016-07-03unix/mpconfigport_minimal.h: Allow to print a string within 1KB of heap.Paul Sokolovsky
By adjusting parser allocation policy.
2016-07-03unix/Makefile: Make "minimal" build be minimal again.Paul Sokolovsky
2016-07-02unix: Enable btree module.Paul Sokolovsky
But disable it for coverage build, as its extra warninsg aren't compatible with K&R C BerkeleyDB uses.
2016-06-28py/modthread: Allow to properly set the stack limit of a thread.Damien George
We rely on the port setting and adjusting the stack size so there is enough room to recover from hitting the stack limit.
2016-06-28unix/modtime: Release the GIL when sleeping.Damien George
2016-06-28unix/mpthreadport: Suppress compiler warning about unused arguments.Damien George
2016-06-28unix/gccollect: Provide declaration of exported function.Damien George
2016-06-28unix/mpthreadport: Use SA_SIGINFO for GC signal handler.Damien George
SA_SIGINFO allows the signal handler to access more information about the signal, especially useful in a threaded environment. The extra information is not currently used but it may prove useful in the future.
2016-06-28unix: Implement garbage collection with threading.Damien George
This patch allows any given thread to do a proper garbage collection and scan all the pointers of all active threads.
2016-06-28unix/file: If write syscall returns because of EINTR then try again.Damien George
As per PEP-475.
2016-06-28py/modthread: Implement lock object, for creating a mutex.Damien George
2016-06-28py/modthread: Add stack_size() function.Damien George
2016-06-28unix: Add basic thread support using pthreads.Damien George
Has the ability to create new threads.
2016-06-28py: Add MP_STATE_THREAD to hold state specific to a given thread.Damien George
2016-06-27unix: Fix Makefile to handle gc-sections linker flags on Mac OS.Martin Müller
The linker flag --gc-sections is not available on the linker used on Mac OS X which results in an error when linking micropython on Mac OS X. Therefore move this option to the LDFLAGS_ARCH variable on non Darwin systems. According to http://stackoverflow.com/a/17710056 the equivalent to --gc-sections is -dead_strip thus this option is used for the LDFLAGS_ARCH on Darwin systems.
2016-06-19unix/modmachine: Enable time_pulse_us() function.Paul Sokolovsky
2016-06-18unix/modmachine: Include PinBase class.Paul Sokolovsky
2016-06-18all: Rename mp_obj_type_t::stream_p to protocol.Paul Sokolovsky
It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
2016-06-18unix: Disable FatFs VFS for normal build, keep enabled for coverage.Paul Sokolovsky
It's enabled mostly for unit testing, and we do that in full with coverage build.