aboutsummaryrefslogtreecommitdiff
path: root/windows/mpconfigport.h
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-21all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-06-01windows: Convert to use core-provided version of built-in import().Damien George
2017-04-22mpy-cross, unix, windows, stmhal: Enable return-if-else optimisation.Damien George
Prior to making this a config option it was previously available on these (and all other) ports, and it makes sense to keep it enabled for mpy-cross as well as ports that have a decent amount of space for the code.
2017-04-21windows: Bring mpconfigport.h up-to-date with unix portstijn
Add definitions/source files for features which work on the windows ports but weren't yet enabled. UTIME related lines are moved a couple of lines up to make comparision with unix/mpconfigport.h easier in the future.
2017-04-11unix, windows: Use core-provided KeyboardInterrupt exception object.Damien George
2017-04-01all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George
It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
2016-11-16windows: Enable READER_POSIX to get access to lexer_new_from_file.Damien George
2016-10-29windows: Enable utime_mphal following unix, define mp_hal_ticks_*.Paul Sokolovsky
mp_hal_ticks_ms, mp_hal_ticks_us taken from unix port, mp_hal_ticks_cpu dummy.
2016-09-10windows: Enable MICROPY_PY_UERRNOstijn
This also fixes the test failure for vfs_fat_ramdisk.py
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-06-25windows/msvc: Include machine_pinbase.c in build and enable umachine modulestijn
Fixes linker errors since [ad229477] and adds the umachine module so tests pass.
2016-06-18windows: Follow unix port changes regarding "utime" module.Paul Sokolovsky
2016-04-15py: Declare help, input, open builtins in core.Paul Sokolovsky
These are *defined* per-port, but why redeclare them again and again.
2016-04-13py: Add ability to have frozen persistent bytecode from .mpy files.Damien George
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).
2016-01-29py/runtime: mp_stack_ctrl_init() should be called immediately on startup.Paul Sokolovsky
Calling it from mp_init() is too late for some ports (like Unix), and leads to incomplete stack frame being captured, with following GC issues. So, now each port should call mp_stack_ctrl_init() on its own, ASAP after startup, and taking special precautions so it really was called before stack variables get allocated (because if such variable with a pointer is missed, it may lead to over-collecting (typical symptom is segfaulting)).
2016-01-26windows: Enable urandom module.Damien George
2015-12-28windows: Propagate MICROPY_PY_OS_DUPTERM handling from unix port.Paul Sokolovsky
2015-12-18windows: Make keyboard_interrupt_obj available, it's standard feature.Paul Sokolovsky
2015-12-12unix: Rename "_os" module to "uos" for consistency with baremetal ports.Paul Sokolovsky
2015-11-24windows/py: Support 64bit mingw-w64 buildsstijn
- add mp_int_t/mp_uint_t typedefs in mpconfigport.h - fix integer suffixes/formatting in mpconfig.h and mpz.h - use MICROPY_NLR_SETJMP=1 in Makefile since the current nlrx64.S implementation causes segfaults in gc_free() - update README
2015-11-14windows: Define ssize_t and use renamed mphal headerstijn
This fixes the build after changes in [66fd3e4] and [3a6b3d2]
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
2015-10-31windows: Use write() instead of fwrite() to avoid out-of-order output.stijn
This fixes the basics/exception_chain.py test, also see #1500 for more info and [4300c7d] where the same change was done for the other ports.
2015-10-26windows: Rename "time" module to "utime" for consistency with others.stijn
2015-10-25windows: Add usleep() implementation for msvc portstijn
Also make sleep.c self-contained by moving initialization code, instead of having part of the code in init.c, and add a header file to accomodate this. msec_sleep() now uses the usleep() implementation as well.
2015-09-23windows: Make mpconfigport.h up-to-date with the unix portstijn
2015-08-14windows: Make unistd.h more posix compatiblestijn
- add SEEK_XXX definitions, this fixes missing definition in py/stream.c - move R_OK from realpath.c and add W_OK/F_OK defintions - move STDXXX_FILENO definitions from mpconfigport for consistency
2015-06-04windows: Implement the mp_hal_xxx functions and enable mp-readlinestijn
2015-05-17py: Implement mp_format_float for doubles and use where appropriatestijn
This allows using (almost) the same code for printing floats everywhere, removes the dependency on sprintf and uses just snprintf and applies an msvc-specific fix for snprintf in a single place so nan/inf are now printed correctly.
2015-05-13windows: Enable some recently added features in mpconfigport.hstijn
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-03-26py: Add optional support for descriptors' __get__ and __set__ methods.stijn
Disabled by default. Enabled on unix and windows ports.
2015-03-14py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options.Damien George
These allow to fine-tune the compiler to select whether it optimises tuple assignments of the form a, b = c, d and a, b, c = d, e, f. Sensible defaults are provided.
2015-03-03py: Add MICROPY_MALLOC_USES_ALLOCATED_SIZE to allow simpler malloc API.Damien George
2015-01-12windows: Enable MICROPY_STACK_CHECK.Damien George
2015-01-10py: Add config option MICROPY_COMP_MODULE_CONST for module consts.Damien George
Compiler optimises lookup of module.CONST when enabled (an existing feature). Disabled by default; enabled for unix, windows, stmhal. Costs about 100 bytes ROM on stmhal.
2015-01-09windows: Enable MICROPY_PY_MICROPYTHON_MEM_INFO.Damien George
2015-01-08Remove obsolete bss-related code/build featuresstijn
GC for unix/windows builds doesn't make use of the bss section anymore, so we do not need the (sometimes complicated) build features and code related to it
2015-01-04msvc: Define no-op MP_LIKELY/UNLIKELY since there's no __builtin_expectstijn
2014-12-20windows: Correctly interpret skipped tests, enable uhashlib and ubinasciistijn
2014-12-09py: Allow builtins to be overridden.Damien George
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
2014-11-21windows: Update config with latest featuresstijn
- update mpconfigport.h to reflect latest unix version - fix compilation error in modure due to msvc not allowing dynamic arrays
2014-11-17ports: Define mp_off_t.Paul Sokolovsky
2014-10-13windows: Enable moduzlib instead of modzlibd.Paul Sokolovsky
2014-10-06windows: mingw32 gcc doesn't define endianness macros, so just assume little.Paul Sokolovsky
Specifically, at least Ubuntu's i586-mingw32msvc-gcc doesn't supply __LITTLE_ENDIAN__ and friends. And as it's safe enough to assume that Windows is only little-endian, then it's defined unconditionally, instead of duplicating detection logic in py/mpconfig.h (or adding windows-specific defines to it).
2014-10-04Enable unicode for Windows port so unicode tests give correct uPy outputstijn
2014-09-22windows: Enable input(), sys.maxsize(), ujson module, emergency exception ↵stijn
buf, os module
2014-09-02msvc: Exclude modtermios, include extmod and fix compilation errorstijn