diff --git a/py/builtinimport.c b/py/builtinimport.c
index 262ee04a5369630fd98ef4a55a8dd47c588651ad..4a2f6510c3a88563de7e30f59ee3d9cd68272e9c 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -3,6 +3,10 @@
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
+#ifdef __MINGW32__
+// For alloca()
+#include <malloc.h>
+#endif
 
 #include "nlr.h"
 #include "misc.h"
diff --git a/py/nlrx86.S b/py/nlrx86.S
index 003de5095fdf9fba341f886165632a2859381396..145bdb9da03814fc0aa4c1e408c40495fea8a4ca 100644
--- a/py/nlrx86.S
+++ b/py/nlrx86.S
@@ -61,7 +61,11 @@ nlr_jump:
 #endif
     mov     nlr_top, %edx           # load nlr_top
     test    %edx, %edx              # check for nlr_top being NULL
+#ifdef _WIN32
+    je      _nlr_jump_fail           # fail if nlr_top is NULL
+#else
     je      nlr_jump_fail           # fail if nlr_top is NULL
+#endif
     mov     4(%esp), %eax           # load return value
     mov     %eax, 4(%edx)           # store return value
     mov     (%edx), %eax            # load prev nlr_top
diff --git a/py/objfun.c b/py/objfun.c
index c7144f30788f0b8a41b2a63bc5dba040cd020642..940b64a66e79281134576b880b91d8f641c2e672 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -2,6 +2,10 @@
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
+#ifdef __MINGW32__
+// For alloca()
+#include <malloc.h>
+#endif
 
 #include "nlr.h"
 #include "misc.h"
diff --git a/unix/file.c b/unix/file.c
index a0a865a2636bcb2e7f4f914b5f406661c45f2db7..5bda34013fc01885d34294a9b4f05f230243f0a0 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
diff --git a/unix/main.c b/unix/main.c
index 940fe48c14b9fec6f77d03736f65c4b8768384f7..4c86edeae512c2061c36879bc2a0ad038d070a6c 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -250,7 +250,9 @@ int usage(char **argv) {
 
 mp_obj_t mem_info(void) {
     printf("mem: total=%d, current=%d, peak=%d\n", m_get_total_bytes_allocated(), m_get_current_bytes_allocated(), m_get_peak_bytes_allocated());
+#if MICROPY_ENABLE_GC
     gc_dump_info();
+#endif
     return mp_const_none;
 }
 
@@ -392,7 +394,11 @@ int main(int argc, char **argv) {
                 return usage(argv);
             }
         } else {
+#ifdef __MINGW32__
+            char *basedir = _fullpath(NULL, argv[a], _MAX_PATH);
+#else
             char *basedir = realpath(argv[a], NULL);
+#endif
             if (basedir == NULL) {
                 fprintf(stderr, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[1], errno);
                 perror("");
diff --git a/windows/Makefile b/windows/Makefile
index 651de7c7f12c3898a7cf9f054ebe884d8a66c1b9..2f5418886f82accaa8ca05a48192dacb5b4a28bc 100644
--- a/windows/Makefile
+++ b/windows/Makefile
@@ -1,4 +1,5 @@
 include ../py/mkenv.mk
+-include mpconfigport.mk
 
 # define main target
 PROG = micropython.exe
@@ -14,14 +15,15 @@ INC += -I$(PY_SRC)
 INC += -I$(BUILD)
 
 # compiler settings
-CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX
-LDFLAGS = -lm
+CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
+LDFLAGS = $(LDFLAGS_MOD) -lm
 
 # Debugging/Optimization
 ifdef DEBUG
-CFLAGS += -O0 -g
+CFLAGS += -g
+COPT = -O0
 else
-CFLAGS += -Os #-DNDEBUG
+COPT = -Os #-DNDEBUG
 endif
 
 # source files
@@ -30,11 +32,16 @@ SRC_C = \
 	unix/file.c \
 
 OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
-LIB = -lreadline
-LIB += -lws2_32
-LIB += -lmman
+
+ifeq ($(MICROPY_USE_READLINE),1)
+CFLAGS_MOD += -DMICROPY_USE_READLINE=1
+LDFLAGS_MOD += -lreadline
 # the following is needed for BSD
-#LIB += -ltermcap
+#LDFLAGS_MOD += -ltermcap
+endif
+
+LIB += -lws2_32
+#LIB += -lmman
 
 include ../py/mkrules.mk
 
diff --git a/windows/README b/windows/README
new file mode 100644
index 0000000000000000000000000000000000000000..615ada201210520b58f668d7fd4af117a8f3c122
--- /dev/null
+++ b/windows/README
@@ -0,0 +1,10 @@
+This is experimental, community-supported Windows port of MicroPython.
+It is based on Unix port, and expected to remain so.
+
+To cross-compile under Debian/Ubuntu Linux system:
+
+sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
+make CC=i586-mingw32msvc-gcc
+
+The port requires additional testing, debugging, and patches. Please
+consider to contribute.
diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h
index 74fe749e1e6541f54cc136fd5f7977ebc0bed99c..993fef9d59d4c72d28752e4cc56b70ae16fe5bdf 100644
--- a/windows/mpconfigport.h
+++ b/windows/mpconfigport.h
@@ -2,10 +2,10 @@
 
 // Linking with GNU readline causes binary to be licensed under GPL
 #ifndef MICROPY_USE_READLINE
-#define MICROPY_USE_READLINE        (1)
+#define MICROPY_USE_READLINE        (0)
 #endif
 
-#define MICROPY_EMIT_X64            (1)
+#define MICROPY_EMIT_X64            (0)
 #define MICROPY_EMIT_THUMB          (0)
 #define MICROPY_EMIT_INLINE_THUMB   (0)
 #define MICROPY_MEM_STATS           (1)
diff --git a/windows/mpconfigport.mk b/windows/mpconfigport.mk
new file mode 100644
index 0000000000000000000000000000000000000000..458f23dd1e576675c3e26e3ae067fb9eefab0712
--- /dev/null
+++ b/windows/mpconfigport.mk
@@ -0,0 +1,13 @@
+# Enable/disable modules and 3rd-party libs to be included in interpreter
+
+# Build 32-bit binaries on a 64-bit host
+MICROPY_FORCE_32BIT = 0
+
+# Linking with GNU readline causes binary to be licensed under GPL
+MICROPY_USE_READLINE = 0
+
+# Subset of CPython time module
+MICROPY_MOD_TIME = 1
+
+# ffi module requires libffi (libffi-dev Debian package)
+MICROPY_MOD_FFI = 0