aboutsummaryrefslogtreecommitdiff
path: root/windows
AgeCommit message (Collapse)Author
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/msvc: Add modurandom.c to list of source files.Damien George
2016-01-26windows: Enable urandom module.Damien George
2015-12-28windows: Propagate MICROPY_PY_OS_DUPTERM handling from unix port.Paul Sokolovsky
2015-12-26windows/msvc: Nicer handling of asserts and 'invalid' parametersstijn
The default bahaviour for debug builds is to show dialog boxes for asserts and invalid parameter handling. This is not so nice in general and causes the Appveyor debug builds to hang because the io\file_seek.py test passes a closed file descriptor to lseek. Disable this behaviour by printing assert messages to the output instead of showing the dialog, and by disabling 'invalid' parameter handling which causes the affected functions to just return an error and set errno appropriately.
2015-12-21windows: Better handling of Ctrl-Cstijn
This builds upon the changes made in 2195046365c. Using signal() does not produce reliable results so SetConsoleCtrlHandler is used, and the handler is installed only once during initialization instead of removing it in mp_hal_set_interrupt_char when it is not strictly needed anymore, since removing it might lead to Ctrl-C events being missed because they are fired on a seperate thread which might only become alive after the handler was removed.
2015-12-18windows: Add Appveyor CI builds for msvc port.stijn
Appveyor is like Travis, but for Windows builds. The appveyor.yml configuration will build the msvc port in all configuration/platform conbinations, and run the tests for each of those.
2015-12-18msvc: Add dirent.h/.c implementationstijn
This fixes the build after adding directory iteration in d874702
2015-12-18windows/windows_mphal: Add basic support for raising KeyboardInterrupt.Paul Sokolovsky
Compiles with mingw32, tested to work erratically under Wine due to not fully implemented emulation in it.
2015-12-18windows: Make keyboard_interrupt_obj available, it's standard feature.Paul Sokolovsky
2015-12-15msvc: Use new modmachine infrastructure per changes in f925165stijn
2015-12-13unix: Move modmachine into unix directoryDave Hylands
This leaves behind the common functionality in extmod/machine_mem.c which can be used by all ports.
2015-12-12unix: Rename "_os" module to "uos" for consistency with baremetal ports.Paul Sokolovsky
2015-12-11msvc: Use different output directories depending on build typestijn
This allows multiple versions (e.g. Debug/Release, x86/x64) of micropython.exe to co-exist instead and also solves potential problems where msbuild does not completely rebuild the output and/or pdb files when switching between builds, which in turn can cause linker errors in dependent projects. By default exe/map/... files go in windows/build/$(Configuration)$(Platform) After each build micropython.exe is still copied from the above directory to the windows directory though, as that is consistent with the other ports and the test runner by default uses that location as well. Also rename env.props -> path.props which is a clearer name, and add ample documentation in the affected build files. (also see discussion in #1538)
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-24windows: Cleanup makefilestijn
The BSD stuff is a copy from the unix makefile but at least there it makes some sense, a windows makefile on BSD doesn't. The -lmman flag is probably for mmap functions but there is no other build support for it on windows so just that flag won't cut it anyway.
2015-11-14windows: Define ssize_t and use renamed mphal headerstijn
This fixes the build after changes in [66fd3e4] and [3a6b3d2]
2015-11-10windows: Allow specifying the python executable to use for msvc buildsstijn
This defaults to 'python' but can be now overridden if needed
2015-11-10Fix project file for Visual Studio 2015omtinez
2015-11-02windows: Update build instructions in the READMEstijn
- use correct 'mingw-w64' package name - small grammar fixes - modify Cygwin build instructions to use that same compiler as well: the original mingw is stuck at gcc v4.7 and does not seem to be updated anymore - make it clear thet uPy also builds using Visual Studio versions > 2013
2015-11-01windows/README: Deprecate mingw32, suggest using mingw64.Paul Sokolovsky
Ubuntu's mingw32 has gcc 4.2.1, which is rather old and has incorrect non-initialized variable analysis which produces warnings, which per MicroPython default settings get turned into errors.
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-30windows: Call _set_output_format() only on Visual Studio versions 2013 or lower.omtinez
Since VS2015, float formatting is C standard compliant by default: https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx
2015-10-26windows: Rename "time" module to "utime" for consistency with others.stijn
2015-10-26windows: Erase pre-calc'd number of chars instead of clearing whole line.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-10-25windows: Do not use wildcards when looking for sources in directories ↵stijn
containing optional features Fixes issues like #1532
2015-10-20lib/mp-readline: Add n_chars argument to mp_hal_erase_line_from_cursor.Damien George
If VT100 support is not available then a given implementation of mp_hal_erase_line_from_cursor might need to know the number of characters to erase. This patch does not change generated code when VT100 is supported, since compiler can optimise away the argument.
2015-10-19all: Make netutils.h available to all ports by default.Paul Sokolovsky
Generally, ports should inherit INC from py.mk, append to it, not overwrite it. TODO: Likely should do the same for other vars too.
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