Commit Graph

10 Commits

Author SHA1 Message Date
stijn a5aa03acaf windows: Better handling of Ctrl-C
This builds upon the changes made in 2195046365. 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-21 20:51:27 +02:00
omtinez 3510499a9e windows: Call _set_output_format() only on Visual Studio versions 2013 or lower.
Since VS2015, float formatting is C standard compliant by default:
https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx
2015-10-30 11:37:58 +03:00
stijn ca9eb81d0b windows: Add usleep() implementation for msvc port
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-25 15:42:19 +03:00
stijn afd6c8e1d2 Remove obsolete bss-related code/build features
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-08 15:29:44 +01:00
stijn 8abcf666cb windows: Enable GC and implement bss start and end symbols
The pointers to the bss section are acquired in init.c()
by inspecting the PE header. Works for msvc and mingw.
2014-06-22 11:31:16 +02:00
stijn f45a83d7fc mingw: Fix compilation issues
- use lowercase windows.h
- fix for mingw32 using preprocessor-unfriendly definition of CLOCKS_PER_SEC
2014-05-10 10:42:40 +02:00
stijn 5ed284a15e windows: Add modtime implementation 2014-05-09 13:58:15 +02:00
stijn 01d6be4d51 Windows MSVC port
Extend the windows port so it compiles with the toolchain from Visual Studio 2013
2014-05-08 10:06:43 +02:00
Damien George 04b9147e15 Add license header to (almost) all files.
Blanket wide to all .c and .h files.  Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.

Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-05-03 23:27:38 +01:00
stijn 72521a1c17 mingw: Fix number of exponent digits in floating point formatting
By default mingw outputs 3 digits instead of the standard 2 so all float
tests using printf fail. Using setenv at the start of the program fixes this.
To accomodate calling platform specific initialization a
MICROPY_MAIN_INIT_FUNC macro is used which is called in mp_init()
2014-05-03 20:15:15 +02:00