| Age | Commit message (Collapse) | Author |
|
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)).
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
This fixes the build after adding directory iteration in d874702
|
|
Compiles with mingw32, tested to work erratically under Wine due to
not fully implemented emulation in it.
|
|
|
|
|
|
This leaves behind the common functionality in extmod/machine_mem.c
which can be used by all ports.
|
|
|
|
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)
|
|
- 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
|
|
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.
|
|
This fixes the build after changes in [66fd3e4] and [3a6b3d2]
|
|
This defaults to 'python' but can be now overridden if needed
|
|
|
|
- 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
|
|
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.
|
|
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.
|
|
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.
|
|
Since VS2015, float formatting is C standard compliant by default:
https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx
|
|
|
|
|
|
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.
|
|
containing optional features
Fixes issues like #1532
|
|
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.
|
|
Generally, ports should inherit INC from py.mk, append to it, not
overwrite it. TODO: Likely should do the same for other vars too.
|
|
|
|
|
|
- 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
|
|
After enabling line editing support on Windows console, this is no longer
trivial.
|
|
|
|
|
|
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.
|
|
|
|
- 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
|
|
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
|
|
|
|
Some files are excluded, otherwise a whole lot of files need converting.
|
|
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.
|
|
Disabled by default. Enabled on unix and windows ports.
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
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
|