aboutsummaryrefslogtreecommitdiff
path: root/windows
AgeCommit message (Collapse)Author
2015-09-23windows: Make mpconfigport.h up-to-date with the unix portstijn
2015-09-22windows/msvc: Exclude modjni from build.stijn
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/README: Add notes on running under Wine.Paul Sokolovsky
After enabling line editing support on Windows console, this is no longer trivial.
2015-06-04windows: Implement the mp_hal_xxx functions and enable mp-readlinestijn
2015-05-27unix: Factor out stdio and ctrl-C code to unix_mphal.c file.Damien George
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-30msvc: Allow overriding of build options with custom filestijn
- by default look for a user.props in the msvc directory, which is more convenient than the built-in way of looking for such file in the user's home directory - make git ignore the file
2015-04-28py: Replace py-version.sh with makeversionhdr.py, written in Python.Damien George
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
2015-04-22msvc: Update genhdr script to emit MicroPython version numbersstijn
2015-04-16Add .gitattributes file to force text line endings to LF.Damien George
Some files are excluded, otherwise a whole lot of files need converting.
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
2015-01-02msvc: Use single build target for dealing with generated filesstijn
Remove some duplication in the code for generating qstrdefs.generated.h and py-version.h
2015-01-02msvc: Define main build/include directories in a single locationstijn
- Use a single file env.props for defining the main directories used when building. env.props resolves the base directory and defines overridable output directories, and is used by all other build files. - Fix the build currently failing, basically because the preprocessing command for generating qstrdefs uses different include directories than the build itself does. (specifically, qstrdefs.h uses #include "py/mpconfig.h" since the fixes for #1022 in 51dfcb4, so we need to use the base directory as include directory, not the py dir itself). So define a single variable containing the include directories instead and use it where needed.
2015-01-01windows: Prefix includes with py/; remove need for -I../py.Damien George
2015-01-01msvc: Support py/*.h includes per #1022stijn
2014-12-27Makefiles: Support py/*.h includes per #1022.Paul Sokolovsky
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-12-06windows: define __USE_MINGW_ANSI_STDIO for all Windows compilers.Damien George
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-29Add -Wpointer-arith flag to prevent problems with pointer arithmetic on void*stijn
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
2014-08-24py: Fix bug where GC collected native/viper/asm function data.Damien George
Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
2014-08-13msvc: Use built-in alignofstijn
This also fixes a 'unnamed type definition in parentheses' warning on the alignof implementation define in binary.c
2014-07-03Rename machine_(u)int_t to mp_(u)int_t.Damien George
See discussion in issue #50.
2014-06-29windows: Sync mpconfigport.h with the unix' versionstijn
- rearrange/add definitions that were not there so it's easier to compare both - use MICROPY_PY_SYS_PLATFORM in main.c since it's available anyway - define EWOULDBLOCK, it is missing from ingw32
2014-06-22windows: Enable GC and implement bss start and end symbolsstijn
The pointers to the bss section are acquired in init.c() by inspecting the PE header. Works for msvc and mingw.
2014-06-08windows: Move include of malloc.h outside #ifdef msvc.Damien George
2014-06-08Provide definition of alloca() in mpconfigport.h.Damien George
2014-06-07- FreeBSD provides alloca() via stdlib.h, in contrast to Linux and WindowsMarcus von Appen
- Move the includes for alloca() intp mpconfigport.h
2014-06-01Rename bultins config variables to MICROPY_PY_BUILTINS_*.Damien George
This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion.
2014-05-28msvc: Only update generated headers when there are changesstijn
This fixes generating the headers casuing complete rebuilds, even when the headere's content didn't really change.
2014-05-27windows: Complete rename of MICROPY_PATH_MAX to MICROPY_ALLOC_PATH_MAX (58ebde4)stijn
2014-05-24Rename configuration variables controling Python features.Damien George
Now of the form MICROPY_PY_*. See issue #35.
2014-05-21Tidy up some configuration options.Damien George
MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.