summaryrefslogtreecommitdiffstatshomepage
path: root/unix
Commit message (Collapse)AuthorAge
* unix/mpthreadport: Adjust minimum thread stack, and stack limit check.Damien George2016-07-11
| | | | | | 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.
* unix: Disable the GIL to improve performance of non-thread code.Damien George2016-07-09
| | | | | | | | | | | | | 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.
* unix/main: When preparing sys.path, allocate exact strings on uPy heap.Paul Sokolovsky2016-07-09
| | | | | | | 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.
* unix/main: Improve help for -X options a bit.Paul Sokolovsky2016-07-08
|
* unix/main: Error out on unknown value of suffix in -X heapsize= option.Paul Sokolovsky2016-07-08
| | | | E.g. -X heapsize=16Kfoo, -X heapsize=1G will lead to error.
* unix/mpconfigport_minimal.h: Allow to print a string within 1KB of heap.Paul Sokolovsky2016-07-03
| | | | By adjusting parser allocation policy.
* unix/Makefile: Make "minimal" build be minimal again.Paul Sokolovsky2016-07-03
|
* unix: Enable btree module.Paul Sokolovsky2016-07-02
| | | | | But disable it for coverage build, as its extra warninsg aren't compatible with K&R C BerkeleyDB uses.
* py/modthread: Allow to properly set the stack limit of a thread.Damien George2016-06-28
| | | | | We rely on the port setting and adjusting the stack size so there is enough room to recover from hitting the stack limit.
* unix/modtime: Release the GIL when sleeping.Damien George2016-06-28
|
* unix/mpthreadport: Suppress compiler warning about unused arguments.Damien George2016-06-28
|
* unix/gccollect: Provide declaration of exported function.Damien George2016-06-28
|
* unix/mpthreadport: Use SA_SIGINFO for GC signal handler.Damien George2016-06-28
| | | | | | 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.
* unix: Implement garbage collection with threading.Damien George2016-06-28
| | | | | This patch allows any given thread to do a proper garbage collection and scan all the pointers of all active threads.
* unix/file: If write syscall returns because of EINTR then try again.Damien George2016-06-28
| | | | As per PEP-475.
* py/modthread: Implement lock object, for creating a mutex.Damien George2016-06-28
|
* py/modthread: Add stack_size() function.Damien George2016-06-28
|
* unix: Add basic thread support using pthreads.Damien George2016-06-28
| | | | Has the ability to create new threads.
* py: Add MP_STATE_THREAD to hold state specific to a given thread.Damien George2016-06-28
|
* unix: Fix Makefile to handle gc-sections linker flags on Mac OS.Martin Müller2016-06-27
| | | | | | | | | 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.
* unix/modmachine: Enable time_pulse_us() function.Paul Sokolovsky2016-06-19
|
* unix/modmachine: Include PinBase class.Paul Sokolovsky2016-06-18
|
* all: Rename mp_obj_type_t::stream_p to protocol.Paul Sokolovsky2016-06-18
| | | | | It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
* unix: Disable FatFs VFS for normal build, keep enabled for coverage.Paul Sokolovsky2016-06-18
| | | | | It's enabled mostly for unit testing, and we do that in full with coverage build.
* unix/alloc: Make coverage build and its overzealous warnings happy.Paul Sokolovsky2016-06-18
|
* unix/alloc: Add option to use uPy's alloc-exec implementation even for libffi.Paul Sokolovsky2016-06-18
| | | | | | | | | | | | | When built for Linux, libffi includes very bloated and workaround exec-alloc implementation required to work around SELinux and other "sekuritee" features which real people don't use. MicroPython has own alloc-exec implementation, used to alloc memory for @micropython.native code. With this option enabled, uPy's implementation will override libffi's. This saves 11K on x86_64 (and that accounts for more than half of the libffi code size). TODO: Possibly, we want to refactor this option to allow either use uPy's implementation even for libffi, or allow to use libffi's implementation even for uPy.
* unix/Makefile: libffi: Build with -Os.Paul Sokolovsky2016-06-18
| | | | | Also try to use -fno-exceptions. Other options taken from libffi's configure defaults.
* unix: Move "utime" module config to C level instead of make level.Paul Sokolovsky2016-06-17
|
* unix: Time to build with --gc-sections.Paul Sokolovsky2016-06-17
| | | | | | | This actually saves "only" 6K for x86_64 build, as we're still more or less careful to #ifdef unneeded code. But relying on --gc-sections in a "lazy" manner would allow to make #ifdef'ing less pervasive (not suggested right away, but an option for the future).
* unix: Deprecate support for GNU Readline (MICROPY_USE_READLINE=2).Paul Sokolovsky2016-06-16
| | | | | | | | | | | | MicroPython own readline implementation is superior now by providing automatic indentation and completion (completion for GNU Readline was never implemented). MICROPY_USE_READLINE=2 also wasn't build for a long time and probably broken. If GNU Readline is still beneficial for some cases, it can be achieved with external wrappers like "rlwrap" (there will be the same level of functionality, as again, there never was deep integration, like completion support).
* unix/mpconfigport_minimal.h: Clearly mark where user-define config ends.Paul Sokolovsky2016-06-16
| | | | TODO: Do the same for other config files.
* unix: Unbreak "minimal" target by disabling FatFs.Paul Sokolovsky2016-06-16
| | | | Was broken since introduction of FatFs support.
* py/mpconfig.h: MP_NOINLINE is universally useful, move from unix port.Paul Sokolovsky2016-06-15
|
* extmod/vfs_fat.c: Add vfs.stat().Robert HH2016-05-31
| | | | | | The call to stat() returns a 10 element tuple consistent to the os.stat() call. At the moment, the only relevant information returned are file type and file size.
* unix/Makefile: "make axtls": Automatically fetch submodules if missing.Paul Sokolovsky2016-05-28
| | | | | Try to emulate "you can build without reading instructions" behavior as far as possible.
* unix/mpconfigport.mk: Document MICROPY_STANDALONE make-level option.Paul Sokolovsky2016-05-28
| | | | | | | Avoid using system libraries, use copies bundled with MicroPython as submodules (currently affects only libffi, other dependencies either already used as bundled-only (axtls), or can't be bundled (so far), like libjni).
* unix: Enable "ussl" module.Paul Sokolovsky2016-05-26
| | | | | ussl was in testing mode for 8 months, and now enabled in other ports (e.g. esp8266), so time for unix port to catch up.
* unix/Makefile: nanbox build is not compatible with modussl, disable.Paul Sokolovsky2016-05-26
|
* 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/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.
* unix/unix_mphal: Implement mp_hal_ticks_us().Paul Sokolovsky2016-05-21
| | | | Similar to existing mp_hal_ticks_ms().
* 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).
* 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.
* unix: Enable uerrno module.Damien George2016-05-10
|
* unix/mphalport: Add mp_hal_delay_us() for consistency with other ports.Pavol Rusnak2016-05-07
|
* unix/Makefile: Make install more compatible (BSD, etc.).Martin Müller2016-04-28
| | | | | | | | The current install command uses the flag -D which is specific to the install command from GNU coreutils, but isn't available for the BSD version. This solution uses the -d flag which should be commonly available to create the target directory. Afterwards the target files are installed to this directory seperately.
* unix: Make sure build dir exists before accessing it for freezing upip.Paul Sokolovsky2016-04-19
|
* py: Add rules for automated extraction of qstrs from sources.Jan Čapek2016-04-16
| | | | | | | | | | | | | | | | | | | | | - add template rule that converts a specified source file into a qstring file - add special rule for generating a central header that contains all extracted/autogenerated strings - defined by QSTR_DEFS_COLLECTED variable. Each platform appends a list of sources that may contain qstrings into a new build variable: SRC_QSTR. Any autogenerated prerequisities are should be appened to SRC_QSTR_AUTO_DEPS variable. - remove most qstrings from py/qstrdefs, keep only qstrings that contain special characters - these cannot be easily detected in the sources without additional annotations - remove most manual qstrdefs, use qstrdef autogen for: py, cc3200, stmhal, teensy, unix, windows, pic16bit: - remove all micropython generic qstrdefs except for the special strings that contain special characters (e.g. /,+,<,> etc.) - remove all port specific qstrdefs except for special strings - append sources for qstr generation in platform makefiles (SRC_QSTR)
* py: Declare help, input, open builtins in core.Paul Sokolovsky2016-04-15
| | | | These are *defined* per-port, but why redeclare them again and again.
* py: Add ability to have frozen persistent bytecode from .mpy files.Damien George2016-04-13
| | | | | | | The config variable MICROPY_MODULE_FROZEN is now made of two separate parts: MICROPY_MODULE_FROZEN_STR and MICROPY_MODULE_FROZEN_MPY. This allows to have none, either or both of frozen strings and frozen mpy files (aka frozen bytecode).